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

Chore: Cleanup how datafusion session config is created #289

Merged
merged 2 commits into from
Apr 20, 2024

Conversation

psvri
Copy link
Contributor

@psvri psvri commented Apr 19, 2024

Which issue does this PR close?

Rationale for this change

Rather than cloning the strings, inserting into map and creating session config from it. The current approach just sets these values manually. This way we avoid creating a few temporary strings and data structures.

What changes are included in this PR?

Reworked the way datafusion session config is created.

How are these changes tested?

Ensured github ci passes in my forked repo.

Comment on lines 219 to 221
// Get Datafusion configuration from Spark Execution context
// can be configured in Comet Spark JVM using Spark --conf parameters
// e.g: spark-shell --conf spark.datafusion.sql_parser.parse_float_as_decimal=true
Copy link
Member

Choose a reason for hiding this comment

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

Could you keep this comment? It doesn't related to how the configs are read into session config but a general description what they come from.

Copy link
Contributor Author

@psvri psvri Apr 19, 2024

Choose a reason for hiding this comment

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

Okay, will add them back

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added them in commit dd573e2

@viirya
Copy link
Member

viirya commented Apr 19, 2024

Thanks for this PR. I have one comment about keeping original code comment.

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Thanks @psvri

@sunchao sunchao merged commit 7f22f25 into apache:main Apr 20, 2024
28 checks passed
@psvri psvri deleted the minor_cleanup branch April 25, 2024 16:30
himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
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.

4 participants