pan3793 opened a new pull request #1974:
URL: https://github.com/apache/incubator-kyuubi/pull/1974
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in
https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your
PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g.,
'[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
This PR aims to support auto merge small files in multi insert statement,
for example
`FROM (SELECT * FROM VALUES(1) DOSTRIBUTE BY col1 ) INSERT INTO tmp1 SELECT
* INSERT INTO tmp2 SELECT *;`
will generate the following plan, `Union` is the root node instead of
`InsertIntoHiveTable`
```
Union
:- InsertIntoHiveTable
: +- Project
: +- SubqueryAlias __auto_generated_subquery_name
: +- RepartitionByExpression
: +- Project
: +- LocalRelation
+- InsertIntoHiveTable
+- Project
+- SubqueryAlias __auto_generated_subquery_name
+- RepartitionByExpression
+- Project
+- LocalRelation
```
This PR also fix the `canInsertRepartitionByExpression`, previous did not
consider the `SubqueryAlias` which may cause inserting error
`Repartition`/`Reblance` node to currupt the data distribution.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run
test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests)
locally before make a pull request
--
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]