Skip to content

[VL] Enable Spark legacy date formatter if spark.sql.legacy.timeParserPolicy is set to 'LEGACY'#7375

Merged
rui-mo merged 2 commits intoapache:mainfrom
NEUpanning:support_spark_legacy_parser
Oct 14, 2024
Merged

[VL] Enable Spark legacy date formatter if spark.sql.legacy.timeParserPolicy is set to 'LEGACY'#7375
rui-mo merged 2 commits intoapache:mainfrom
NEUpanning:support_spark_legacy_parser

Conversation

@NEUpanning
Copy link
Copy Markdown
Contributor

@NEUpanning NEUpanning commented Sep 27, 2024

What changes were proposed in this pull request?

Velox#10966 introduced simple date time formatter that aligns with Spark legacy date parsing/formatting behavior. This PR enables Velox simple date time formatter if spark.sql.legacy.timeParserPolicy is set to LEGACY.

Relates Velox issue: #10354

How was this patch tested?

Integration tests with Spark

@github-actions github-actions bot added CORE works for Gluten Core VELOX labels Sep 27, 2024
@github-actions
Copy link
Copy Markdown

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/apache/incubator-gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI

@NEUpanning
Copy link
Copy Markdown
Contributor Author

@rui-mo Could you help to take a look please? Thanks.


// Enable Spark legacy date formatter if spark.sql.legacy.timeParserPolicy is set to 'LEGACY'.
if (veloxCfg_->get<std::string>(kSparkLegacyTimeParserPolicy, "") == "LEGACY") {
configs[velox::core::QueryConfig::kSparkLegacyDateFormatter] = "true";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to set this config as false if 'kSparkLegacyTimeParserPolicy' is not 'LEGACY'?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your feedback. It is necessary to do this. Updated.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 9, 2024

Run Gluten Clickhouse CI

@NEUpanning
Copy link
Copy Markdown
Contributor Author

@rui-mo Could you help to merge this PR? Thanks.

@rui-mo rui-mo merged commit d6e048a into apache:main Oct 14, 2024
@surnaik
Copy link
Copy Markdown
Contributor

surnaik commented Nov 6, 2024

@NEUpanning does this work for spark properties
spark.sql.legacy.parquet.int96RebaseModeInRead=LEGACY
and spark.sql.legacy.parquet.datetimeRebaseModeInRead=LEGACY

@NEUpanning
Copy link
Copy Markdown
Contributor Author

NEUpanning commented Nov 7, 2024

@surnaik No, this PR only works for spark.sql.legacy.timeParserPolicy

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

Labels

CORE works for Gluten Core VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants