Skip to content

Conversation

@mihailotim-db
Copy link
Contributor

What changes were proposed in this pull request?

This is a followup to #50606 to fix the origin and context of newly created UnresolvedOrdinal.

Why are the changes needed?

Origin and context of UnresolvedOrdinal should be the same as for the original Literal.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing tests.

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

No

@github-actions github-actions bot added the SQL label Apr 23, 2025
@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 632e681 Apr 23, 2025
expression: Expression,
canReplaceWithOrdinal: Boolean = true) = expression match {
case Literal(value: Int, IntegerType) if canReplaceWithOrdinal => UnresolvedOrdinal(value)
case literal @ Literal(value: Int, IntegerType) if canReplaceWithOrdinal =>
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 do the same in sql/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please make a followup PR for this (per offline discussion with @cloud-fan)

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.

3 participants