paul-rogers commented on pull request #2259:
URL: https://github.com/apache/drill/pull/2259#issuecomment-872627197


   Thanks @Leon-WTF for the very clear explanation: you clearly did your 
homework and understand Calcite. I agree that your fix is the correct one 
short-term. Given that Drill (incorrectly) makes the function nullable at 
times, it does make sense to include the type in the lookup check.
   
   It is true that there are times when the function can return a `NULL` 
result. The code is probably confusing the fact that the *output* can be 
nullable (if all inputs are `NULL`, say) vs. the fact that the calculation 
itself is not nullable. This seems like a rather complex mess to clean up, and 
is best left for later. There is little harm, for now, in having two copies of 
the function. Someone can fix the issue when they need to squeeze the ultimate 
performance out of the computation.


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