-
Notifications
You must be signed in to change notification settings - Fork 327
fix: snowflake query string builder should follow timezone information from Arrow. #2962
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
Conversation
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
1 similar comment
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
✅ I finished the code review, and didn't find any security or code quality issues. |
1 similar comment
✅ I finished the code review, and didn't find any security or code quality issues. |
Hi Thank you for the contribution. We're you able to test this via Athena? |
Requested a member of the Trianz team to also test this out. |
Hi, can you provide a repro of how to trigger this issue from Athena? Trianz team was not able to hit this codepath at all. |
Hi @ZhitongYan can you pls take a look at my question above? |
I did not tested in Athena Console, but was running unit tests in my fresh workspace with system default timezone which led to the unit tests failures. |
closing in favor of: #2997 |
Issue #, if available:
N/A (or add issue number if there's a related GitHub issue)
Description of changes:
Fix timezone handling in Snowflake connector timestamp formatting for WHERE clauses
Problem:
The SnowflakeQueryStringBuilder was not respecting timezone information when formatting timestamps for SQL WHERE clauses. This could lead to incorrect query results when timestamp data includes timezone information, as the formatter would use the system default timezone instead of the data's actual timezone.
Solution:
Changes:
getObjectForWhereClause()
method inSnowflakeQueryStringBuilder.java
to handle timezone-aware timestamp formattingTesting:
Added unit tests to verify correct timestamp formatting across different timezone scenarios, ensuring the formatted timestamps reflect the proper timezone conversion.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.