You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala> val df = Seq(Array(1, 2, 3)).toDF("a")
scala> df.write.mode("OVERWRITE").parquet("TEMP")
scala> val df2 = spark.read.parquet("TEMP")
scala> df2.select(to_json($"a")).show()
24/05/25 05:34:56 WARN GpuOverrides:
!Exec <CollectLimitExec> cannot run on GPU because the Exec CollectLimitExec has been disabled, and is disabled by default because Collect Limit replacement can be slower on the GPU, if huge number of rows in a batch it could help by limiting the number of rows transferred from GPU to CPU. Set spark.rapids.sql.exec.CollectLimitExec to true if you wish to enable it
@Partitioning <SinglePartition$> could run on GPU
*Exec <ProjectExec> will run on GPU
*Expression <Alias> to_json(a#41, Some(UTC)) AS to_json(a)#47 will run on GPU
*Expression <StructsToJson> to_json(a#41, Some(UTC)) will run on GPU
*Exec <FileSourceScanExec> will run on GPU
24/05/25 05:34:56 ERROR Executor: Exception in task 0.0 in stage 11.0 (TID 11)
java.lang.ClassCastException: org.apache.spark.sql.types.ArrayType cannot be cast to org.apache.spark.sql.types.StructType
at org.apache.spark.sql.rapids.GpuStructsToJson.doColumnar(GpuStructsToJson.scala:86)
at com.nvidia.spark.rapids.GpuUnaryExpression.doItColumnar(GpuExpressions.scala:250)
at com.nvidia.spark.rapids.GpuUnaryExpression.$anonfun$columnarEval$1(GpuExpressions.scala:261)
at com.nvidia.spark.rapids.Arm$.withResource(Arm.scala:30)
at com.nvidia.spark.rapids.GpuUnaryExpression.columnarEval(GpuExpressions.scala:260)
at com.nvidia.spark.rapids.RapidsPluginImplicits$ReallyAGpuExpression.columnarEval(implicits.scala:35)
at com.nvidia.spark.rapids.GpuAlias.columnarEval(namedExpressions.scala:110)
at com.nvidia.spark.rapids.RapidsPluginImplicits$ReallyAGpuExpression.columnarEval(implicits.scala:35)
at com.nvidia.spark.rapids.GpuProjectExec$.$anonfun$project$1(basicPhysicalOperators.scala:110)
at com.nvidia.spark.rapids.RapidsPluginImplicits$MapsSafely.$anonfun$safeMap$1(implicits.scala:221)
at com.nvidia.spark.rapids.RapidsPluginImplicits$MapsSafely.$anonfun$safeMap$1$adapted(implicits.scala:218)
at scala.collection.immutable.List.foreach(List.scala:431)
at com.nvidia.spark.rapids.RapidsPluginImplicits$MapsSafely.safeMap(impli
The text was updated successfully, but these errors were encountered:
Feng-Jiang28
changed the title
to_json - array of primitive types
Converting an colunn containing an Array into JSON format throws an exception
May 25, 2024
Feng-Jiang28
changed the title
Converting an colunn containing an Array into JSON format throws an exception
Converting an colunn containing an array into json throws an exception
May 25, 2024
GaryShen2008
changed the title
Converting an colunn containing an array into json throws an exception
Converting an column containing an array into json throws an exception
Jul 5, 2024
Converting an colunn containing an array into json format throws an exception.
Reproduce:
CPU:
GPU:
The text was updated successfully, but these errors were encountered: