Skip to content

Conversation

@davies
Copy link
Contributor

@davies davies commented Oct 28, 2014

Call Python UDF on ArrayType/MapType/PrimitiveType, the returnType can also be ArrayType/MapType/PrimitiveType.

For StructType, it will act as tuple (without attributes). If returnType is StructType, it also should be tuple.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22341 has started for PR 2973 at commit 35caa4f.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22341 has finished for PR 2973 at commit 35caa4f.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22341/
Test FAILed.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #485 has started for PR 2973 at commit 35caa4f.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22352 has started for PR 2973 at commit 79afb4e.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #485 has finished for PR 2973 at commit 35caa4f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22352 has finished for PR 2973 at commit 79afb4e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22352/
Test PASSed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit/existing: I'd avoid creating attributes which is actually pretty expensive due to an AtomicLong and use the public API for schema. I think instead of these two lines you can just do the following here and above.

val fieldTypes = schema.fields.map(_.dataType)

@marmbrus
Copy link
Contributor

Thanks for the quick fix! A few minor comments.

Davies Liu added 2 commits October 28, 2014 14:32
Conflicts:
	sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala
@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22377 has started for PR 2973 at commit 11395fa.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22378 has started for PR 2973 at commit 2c00e43.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #489 has started for PR 2973 at commit 2c00e43.

  • This patch does not merge cleanly.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22379 has started for PR 2973 at commit 306956e.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22377 has finished for PR 2973 at commit 11395fa.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class DateType(PrimitiveType):
    • case class BitwiseAnd(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseOr(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseXor(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseNot(child: Expression) extends UnaryExpression

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22377/
Test PASSed.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22378 has finished for PR 2973 at commit 2c00e43.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class VectorTransformer(object):
    • class Normalizer(VectorTransformer):
    • class JavaModelWrapper(VectorTransformer):
    • class StandardScalerModel(JavaModelWrapper):
    • class StandardScaler(object):
    • class HashingTF(object):
    • class IDFModel(JavaModelWrapper):
    • class IDF(object):
    • class Word2VecModel(JavaModelWrapper):
    • class DateType(PrimitiveType):
    • case class BitwiseAnd(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseOr(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseXor(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseNot(child: Expression) extends UnaryExpression

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22378/
Test PASSed.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22379 has finished for PR 2973 at commit 306956e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class DateType(PrimitiveType):
    • case class BitwiseAnd(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseOr(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseXor(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseNot(child: Expression) extends UnaryExpression
    • case class CreateTableAsSelect[T](
    • logDebug("Found class for $serdeName")

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22379/
Test PASSed.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #489 has finished for PR 2973 at commit 2c00e43.

  • This patch passes all tests.
  • This patch does not merge cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class Broadcast[T: ClassTag](val id: Long) extends Serializable with Logging
    • class VectorTransformer(object):
    • class Normalizer(VectorTransformer):
    • class JavaModelWrapper(VectorTransformer):
    • class StandardScalerModel(JavaModelWrapper):
    • class StandardScaler(object):
    • class HashingTF(object):
    • class IDFModel(JavaModelWrapper):
    • class IDF(object):
    • class Word2VecModel(JavaModelWrapper):
    • class DateType(PrimitiveType):
    • case class BitwiseAnd(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseOr(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseXor(left: Expression, right: Expression) extends BinaryArithmetic
    • case class BitwiseNot(child: Expression) extends UnaryExpression

@marmbrus
Copy link
Contributor

Thanks! Merged to master.

@asfgit asfgit closed this in 8c0bfd0 Oct 29, 2014
@marmbrus
Copy link
Contributor

FYI this is actually: SPARK-4113

@davies davies changed the title [SPARK-4133] [SQL] [PySpark] type conversionfor python udf [SPARK-4113] [SQL] [PySpark] type conversionfor python udf Oct 29, 2014
@davies
Copy link
Contributor Author

davies commented Oct 29, 2014

thanks, update the link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants