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

   <!-- 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 #16356.
   
   ### Description
   the dependence calcite [cr](https://github.com/apache/calcite/pull/3821) 
need to be review and approved first
   the root case is that the operator is SqlFunction, but in the map, the key 
instance is SqlJsonObjectFunction, the type is not equals, so we can naver get 
from the map in the following code:
   ```
    public @Nullable RexCallImplementor get(final SqlOperator operator) {
       if (operator instanceof SqlUserDefinedFunction) {
         org.apache.calcite.schema.Function udf =
             ((SqlUserDefinedFunction) operator).getFunction();
         if (!(udf instanceof ImplementableFunction)) {
           throw new IllegalStateException("User defined function " + operator
               + " must implement ImplementableFunction");
         }
         CallImplementor implementor =
             ((ImplementableFunction) udf).getImplementor();
         return wrapAsRexCallImplementor(implementor);
       } else if (operator instanceof SqlTypeConstructorFunction) {
         return map.get(SqlStdOperatorTable.ROW);
       }
       return map.get(operator);
     }
   ```
   
   #### Fixed the bug ...
   #### Release note
   Fix the SQL JSON_OBJECT() function results in RUNTIME_FAILURE when querying 
INFORMATION_SCHEMA.COLUMNS
   
   
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * `NestedDataOperatorConversions.java`
   
   <hr>
   
   
   
   This PR has:
   
   - [x] been self-reviewed.
      - [ ] using the [concurrency 
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
 (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [ ] 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.
   - [ ] added integration tests.
   - [ ] 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