gianm opened a new pull request, #18503:
URL: https://github.com/apache/druid/pull/18503

   PR #16366 originally added fallback vectorization, a mechanism for making 
all expressions vectorizable. Later, #17098 fixed some issues that arose and 
#17248 disabled fallback vectorization in the out-of-box configuration.
   
   This patch fixes various remaining issues with inconsistent type handling 
between the vectorized and nonvectorized expr implementations. It does not yet 
re-enable fallback vectorization out of the box, due to remaining 
inconsistencies with conditional exprs like "case_searched", "case_simple", and 
"if".
   
   1) Aligns the behavior of missing columns and literal nulls so they are
      always treated as null longs. This was already the case for vectorized
      identifiers, but non-vectorized identifiers and literal nulls were still
      represented as strings.
   
   2) Replaces all occurrences of "ExprEval.of(null)" with either an explicit
      type, or a call to "ExprEval.ofMissing()". ofMissing is a new function
      for situations where an eval represents a null value of unknown type.
      It is equivalent to "ExprEval.ofLong(null)", but is a separate function
      for clarity at the call site.
   
   3) Update "cast" to return the target type even for null values.
   
   4) Update "greatest", "least", and "array" so they eval to types that
      match what is reported by "getOutputType".
   
   5) Update "scalb" to coerce input strings as numbers, to better allow
      for type evolution and missing columns.
   
   6) Update "reverse" to coerce inputs to strings, to better allow for
      type evolution and missing columns.


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