We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 305762e commit c92892bCopy full SHA for c92892b
fe/src/main/java/org/apache/doris/analysis/UnionStmt.java
@@ -534,7 +534,7 @@ public String toSql() {
534
StringBuilder strBuilder = new StringBuilder();
535
Preconditions.checkState(operands.size() > 0);
536
strBuilder.append(operands.get(0).getQueryStmt().toSql());
537
- for (int i = 1; i < operands.size() - i; ++i) {
+ for (int i = 1; i < operands.size() - 1; ++i) {
538
strBuilder.append(
539
" UNION " + ((operands.get(i).getQualifier() == Qualifier.ALL) ? "ALL " : ""));
540
if (operands.get(i).getQueryStmt() instanceof UnionStmt) {
0 commit comments