-
Notifications
You must be signed in to change notification settings - Fork 169
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: Comet should not fail on negative limit parameter #288
Conversation
test("offset") { | ||
assume(isSpark34Plus, "Dataset.offset is not available before Spark 3.4") | ||
withSQLConf(CometConf.COMET_COLUMNAR_SHUFFLE_ENABLED.key -> "true") { | ||
checkSparkAnswer(testData.offset(90)) | ||
checkSparkAnswer(arrayData.toDF().offset(99)) | ||
checkSparkAnswer(mapData.toDF().offset(99)) | ||
} |
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.
Hmm, Dataset.offset
is a 3.4+ API. isSpark34Plus
cannot make this test buildable with 3.2/3.3. 🤔
// Dataset.offset API is not available before Spark 3.4 | ||
test("offset") { | ||
withSQLConf(CometConf.COMET_COLUMNAR_SHUFFLE_ENABLED.key -> "true") { | ||
checkSparkAnswer(testData.offset(90)) | ||
checkSparkAnswer(arrayData.toDF().offset(99)) | ||
checkSparkAnswer(mapData.toDF().offset(99)) | ||
} | ||
} |
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.
Because Dataset.offset
API is only available on Spark 3.4+. I cannot have this test in CometExecSuite
which will be built in Spark 3.2 and 3.3. So I move it to a 3.4 specific test suite.
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.
LGTM
override protected def test(testName: String, testTags: Tag*)(testFun: => Any)(implicit | ||
pos: Position): Unit = { |
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.
Nit: the indentation looks weird.
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.
Fixed.
Merged. Thanks. |
* fix: Comet should not fail on negative limit parameter * Move test
Which issue does this PR close?
Closes #287.
Rationale for this change
What changes are included in this PR?
How are these changes tested?