You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/06/27 01:41:22 UTC

[GitHub] [incubator-druid] clintropolis opened a new pull request #7974: more sql support for expression array functions

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org