[fix](fe) Fix SHOW CREATE TABLE with AUTO PARTITION (#34071)

AUTO PARTITION grammar has changed since #31585, but the output
of SHOW CREATE TABLE was left out to change, so the result is not
able to be recognized by the FE parser.
This commit is contained in:
walter
2024-04-25 11:09:12 +08:00
committed by yiguolei
parent 47b54d4bd5
commit 789a16ec6b
2 changed files with 47 additions and 8 deletions

View File

@ -23,7 +23,6 @@ import org.apache.doris.analysis.PartitionDesc;
import org.apache.doris.analysis.PartitionKeyDesc;
import org.apache.doris.analysis.RangePartitionDesc;
import org.apache.doris.analysis.SinglePartitionDesc;
import org.apache.doris.analysis.SlotRef;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.DdlException;
import org.apache.doris.common.util.RangeUtils;
@ -266,14 +265,9 @@ public class RangePartitionInfo extends PartitionInfo {
if (enableAutomaticPartition()) {
sb.append("AUTO PARTITION BY RANGE ");
for (Expr e : partitionExprs) {
boolean isSlotRef = (e instanceof SlotRef);
if (isSlotRef) {
sb.append("(");
}
sb.append("(");
sb.append(e.toSql());
if (isSlotRef) {
sb.append(")");
}
sb.append(")");
}
sb.append("\n(");
} else {