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

   Add support for SQL queries that have `WITH ... AS` subquery block in 
explain plan queries:
   ```sql
   EXPLAIN PLAN FOR
   INSERT INTO "foo"
   WITH extern_tab AS (
   SELECT * FROM TABLE(
     EXTERN(
       '{"type":"inline","data":"{\" \": 1681794225551, \"namespace\": 
\"day1\", \"country\": \"country1\"}\n{\"__time\": 1681794225558, 
\"namespace\": \"day2\", \"country\": \"country2\"}"}',
       '{"type":"json"}',
       
'[{"name":"__time","type":"long"},{"name":"namespace","type":"string"},{"name":"country","type":"string"}]'
     )
   ))
   SELECT
    __time,
     namespace,
     country
   FROM extern_tab
   PARTITIONED BY ALL
   CLUSTERED BY 2, 3
   ```
   
   Also, validate the source node only when ordinals are specified. 
   
   ##### Key changed/added classes in this PR
    * `DruidSqlParserUtils.java`
    * `DruidSqlParserUtilsTest.java`
    * `CalciteInsertDmlTest.java`
   
   
   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