parthchandra opened a new issue, #2038: URL: https://github.com/apache/datafusion-comet/issues/2038
### Describe the bug One of the queries in the clickbench suite fails with ``` org.apache.comet.CometNativeException: InternalError: Native cast invoked for unsupported cast from Utf8 to Dictionary(Int32, Utf8). ``` Original report: https://github.com/apache/datafusion-comet/issues/2035 Reproducing the issue ( from https://github.com/apache/datafusion-comet/issues/2035#issuecomment-3090665542): > Download data from https://datasets.clickhouse.com/hits_compatible/hits.parquet > Then in spark-shell - > > ``` > scala> spark.read.parquet("file:///Users/parth/data/clickbench/hits.parquet").createOrReplaceTempView("hits"); > scala> spark.sql("SELECT TraficSourceID, SearchEngineID, AdvEngineID, CASE WHEN (SearchEngineID = 0 AND AdvEngineID = 0) THEN Referer ELSE '' END AS Src, URL AS Dst, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND IsRefresh = 0 GROUP BY TraficSourceID, SearchEngineID, AdvEngineID, Src, Dst ORDER BY PageViews DESC LIMIT 10 OFFSET 1000").show() > ``` A second issue may exist. The planning ends up with a `LocalTableScan` and that causes the query to fallback to Spark ``` scala> spark.sql("SELECT TraficSourceID, SearchEngineID, AdvEngineID, CASE WHEN (SearchEngineID = 0 AND AdvEngineID = 0) THEN Referer ELSE '' END AS Src, URL AS Dst, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 GROUP BY TraficSourceID, SearchEngineID, AdvEngineID, Src, Dst ORDER BY PageViews DESC LIMIT 10 OFFSET 1000").show() 25/07/18 13:40:04 WARN CometExecRule: Comet cannot execute some parts of this plan natively (set spark.comet.explainFallback.enabled=false to disable this logging): LocalTableScan [COMET: LocalTableScan is not supported] +--------------+--------------+-----------+---+---+---------+ |TraficSourceID|SearchEngineID|AdvEngineID|Src|Dst|PageViews| +--------------+--------------+-----------+---+---+---------+ +--------------+--------------+-----------+---+---+---------+ ``` ### Steps to reproduce _No response_ ### Expected behavior _No response_ ### Additional context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org