parthchandra opened a new pull request, #3915:
URL: https://github.com/apache/datafusion-comet/pull/3915

   ## Which issue does this PR close?
   
   Running TPC-DS resulted in a schema mismatch error in q36a-v2.7
   
   
   ## Rationale for this change
   
   The golden file for TPC-DS v2.7 query q36a was originally generated against 
Spark 3.4, where DecimalPrecisionTypeCoercion.bounded() simply clamped 
precision/scale to the maximum (min(p, 38), min(s, 38)). This caused the UNION 
of decimal(37,20) and decimal(38,11) (the two branches of results_rollup) to 
widen to decimal(38,20).                                                        
                                                                                
                                                                                
                                                               
                                                                                
                                                                                
                                                                                
                                                                  
   [SPARK-45905](https://issues.apache.org/jira/browse/SPARK-45905) changed the 
decimal least-common-type algorithm to prefer retaining integral digits over 
fractional digits when precision exceeds 38. The same UNION now correctly 
widens to decimal(38,11). Apache Spark's own  TPCDSQueryTestSuite golden file 
reflects this.          
   
   ## What changes are included in this PR?
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                       
   This regenerates the Comet golden file against Spark 4 to match the updated 
behavior.  Also, decimal tests now also check that the schema matches with the 
one output by Spark.
   
   ## How are these changes tested?
   
   Running TPC-DS queries in `CometTPCDSQueryBenchmark`. Also unit tests.


-- 
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