Conversation
864a25f to
92a7867
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2897 +/- ##
============================================
+ Coverage 56.12% 59.53% +3.40%
- Complexity 976 1376 +400
============================================
Files 119 167 +48
Lines 11743 15496 +3753
Branches 2251 2569 +318
============================================
+ Hits 6591 9225 +2634
- Misses 4012 4971 +959
- Partials 1140 1300 +160 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Created #2914 for the failed test |
|
Submitted #2916 to fix the failed test. |
92a7867 to
5f7b017
Compare
|
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days. |
5f7b017 to
9c99e19
Compare
d9770c7 to
fae74f6
Compare
|
Taking a look |
|
@coderfender Sorry, there are more test failures that I need to fix first. |
b93600c to
b73aff5
Compare
|
@coderfender It's ready for review now. |
|
@manuzhang , Thank you the code / feature looks good over all to me. It would be great if we could add some more comprehensive tests both on spark and rust side (including different data types, eval modes , edge cases etc) and benchmarks (can be a follow up PR too). Thank you |
coderfender
left a comment
There was a problem hiding this comment.
added few minor comments but PR looks good overall
parthchandra
left a comment
There was a problem hiding this comment.
+1 for adding the tests requested by @coderfender
|
I'll add more DataTypes to the test once #3768 is resolved. |
|
Sure @manuzhang |
74a608e to
47186ca
Compare
parthchandra
left a comment
There was a problem hiding this comment.
This is looking good. Some minor comments.
| testArrayCastMatrix(types, ArrayType(_), generateArrays(100, _)) | ||
| } | ||
|
|
||
| ignore("cast nested ArrayType to nested ArrayType") { |
There was a problem hiding this comment.
Is there a github issue for this? Can we reference it here to document why it is being ignored?
| (fromType, toType) match { | ||
| case (dt: ArrayType, _: ArrayType) if dt.elementType == NullType => Compatible() | ||
| case (ArrayType(DataTypes.DateType, _), ArrayType(toElementType, _)) | ||
| if toElementType != DataTypes.StringType && |
There was a problem hiding this comment.
Shouldn't DateType -> IntegerType (and maybe others) be possible too?
| CometCast.isSupported(fromWrappedType, toWrappedType, None, CometEvalMode.TRY) == | ||
| Compatible() | ||
| castTest( | ||
| generateInput(fromType), |
There was a problem hiding this comment.
minor: we can probably call generateInput once in the outer loop
| val fromWrappedType = wrapType(fromType) | ||
| val toWrappedType = wrapType(toType) | ||
| if (fromType != toType && | ||
| testNames.contains(name) && |
47186ca to
460aa7e
Compare
Which issue does this PR close?
Part of #2766
Rationale for this change
What changes are included in this PR?
native/spark-expr/src/conversion_funcs/cast.rs.native/spark-expr/src/conversion_funcs/cast.rs.spark/src/test/scala/org/apache/comet/CometCastSuite.scala, with shared matrix logic for flat and nested arrays.spark/src/test/scala/org/apache/comet/CometCastSuite.scalawith edge cases, reused date/timestamp/binary sources, and bounded float/double/long values to avoid timestamp overflow.spark/src/test/scala/org/apache/comet/CometCastSuite.scalaby ordering on a synthetic row id.spark/src/main/scala/org/apache/comet/expressions/CometCast.scalato stop unsupported Array[Date] casts from reaching native.How are these changes tested?
Added tests.
Co-authored-by: @codex