Skip to content

Commit

Permalink
[fix](nereids)Fix nereids fail to parse tablesample bug (apache#26982)
Browse files Browse the repository at this point in the history
backport apache#26981
  • Loading branch information
Jibing-Li authored Nov 16, 2023
1 parent a623bfe commit 4068794
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ public Object visitSample(SampleContext ctx) {
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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2503,8 +2503,7 @@ public List<ResultRow> executeInternalQuery() {
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);
Expand Down

0 comments on commit 4068794

Please sign in to comment.