clintropolis opened a new pull request #7974: more sql support for expression 
array functions
URL: https://github.com/apache/incubator-druid/pull/7974
 
 
   This PR continues the work laid out in #7525 and rounds out the remaining 
array function expressions not part of #7973, `array_length`, `array_offset`, 
`array_offset_of`, `array_ordinal`, `array_ordinal_of`, `array_append`, 
`array_prepend`, `array_concat`, `array_slice`, `array_to_string`, and 
`string_to_array`.
   
   `array_length`, `array_offset`, `array_offset_of`, `array_ordinal`, 
`array_ordinal_of`, and `array_to_string` are done as alias operator 
conversions, so both `MV_` and `ARRAY_` prefixed functions have been added to 
map the these druid expression functions. 
   
   `array_append`, `array_prepend`, `array_concat`, `array_slice`, and 
`string_to_array` produce array typed outputs, so only the `MV_` prefix which 
produce an sql `VARCHAR` have been implemented at this time (we don't handle 
sql `ARRAY` type fully at planner level at this time).
   
   Additionally, this PR fixes a bug in `array_offset_of` and 
`array_ordinal_of` when `-Ddruid.generic.useDefaultValueForNull=true` which 
would incorrectly translate a `null` response to `0` at the selector level. 
Instead, these functions will now return `-1` instead of `null` to not produce 
an incorrect answer.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to