scala> Seq("infinity ", "Infinity ", "+Inf ").toDF.coalesce(1).selectExpr("cast(value as float)").collect()
24/05/10 12:02:57 WARN GpuOverrides:
*Exec <ProjectExec> will run on GPU
*Expression <Alias> cast(value#1 as float) AS value#5 will run on GPU
*Expression <Cast> cast(value#1 as float) will run on GPU
*Exec <CoalesceExec> will run on GPU
! <LocalTableScanExec> cannot run on GPU because GPU does not currently support the operator class org.apache.spark.sql.execution.LocalTableScanExec
@Expression <AttributeReference> value#1 could run on GPU
res0: Array[org.apache.spark.sql.Row] = Array([null], [null], [null])
The actual value that the UT caught is
infinity
but it boils down to the trailing spaceRepro:
GPU:
CPU: