Skip to content

Conversation

@LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Jan 5, 2024

What changes were proposed in this pull request?

The Literal.create function supports immuable.ArraySeq, but the Literal.apply function does not. So this pr make the Literal.apply function to also support immuable.ArraySeq.

Why are the changes needed?

Make Literal.apply support s.c.immuable.ArraySeq as Literal.create

Does this PR introduce any user-facing change?

Yes, user can create Literal using the Literal.apply function with s.c.immuable.ArraySeq as input.

How was this patch tested?

Add a new test

Was this patch authored or co-authored using generative AI tooling?

No

@LuciferYang LuciferYang marked this pull request as draft January 5, 2024 06:25
@github-actions github-actions bot added the SQL label Jan 5, 2024
val expected = toCatalyst(immArraySeq)
checkEvaluation(Literal(immArraySeq), expected)
checkEvaluation(Literal.create(immArraySeq), expected)
checkEvaluation(Literal.create(immArraySeq, ArrayType(DoubleType)), expected)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Even without this PR, the following two lines can pass the test successfully. These two lines are just to increase test coverage.

checkEvaluation(Literal.create(immArraySeq), expected)
checkEvaluation(Literal.create(immArraySeq, ArrayType(DoubleType)), expected)

@LuciferYang LuciferYang marked this pull request as ready for review January 5, 2024 15:35
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Thank you, @LuciferYang .
Merged to master.

@LuciferYang
Copy link
Contributor Author

Thanks @dongjoon-hyun

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants