-
Notifications
You must be signed in to change notification settings - Fork 220
Add test window function to ReadByFormatIntegrationTestBase #1447
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
Add test window function to ReadByFormatIntegrationTestBase #1447
Conversation
…for public GA4 dataset
Summary of ChangesHello @yalimu-g, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new integration test to the BigQuery Spark connector's test suite. The primary goal is to confirm that Spark SQL's window functions, particularly those involving Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request adds an integration test for using a window function on a DataFrame read from BigQuery. The implementation is mostly correct, but the window specification can be improved for readability and to ensure the test is deterministic. I've suggested using column names directly in partitionBy and ordering by a specific column instead of a literal to make the test more robust.
...c/test/java/com/google/cloud/spark/bigquery/integration/ReadByFormatIntegrationTestBase.java
Outdated
Show resolved
Hide resolved
|
/gcbrun |
|
/gcbrun |
|
/gcbrun |
| } | ||
|
|
||
| @Test | ||
| public void testWindowFunctionPartitionBy_withAVRO() { |
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.
The readDataFormat is controlled by the dataFormat variable, this method is redundant
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.
Yeah, all the tests called this provided with "ARROW" format. This function is to answer the Issue 's question and prove that the "AVRO" format works with overriding the dataFormat in this case. Please let me know if you think we should remove or refactor.
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.
Yes, this should be controlled by Parameterized tests (https://github.com/junit-team/junit4/wiki/parameterized-tests)
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.
Added the parameterized tests in Spark35ReadByFormatIntegrationTest.
|
/gcbrun |
|
/gcbrun |
Add test window function to ReadByFormatIntegrationTestBase