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

fix: cast timestamp to decimal is unsupported #1281

Merged
merged 4 commits into from
Jan 14, 2025

Conversation

wForget
Copy link
Member

@wForget wForget commented Jan 14, 2025

Which issue does this PR close?

Closes #1280.

Rationale for this change

What changes are included in this PR?

Fix test case and mark cast timestamp to decimal as unsupported.

How are these changes tested?

unit test

@@ -838,8 +838,9 @@ class CometCastSuite extends CometTestBase with AdaptiveSparkPlanHelper {
castTest(generateTimestamps(), DataTypes.DoubleType)
}

test("cast TimestampType to DecimalType(10,2)") {
castTest(generateTimestamps(), DataTypes.TimestampType)
Copy link
Member Author

Choose a reason for hiding this comment

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

@andygrove This test case introduced in #356 looks incorrect. Could you please take a look?

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 for finding this @wForget

@andygrove
Copy link
Member

There is a test failure:

2025-01-14T14:27:25.3861150Z CometCastSuite:
2025-01-14T14:27:25.4393419Z - all valid cast combinations covered *** FAILED *** (13 milliseconds)

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.47%. Comparing base (be48839) to head (90fc866).
Report is 9 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##               main    #1281       +/-   ##
=============================================
+ Coverage     34.69%   57.47%   +22.78%     
+ Complexity      991      961       -30     
=============================================
  Files           116      113        -3     
  Lines         44891    11171    -33720     
  Branches       9864     2137     -7727     
=============================================
- Hits          15574     6421     -9153     
+ Misses        26168     3637    -22531     
+ Partials       3149     1113     -2036     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andygrove andygrove merged commit 9c1f0ee into apache:main Jan 14, 2025
74 checks passed
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.

Cast timestamp to decimal is unsupported
3 participants