letian-jiang commented on PR #3086:
URL: https://github.com/apache/drill/pull/3086#issuecomment-6063462661

   > 8. Hard-coded allowlist of literal-only function operands 
(PlanCacheParameterizer.java:142). Any function not on the list (format 
strings, scale arguments, new UDFs) gets a slot and fails planning because of 
https://github.com/apache/drill/pull/1. Could this come from operator operand 
metadata instead?
   
   This is a difficult problem, and I agree that a hard-coded list carries a 
maintenance risk. Given Drill’s current architecture, though, I don’t see a 
clearly better practical approach: DrillOptiq itself uses function-name 
switches for value-dependent rewrites, so the parameterizer needs explicit 
knowledge of which operands must remain literals. Moving this information into 
function metadata could improve organization, but would still require manually 
declaring and maintaining those rules. For now, I think keeping this list 
aligned with the existing rewrites and adding targeted regression tests is a 
reasonable approach, while acknowledging that it does not establish safety for 
every SQL pattern.


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

Reply via email to