andygrove commented on code in PR #671:
URL: https://github.com/apache/datafusion-comet/pull/671#discussion_r1681640222


##########
spark/src/test/resources/tpcds-micro-benchmarks/add_many_decimals.sql:
##########
@@ -0,0 +1,34 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+-- This is testing the cost of a complex expression that will create many 
intermediate arrays in Comet

Review Comment:
   the query includes an expression adding many columns e.g. `a+b+c+d...` and 
we will compute this by recursively computing binary expressions and creating 
an intermediate array for each one, something like:
   
   ```
   temp1 = a+b
   temp2 = temp1+c
   temp3 = temp2+d
   ...
   ```
   
   The Spark version will generate and compile code that just performs 
`a+b+c+d..` without creating intermediate output.
   
   We could potentially explore using jit or introduce specialized expressions 
that re-use intermediate buffers in some cases.
   
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to