Skip to content

Commit

Permalink
Fix bug in tagging of JsonToStructs (#9761)
Browse files Browse the repository at this point in the history
* Fix bug in tagging of JsonToStructs

* signoff

Signed-off-by: Andy Grove <[email protected]>

---------

Signed-off-by: Andy Grove <[email protected]>
  • Loading branch information
andygrove authored Nov 17, 2023
1 parent cdf1bda commit 1f76b49
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3576,7 +3576,7 @@ object GpuOverrides extends Logging {
(TypeSig.STRUCT + TypeSig.MAP + TypeSig.ARRAY).nested(TypeSig.all),
Seq(ParamCheck("jsonStr", TypeSig.STRING, TypeSig.STRING))),
(a, conf, p, r) => new UnaryExprMeta[JsonToStructs](a, conf, p, r) {
override def tagExprForGpu(): Unit =
override def tagExprForGpu(): Unit = {
a.schema match {
case MapType(_: StringType, _: StringType, _) => ()
case _: StructType => ()
Expand All @@ -3585,6 +3585,7 @@ object GpuOverrides extends Logging {
"or StructType schema")
}
GpuJsonScan.tagJsonToStructsSupport(a.options, this)
}

override def convertToGpu(child: Expression): GpuExpression =
// GPU implementation currently does not support duplicated json key names in input
Expand Down

0 comments on commit 1f76b49

Please sign in to comment.