CalvinKirs commented on code in PR #66817:
URL: https://github.com/apache/doris/pull/66817#discussion_r3793636548


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/minidump/Minidump.java:
##########
@@ -110,35 +105,4 @@ public Map<String, ColumnStatistic> 
getTotalColumnStatisticMap() {
     public Map<String, Histogram> getTotalHistogramMap() {
         return totalHistogramMap;
     }
-
-    /** Nereids minidump entry, argument should be absolute address of 
minidump path */
-    public static void main(String[] args) {

Review Comment:
   Done: removed `minidump/` (nereids_ut.sh, README, minidump.conf) and the 
`build.sh` copy step, since they only existed to drive `Minidump.main`.



##########
fe/fe-sql-parser/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -1186,11 +1186,7 @@ planType
     ;
 
 replayCommand
-    : PLAN REPLAYER replayType;
-
-replayType
-    : DUMP query
-    | PLAY filePath=STRING_LITERAL;
+    : PLAN REPLAYER DUMP query;

Review Comment:
   Done: kept `replayCommand : PLAN REPLAYER replayType` and reduced 
`replayType` to `DUMP query`, so the generated `ReplayTypeContext` / visitor / 
listener hooks remain.



##########
fe/fe-core/src/test/java/org/apache/doris/nereids/parser/NereidsParserTest.java:
##########
@@ -392,13 +392,9 @@ public void testPlanReplayer() {
         String sql = "plan replayer dump select `AD``D` from t1 where a = 1";
         NereidsParser nereidsParser = new NereidsParser();
         LogicalPlan logicalPlan = nereidsParser.parseSingle(sql);
-        ReplayCommand replayCommand = (ReplayCommand) logicalPlan;
-        Assertions.assertEquals(ReplayCommand.ReplayType.DUMP, 
replayCommand.getReplayType());
-        sql = "plan replayer play 'path'";
-        logicalPlan = nereidsParser.parseSingle(sql);
-        replayCommand = (ReplayCommand) logicalPlan;
-        Assertions.assertEquals(ReplayCommand.ReplayType.PLAY, 
replayCommand.getReplayType());
-        Assertions.assertEquals("path", replayCommand.getDumpFileFullPath());
+        Assertions.assertInstanceOf(ReplayCommand.class, logicalPlan);
+        Assertions.assertThrows(ParseException.class,
+                () -> nereidsParser.parseSingle("plan replayer play 'path'"));

Review Comment:
   Done: added positive cases `select pLaY from play` and `select play.play as 
play from play`.



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