Skip to content

[Minor][SQL] Fix randomly generated ArrayData in RowEncoderSuite#9757

Closed
viirya wants to merge 1 commit intoapache:masterfrom
viirya:fix-randomgenerated-udt
Closed

[Minor][SQL] Fix randomly generated ArrayData in RowEncoderSuite#9757
viirya wants to merge 1 commit intoapache:masterfrom
viirya:fix-randomgenerated-udt

Conversation

@viirya
Copy link
Member

@viirya viirya commented Nov 17, 2015

The randomly generated ArrayData used for the UDT ExamplePoint in RowEncoderSuite sometimes doesn't have enough elements. In this case, this test will fail. This patch is to fix it.

@viirya
Copy link
Member Author

viirya commented Nov 17, 2015

cc @davies

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use the first element at least? Did we check the result in tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

We did check the results as we check input row and the row converted back.
Because this UDT ExamplePoint needs at least two double values. If the array generated by the random generator at the first contains only 1 or 0 elements. values.getDouble will throw out of range exception.

@SparkQA
Copy link

SparkQA commented Nov 17, 2015

Test build #46051 has finished for PR 9757 at commit 4903511.

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

asfgit pushed a commit that referenced this pull request Nov 17, 2015
The randomly generated ArrayData used for the UDT `ExamplePoint` in `RowEncoderSuite` sometimes doesn't have enough elements. In this case, this test will fail. This patch is to fix it.

Author: Liang-Chi Hsieh <viirya@appier.com>

Closes #9757 from viirya/fix-randomgenerated-udt.

(cherry picked from commit d79d8b0)
Signed-off-by: Davies Liu <davies.liu@gmail.com>
@davies
Copy link
Contributor

davies commented Nov 17, 2015

Merged into master and 1.6 branch, thanks!

@asfgit asfgit closed this in d79d8b0 Nov 17, 2015
@viirya viirya deleted the fix-randomgenerated-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.

3 participants

Comments