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

   ### Description
   This PR fixes an issue when filtering on a `NestedFieldVirtualColumn` that 
is using an input column that is not a nested column, such as a standard 
string, long, float, or double column. #13732 updated 
`NestedFieldVirtualColumn` to be permissive and still able to create selectors 
when used with other column types, but I forgot to add this handling to the 
`getIndexSupplier` method, so attempting to filter these columns with a filter 
which would typically use an index, would result in an exception being thrown 
about the column being the wrong type, something like 
   
   ```
   Column [__time] is invalid type, found [class 
org.apache.druid.segment.column.LongsColumn] instead of 
[NestedDataComplexColumn]
   ```
   
   This PR fixes this method to use the same logic as the selector methods, 
returning the underlying columns index supplier directly if selecting the 
'root' path, else null as if the column didn't exist.
   
   <hr>
   This PR has:
   
   - [x] been self-reviewed.
   - [x] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [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