-
Notifications
You must be signed in to change notification settings - Fork 237
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
Add missing json reader options for JsonScanRetrySuite #11898
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,10 @@ | |
|
||
package com.nvidia.spark.rapids | ||
|
||
import ai.rapids.cudf.JSONOptions | ||
import com.nvidia.spark.rapids.jni.RmmSpark | ||
|
||
import org.apache.spark.sql.catalyst.json.rapids.JsonPartitionReader | ||
import org.apache.spark.sql.rapids.GpuJsonReadCommon | ||
import org.apache.spark.sql.types._ | ||
|
||
class JsonScanRetrySuite extends RmmSparkRetrySuiteBase { | ||
|
@@ -29,7 +29,7 @@ class JsonScanRetrySuite extends RmmSparkRetrySuiteBase { | |
|
||
val cudfSchema = GpuColumnVector.from(StructType(Seq(StructField("a", IntegerType), | ||
StructField("b", IntegerType)))) | ||
val opts = JSONOptions.builder().withLines(true).build() | ||
val opts = GpuJsonReadCommon.baseCudfJsonOptionsBuilder().withLines(true).build() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should do that in a separate PR. I'd like to keep the change of this PR minimized. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But you already changed the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am modifying the code in this function without functionality change. Your suggestion changes its behavior which may or may not impact other tests. Given that this test failure is blocking all PRs, I think it's better to make that change in a different PR without unnecessarily blocking others further. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created #11899. |
||
RmmSpark.forceRetryOOM(RmmSpark.getCurrentThreadId, 1, | ||
RmmSpark.OomInjectionType.GPU.ordinal, 0) | ||
val table = JsonPartitionReader.readToTable(bufferer, cudfSchema, NoopMetric, | ||
|
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.
I feel that this name can be something better but don't know what 😃
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.
Can you elaborate? From what perspective can it be better? Like readability? brevity?
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.
What is "base" and why? The builder is not final and not a "base" for something. It is just the builder, with some options set, and before we pass in more options. So I don't like to have "base" in it. But I don't have a better name for it.
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.
I see. I used "base" to imply that it has default options. How about
cudfJsonOptionsBuilderWithDefaults()
? Is that better? It's little long though.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.
defaultJsonOptionsBuilder
? No need to have such long name.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.
Thanks. I like the name, but want to have
cudf
in it as there are two differentJSONOptions
, one for cudf and another for catalyst. I will rename it todefaultCudfJsonOptionsBuilder
in #11899.