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

   ## Which issue does this PR close?
   
   N/A - Documentation improvement
   
   ## Rationale for this change
   
   When testing expressions with literal values (e.g., `SELECT 
my_func('literal')`), Spark's constant folding optimizer may evaluate the 
expression at planning time rather than execution time. This means the Comet 
implementation might not actually be exercised during the test, leading to 
false confidence in test coverage.
   
   ## What changes are included in this PR?
   
   Adds a new "Testing with Literal Values" section to the contributor guide 
for adding new expressions, explaining:
   - Why constant folding can cause issues with literal tests
   - How to disable constant folding using `SQLConf.OPTIMIZER_EXCLUDED_RULES`
   - When this is particularly important (edge cases, special values)
   - The recommendation to prefer column references when possible
   
   ## How are these changes tested?
   
   Documentation only - no code changes.
   
   ---
   > **Note:** This PR was generated with AI assistance.


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