Skip to content
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] Honor codegen configs in DataSkippingStatsTracker #4120

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LukasRupprecht
Copy link
Collaborator

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

This PR uses MutableProjection.create instead of directly generating the MutableProjection via GeneratMutableProjection.generate. As the latter forces codegen, it can fail if the generated code is too large, which, e.g., can happen for very wide schemas. The new code uses the correct Spark API to automatically fall back to an InterpretedMutableProjection if codegen fails for any reason.

How was this patch tested?

This PR just uses the correct, higher-level API call to create a MutableProjection so existing tests are sufficient.

Does this PR introduce any user-facing changes?

No

Copy link
Collaborator

@scovich scovich left a comment

Choose a reason for hiding this comment

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

Nice stability fix!

Comment on lines 91 to 92
val expressions = JoinedProjection.bind(
aggBufferAttrs, dataCols, aggregates.flatMap(_.updateExpressions))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tiny nit -- while we're cleaning up the nesting, it may be worth cleaning up all the way, for maximum readability?

Suggested change
val expressions = JoinedProjection.bind(
aggBufferAttrs, dataCols, aggregates.flatMap(_.updateExpressions))
val aggs = aggregates.flatMap(_.updateExpressions)
val expressions = JoinedProjection.bind(aggBufferAttrs, dataCols, aggs)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

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.

2 participants