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

   ### Description
   Fixes a bug that can occur when using vectorized `JSON_VALUE` to extract a 
numeric type but a nested field contains array types in any rows. The least 
restrictive type would make the vector object selector for the field spit out 
arrays for every value, but the value selector coercion to scalar was not 
handling arrays so would result in all values being null.
   
   Fixed by re-using the same 'convert array to scalar' object selector wrapper 
used by `makeVectorObjectSelector` to handle coercing the single element array 
values back to scalar values to be consistent with other druid single element 
array handling.
   
   Added test to cover this case that fails without the fix, as well as a test 
to capture odd behavior of using `COUNT(JSON_VALUE(...))` when the field 
contains arrays (the array rows are not counted unless `RETURNING .. ARRAY` is 
used).


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