[Fix](nereids)Fix nereids fail to parse tablesample rows bug (#26981)

This commit is contained in:
Jibing-Li
2023-11-16 12:23:37 +08:00
committed by GitHub
parent bf6a9383bc
commit 343d58123d
3 changed files with 52 additions and 3 deletions

View File

@ -2890,7 +2890,7 @@ public class LogicalPlanBuilder extends DorisParserBaseVisitor<Object> {
return new TableSample(percent, true, seek);
}
SampleByRowsContext sampleByRowsContext = (SampleByRowsContext) sampleContext;
long rows = Long.parseLong(sampleByRowsContext.ROWS().getText());
long rows = Long.parseLong(sampleByRowsContext.INTEGER_VALUE().getText());
return new TableSample(rows, false, seek);
}

View File

@ -2666,8 +2666,7 @@ public class StmtExecutor {
planner = new NereidsPlanner(statementContext);
planner.plan(parsedStmt, context.getSessionVariable().toThrift());
} catch (Exception e) {
LOG.warn("Arrow Flight SQL fall back to legacy planner, because: {}",
e.getMessage(), e);
LOG.warn("Fall back to legacy planner, because: {}", e.getMessage(), e);
parsedStmt = null;
planner = null;
context.getState().setNereids(false);