HangyuanLiu commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-doris/pull/3651#discussion_r429168634
##########
File path:
fe/src/main/java/org/apache/doris/analysis/CreateMaterializedViewStmt.java
##########
@@ -167,15 +167,25 @@ private void analyzeSelectClause() throws
AnalysisException {
} else if (selectListItem.getExpr() instanceof FunctionCallExpr) {
FunctionCallExpr functionCallExpr = (FunctionCallExpr)
selectListItem.getExpr();
String functionName =
functionCallExpr.getFnName().getFunction();
+ Expr defineExpr = null;
// TODO(ml): support REPLACE, REPLACE_IF_NOT_NULL only for
aggregate table, HLL_UNION, BITMAP_UNION
if (!functionName.equalsIgnoreCase("sum")
&& !functionName.equalsIgnoreCase("min")
- && !functionName.equalsIgnoreCase("max")) {
+ && !functionName.equalsIgnoreCase("max")
+ && !functionName.equalsIgnoreCase("bitmap_union")
+ && !functionName.equalsIgnoreCase("hll_union")) {
throw new AnalysisException("The materialized view only
support the sum, min and max aggregate "
+ "function. Error
function: " + functionCallExpr.toSqlImpl());
}
Preconditions.checkState(functionCallExpr.getChildren().size()
== 1);
Expr functionChild0 = functionCallExpr.getChild(0);
+
+ if (functionName.equalsIgnoreCase("bitmap_union") ||
functionName.equalsIgnoreCase("hll_union")) {
Review comment:
I agree with you. But schema change and expression compute logical is
non-universal. so we can only support few function now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]