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 build regression against Spark 3.2.x [databricks] #10179

Merged
merged 4 commits into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object GpuJsonToStructsShim {
}

def castJsonStringToDate(input: ColumnVector, options: Map[String, String]): ColumnVector = {
// dateFormat is ignored in from_json in Spark 3.2
// dateFormat is ignored in from_json in Spark 3.2.x and 3.3.x
withResource(Scalar.fromString(" ")) { space =>
withResource(input.strip(space)) { trimmed =>
GpuCast.castStringToDate(trimmed)
Expand Down Expand Up @@ -82,8 +82,8 @@ object GpuJsonToStructsShim {

def tagTimestampFormatSupport(meta: RapidsMeta[_, _, _],
timestampFormat: Option[String]): Unit = {
// we only support the case where no format is specified
timestampFormat.foreach(f => meta.willNotWorkOnGpu(s"Unsupported timestampFormat: $f"))
// timestampFormat is ignored by JsonToStructs in Spark 3.2.x and 3.3.x because it just
// performs a regular cast from string to timestamp
}

def castJsonStringToTimestamp(input: ColumnVector,
Expand Down