[bug](auto partition)Fix insert failed because partition exprs of table is empty (#44391)
Fix insert failed because partition exprs of table is empty. Revert PR: #43274
This commit is contained in:
@ -1735,7 +1735,7 @@ public class FunctionCallExpr extends Expr {
|
||||
if (!Lists.newArrayList("year", "quarter", "month", "week", "day", "hour", "minute", "second")
|
||||
.contains(constParam)) {
|
||||
throw new AnalysisException("date_trunc function second param only support argument is "
|
||||
+ "year|quarter|month|week|day|hour|minute|second but got " + constParam);
|
||||
+ "year|quarter|month|week|day|hour|minute|second");
|
||||
}
|
||||
}
|
||||
if (fnName.getFunction().equalsIgnoreCase("array_range")
|
||||
|
||||
@ -264,7 +264,6 @@ public class PartitionInfo implements Writable {
|
||||
|
||||
// forbid change metadata.
|
||||
public ArrayList<Expr> getPartitionExprs() {
|
||||
LOG.info("Debug16494 getPartitionExprs: " + this.partitionExprs.get(0).debugString());
|
||||
return Expr.cloneList(this.partitionExprs);
|
||||
}
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ public class DateTrunc extends ScalarFunction
|
||||
if (!Lists.newArrayList("year", "quarter", "month", "week", "day", "hour", "minute", "second")
|
||||
.contains(constParam)) {
|
||||
throw new AnalysisException("date_trunc function second param only support argument is "
|
||||
+ "year|quarter|month|week|day|hour|minute|second but got" + constParam);
|
||||
+ "year|quarter|month|week|day|hour|minute|second");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -387,7 +387,6 @@ public class OlapTableSink extends DataSink {
|
||||
}
|
||||
for (Expr e : exprs) {
|
||||
e.reset();
|
||||
LOG.info("Debug16494: will analyze " + e.debugString());
|
||||
e.analyze(funcAnalyzer);
|
||||
}
|
||||
partitionParam.setPartitionFunctionExprs(Expr.treesToThrift(exprs));
|
||||
|
||||
Reference in New Issue
Block a user