yikf opened a new pull request #32483:
URL: https://github.com/apache/spark/pull/32483
### What changes were proposed in this pull request?
In the case of `insert into...select...limit` , `CollectLimitExec` has
better execution performance than `GlobalLimit` .
Before:
```
== Physical Plan ==
Execute InsertIntoHadoopFsRelationCommand ...
+- *(2) GlobalLimit 5
+- Exchange SinglePartition, true, id=#39
+- *(1) LocalLimit 5
+- *(1) ColumnarToRow
+- FileScan ...
```
After:
```
== Physical Plan ==
Execute InsertIntoHadoopFsRelationCommand ...
+- CollectLimit 5
+- *(1) ColumnarToRow
+- FileScan ....
```
### Why are the changes needed?
improve execution performance.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Add new test
--
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]