chenyuzhi459 opened a new pull request #11060:
URL: https://github.com/apache/druid/pull/11060


   <!-- Thanks for trying to help us make Apache Druid be the best it can be! 
Please fill out as much of the following information as is possible (where 
relevant, and remove it when irrelevant) to help make the intention and scope 
of this PR clear in order to ease review. -->
   
   <!-- Please read the doc for contribution 
(https://github.com/apache/druid/blob/master/CONTRIBUTING.md) before making 
this PR. Also, once you open a PR, please _avoid using force pushes and 
rebasing_ since these make it difficult for reviewers to see what you've 
changed in response to their reviews. See [the 'If your pull request shows 
conflicts with master' 
section](https://github.com/apache/druid/blob/master/CONTRIBUTING.md#if-your-pull-request-shows-conflicts-with-master)
 for more details. -->
   
   Fixes #11038.
   
   
   
   ### Description
   When we use `lookup` func in sql, we will  return null value if we don't 
found. However, in 
`org.apache.druid.sql.calcite.expression.builtin.QueryLookupOperatorConversion`,
 it's returnType was defined as `returnTypeNonNull`, which casue a validation 
error in calcites.
   
   
   ### Solution
   Change lookup func's return as nullable with `returnTypeNonNull`.
   
   ##### Key changed/added classes in this PR
    * 
`org.apache.druid.sql.calcite.expression.builtin.QueryLookupOperatorConversion`
   <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]
   - [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.

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