DarvenDuanXJ commented on a change in pull request #7403:
URL: https://github.com/apache/incubator-doris/pull/7403#discussion_r826951267



##########
File path: fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
##########
@@ -357,8 +359,17 @@ public void execute(TUniqueId queryId) throws Exception {
                         context.getState().setError(e.getMysqlErrorCode(), 
e.getMessage());
                         return;
                     }
-                    // limitations: partitionNum, tabletNum, cardinality
+                    // limitations: partition_num, tablet_num, cardinality
+                    List<ScanNode> scanNodeList = planner.getScanNodes();
+                    for (ScanNode scanNode : scanNodeList) {
+                        if (scanNode instanceof OlapScanNode) {
+                            OlapScanNode olapScanNode = (OlapScanNode) 
scanNode;
+                            
Catalog.getCurrentCatalog().getSqlBlockRuleMgr().checkLimitaions(olapScanNode.getSelectedPartitionNum().longValue(),
+                                        olapScanNode.getSelectedTabletsNum(), 
olapScanNode.getCardinality(), analyzer.getQualifiedUser());

Review comment:
       I think analyzer.getQualifiedUser() can be replaced by 
context.getQualifiedUser()




-- 
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