-
Notifications
You must be signed in to change notification settings - Fork 173
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: Improve testing for array_remove and fallback to Spark for unsupported types #1308
base: main
Are you sure you want to change the base?
Conversation
@@ -141,4 +146,154 @@ class DataGenerator(r: Random) { | |||
Range(0, num).map(_ => generateRow(schema, stringGen)) | |||
} | |||
|
|||
private val primitiveTypes = Seq( |
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.
This code is copied moved from the fuzz testing tool
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1308 +/- ##
============================================
+ Coverage 34.69% 34.91% +0.22%
+ Complexity 991 989 -2
============================================
Files 116 119 +3
Lines 44891 45204 +313
Branches 9864 9959 +95
============================================
+ Hits 15574 15785 +211
- Misses 26168 26253 +85
- Partials 3149 3166 +17 ☔ View full report in Codecov by Sentry. |
@@ -2660,4 +2660,19 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper { | |||
} | |||
} | |||
|
|||
test("array_intersect") { |
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 PR title says array_remove
but the test is for array-intersect
?
Or other places that we already have tests?
fuzz-testing/src/main/scala/org/apache/comet/fuzz/QueryRunner.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Liang-Chi Hsieh <[email protected]>
r, | ||
spark, | ||
s"test$i.parquet", | ||
numRows = conf.generateData.numRows(), |
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.
numRows
is for all rows from all generated files or for one single file? Do we have definition for it?
Which issue does this PR close?
Closes #1307
Rationale for this change
This PR fixes a specific bug and provides an approach for solving a general problem where we are not checking for supported types when translating expressions to native.
What changes are included in this PR?
array_remove
and related testsHow are these changes tested?