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

   ### Description
   Changes vectorized string expressions (such as concat) to deal in `Object[]` 
instead of `String[]`, to be consistent with the behavior of 
`VectorObjectSelector`, as well as with a similar change I did recently to 
array expressions in #12914.
   
   This fixes a class of bugs such as in the added test example, which would 
fail with an error of the form:
   ```
       Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be 
cast to [Ljava.lang.String;
        at 
org.apache.druid.math.expr.IdentifierExpr$4.evalVector(IdentifierExpr.java:198) 
~[classes/:?]
        at 
org.apache.druid.math.expr.vector.StringOutMultiStringInVectorProcessor.evalVector(StringOutMultiStringInVectorProcessor.java:58)
 ~[classes/:?]
        at 
org.apache.druid.segment.virtual.ExpressionVectorObjectSelector.getObjectVector(ExpressionVectorObjectSelector.java:49)
 ~[classes/:?]
   ```
   
   before the changes in this patch.
   
   <hr>
   This PR has:
   
   - [x] been self-reviewed.
   - [x] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [x] been tested in a test Druid cluster.
   


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