-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-49025] Make Column implementation agnostic #3913
base: master
Are you sure you want to change the base?
Conversation
Waiting for apache/spark#49038 to get merged. |
spark/src/main/scala-spark-3.5/shims/ColumnConversionShims.scala
Outdated
Show resolved
Hide resolved
...src/test/scala/org/apache/spark/sql/delta/ConflictCheckerPredicateEliminationUnitSuite.scala
Outdated
Show resolved
Hide resolved
spark/src/test/scala/org/apache/spark/sql/delta/GeneratedColumnSuite.scala
Show resolved
Hide resolved
I am not sure why DSM is failing on |
Where do you see "expr/expression not found"? Filename maybe? I don't see it anywhere |
@allisonport-db the error is gone now. |
I see 1 column compilation error in the latest run still
|
val ifSourceRowNull = col(SOURCE_ROW_PRESENT_COL).isNull.expr | ||
val ifTargetRowNull = col(TARGET_ROW_PRESENT_COL).isNull.expr | ||
val ifSourceRowNull = expression(col(SOURCE_ROW_PRESENT_COL).isNull) | ||
val ifTargetRowNull = expression(col(TARGET_ROW_PRESENT_COL).isNull) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we make this change sometimes? (using expression(..)
)
Other times it seems we use the implicit conversion to RichColumn
in ClassicColumnConversions
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we need expression(..)
at all? And cannot just leave all these instances
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expression(...)
is much cheaper, and does not rely on the SparkSession.active
thread local. The downside is that it can only be used in scenarios where you know the Expression is used to build a Column.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. Could you maybe add this in docs to ColumnConversionShims
? It would be good to have this info somewhere since I don't think it'll be obvious to most developers
Which Delta project/connector is this regarding?
Description
This PR ports the changes made in SPARK-49025 to Delta.
How was this patch tested?
Existing tests.
Does this PR introduce any user-facing changes?
No.