oap-project / gazelle_plugin

Native SQL Engine plugin for Spark SQL with vectorized SIMD optimizations.
Apache License 2.0
256 stars 77 forks source link

Fall back to use row-based operators, error is not currently supported: ansi_cast(id#1 as string) #1134

Open kobegy248 opened 1 year ago

kobegy248 commented 1 year ago

Is your feature request related to a problem or challenge? Please describe what you are trying to do. Fall back to use row-based operators, error is not currently supported: ansi_cast(id#1 as string)., original sparkplan is class org.apache.spark.sql.execution.ProjectExec(List(class org.apache.spark.sql.execution.FilterExec))

CREATE EXTERNAL TABLE IF NOT EXISTS default.test_string(id STRING) STORED AS ORC INSERT OVERWRITE TABLE default.test_string select id from gy_orc.test_int

Describe the solution you'd like Support AnsiCast

PHILO-HE commented 1 year ago

Yes, cast will become ansi_cast if spark.sql.ansi.enabled=true. Currently, we only have some ANSI support in casting string to numeric types, see ColumnarCast. But casting some types to string type in ANSI standard is not supported. We have no plan to fully support ANSI behaviors for all expressions. Technical discussions and code contributions are welcome! Thanks!