tshauck opened a new issue, #516: URL: https://github.com/apache/datafusion-comet/issues/516
### What is the problem the feature request solves? It's come up a couple of times recently that expressions need scalar tests, but it's not clear it's possible to have Comet execute something like `SELECT trim('123 ')`. Doing a little digging, I think it's because in Spark these queries include `OneRowRelation` as the scan, which isn't supported by Comet. ``` spark-sql (default)> SELECT trim('123 '); 24/06/04 10:37:51 WARN CometSparkSessionExtensions$CometExecRule: Comet cannot execute some parts of this plan natively because Scan OneRowRelation is not supported 123 Time taken: 0.066 seconds, Fetched 1 row(s) ``` My thinking is that if this SparkPlan is supported, then it should be possible to run scalar queries. If this isn't the case, then feel free to close this issue. ### Describe the potential solution Happy to pursue a different approach if there's a better one, but I wanted to open this issue first to see if it's a problem and if this is an appropriate solution. Potential solution: 1. `OneRowRelation` (which is an `RDDScanExec`) could be implemented a native operator. DataFusion has a similar [`PlaceHolderExec`](https://github.com/apache/datafusion/blob/1c85d6abd46fd37fc5f6af8e558f19049c73de4c/datafusion/physical-plan/src/placeholder_row.rs#L41). 2. Update https://github.com/apache/datafusion-comet/blob/a668a8657a16496781075a014c6009d038c3fa1b/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala#L299-L712 to match on a ProjectExec with a `OneRowRelation` child scan, and have it use the aforementioned operator. ### 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