clintropolis opened a new pull request, #12857:
URL: https://github.com/apache/druid/pull/12857
### Description
Fixes `ExpressionPlan.inferColumnCapabilities`, which is used by native
`ExpressionVirtualColumn` to infer the output type from the input row
signature, and can play a role in determining the output row signature of a
query to correctly handle `COMPLEX` typed expressions (added in #11853). This
bug could cause incorrect behavior due to this method making default `STRING`
typed capabilities, causing incorrect selectors to be chosen, which for json
columns whose in process values are things like java `Map` to effectively be
calling `toString` on everything, which would the values to be strings
appearing like `'{a=A, b=1}'` instead of actual JSON `{"a":"A", "b":1}`.
The fix is just to add a short circuit for `COMPLEX` types so that the
default string capabilities are not used.
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]