kyuubi/dev
senmiaoliu f4094d6524
[KYUUBI #1085] Fix-Enforce maxOutputRows for Resolve View, Multi Insert and Distribute By
<!--
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?_

1. Should not add limit when multi insert tables.

```sql
FROM tmp_table
insert into tmp_table1 select * limit 2
insert into tmp_table2 select *
```

We should not add any limit when insert table

2. Should add limit when distribute by

```sql
select * from tmp_table distribute by a
```

3. Should not add limit when resolve view

```sql
SELECT * FROM
(select * from tmp_view1 union select * from tmp_view2)
ORDER BY a DESC
```
![image](https://user-images.githubusercontent.com/18713676/137686024-ae3fe69a-3b9a-452f-ba4e-3f6022ebebae.png)

Like this,  when the limit is added in resolve view, the complete data cannot be obtained, so the final result is incorrect

### _How was this patch tested?_

- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [x] Add screenshots for manual tests if appropriate
![image](https://user-images.githubusercontent.com/18713676/137688152-07e13216-4bc2-4bd8-84c5-69bc9a31474d.png)

- [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1247 from lsm1/fix/add_limit.

Closes #1085

a02a99c0 [senmiaoliu] Fix-Enforce maxOutputRows for Resolve View, Multi Insert and Distribute By

Authored-by: senmiaoliu <senmiaoliu@trip.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2021-10-18 20:25:10 +08:00
..
kyuubi-codecov [KYUUBI #1238] [BUILD] Add back Scala stuff to root POM 2021-10-15 17:49:48 +08:00
kyuubi-extension-spark-3-1 [KYUUBI #1085] Fix-Enforce maxOutputRows for Resolve View, Multi Insert and Distribute By 2021-10-18 20:25:10 +08:00
kyuubi-extension-spark-3-2 [KYUUBI #1241] Build Spark extension fat jar with common module 2021-10-16 19:23:45 +08:00
kyuubi-extension-spark-common [KYUUBI #1245] Improve paddingTo8Byte perf 2021-10-18 14:29:39 +08:00
kyuubi-tpcds [KYUUBI #1238] [BUILD] Add back Scala stuff to root POM 2021-10-15 17:49:48 +08:00
checkout_pr.sh [KYUUBI #1233] Add checkout_pr.sh script 2021-10-14 13:53:09 +08:00
dependencyList [KYUUBI #1009][FOLLOWUP] Kyuubi server failed to start when connecting to secured HMS 2021-09-27 12:35:28 +08:00
merge_kyuubi_pr.py [KYUUBI #809] [INFRA] Support reopened PR in pr merge tool 2021-07-15 18:05:07 +08:00