Skip to content

Conversation

@viirya
Copy link
Member

@viirya viirya commented Dec 19, 2015

JIRA: https://issues.apache.org/jira/browse/SPARK-12438

ScalaReflection lacks the support of SQLUserDefinedType. We should add it.

@SparkQA
Copy link

SparkQA commented Dec 19, 2015

Test build #48050 has finished for PR 10390 at commit 51b76b1.

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

@viirya
Copy link
Member Author

viirya commented Dec 21, 2015

cc @cloud-fan @marmbrus @davies

Copy link
Contributor

Choose a reason for hiding this comment

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

can we also test encoder.fromRow?

we can just create a MyLabelPoint and encode it to InternalRow and decode it back by encoder, and check if the decoded MyLabelPoint is same with the original one.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the test now. By doing this, I also found that we need to add UserDefinedType to Cast to make it work.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this worth another JIRA.

Is ScalaRelfection the only place that may use UDT in Cast?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think so, as it is a special use case. I will open another JIRA for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

This fixing is submitted as pr #10410.

@SparkQA
Copy link

SparkQA commented Dec 21, 2015

Test build #48100 has finished for PR 10390 at commit d01c661.

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

@marmbrus
Copy link
Contributor

I think we need more design work before we implement this. I'm not a huge fan of the current UDT API and I think we will replace it in Spark 2.0.

@viirya
Copy link
Member Author

viirya commented Dec 21, 2015

That is fine. But we will leave it broken until Spark2.0?

@marmbrus
Copy link
Contributor

We can revisit this if we do a 1.7 release, but I don't think that is going to happen.

@viirya
Copy link
Member Author

viirya commented Dec 22, 2015

Personally, I would like to see this to be merged because it blocks my another PR #10283. Can we merge this and go back to modify this part when we revamp UDT API in the future? But of course it depends on you. Thanks.

@marmbrus
Copy link
Contributor

Okay, I'm fine with merging this now to unblock other progress. However, I think we should move the test to be with the other encoder tests.

@viirya
Copy link
Member Author

viirya commented Dec 30, 2015

@marmbrus Thanks. However, to move the test means that we need to move the UDT classes to encoder tests. I think it might duplicate the codes. Is it ok for you?

@SparkQA
Copy link

SparkQA commented Dec 30, 2015

Test build #48468 has finished for PR 10390 at commit 42303d2.

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

@marmbrus
Copy link
Contributor

Do you mean just the example UDT MyLabeledPoint? I'm fine with duplicating that or moving it entirely. If UDTs are defined in catalyst we should also have unit tests for them there.

@viirya
Copy link
Member Author

viirya commented Dec 31, 2015

@marmbrus Not only MyLabeledPoint, which is just a case class. Also including UDT MyDenseVectorUDT and MyDenseVector. I think it might duplicate too many lines of codes from UserDefinedTypeSuite to encoder test suite like ExpressionEncoderSuite.

@cloud-fan
Copy link
Contributor

We alread have UDT in RowEncoderSuite, can we move it to a seperate file, and share it within catalyst tests?

@viirya
Copy link
Member Author

viirya commented Dec 31, 2015

@cloud-fan I just think the same thing. I will try it.

@SparkQA
Copy link

SparkQA commented Dec 31, 2015

Test build #48547 has finished for PR 10390 at commit 72446f1.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 31, 2015

Test build #48548 has finished for PR 10390 at commit 62fa738.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

These changes are not needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Forgot to remove them.

@SparkQA
Copy link

SparkQA commented Jan 5, 2016

Test build #48721 has finished for PR 10390 at commit 80a3f7b.

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

@marmbrus
Copy link
Contributor

marmbrus commented Jan 5, 2016

Thanks, merging to master.

@asfgit asfgit closed this in b3c48e3 Jan 5, 2016
marmbrus pushed a commit to marmbrus/spark that referenced this pull request Jan 7, 2016
JIRA: https://issues.apache.org/jira/browse/SPARK-12438

ScalaReflection lacks the support of SQLUserDefinedType. We should add it.

Author: Liang-Chi Hsieh <[email protected]>

Closes apache#10390 from viirya/encoder-udt.
@viirya viirya deleted the encoder-udt branch December 27, 2023 18:18
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