Signed-off-by: Seaven <seaven_7@qq.com> Co-authored-by: Seaven <seaven_7@qq.com>
This commit is contained in:
parent
5ce9b16626
commit
c5ebf3e063
|
|
@ -127,6 +127,7 @@ import com.starrocks.server.LocalMetastore;
|
|||
import com.starrocks.server.RunMode;
|
||||
import com.starrocks.server.WarehouseManager;
|
||||
import com.starrocks.service.FrontendOptions;
|
||||
import com.starrocks.sql.analyzer.AnalyzerUtils;
|
||||
import com.starrocks.sql.analyzer.DecimalV3FunctionAnalyzer;
|
||||
import com.starrocks.sql.analyzer.SemanticException;
|
||||
import com.starrocks.sql.ast.AssertNumRowsElement;
|
||||
|
|
@ -2190,6 +2191,7 @@ public class PlanFragmentBuilder {
|
|||
AggregateFunction aggrFn = (AggregateFunction) aggExpr.getFn();
|
||||
Type intermediateType = aggrFn.getIntermediateType() != null ?
|
||||
aggrFn.getIntermediateType() : aggrFn.getReturnType();
|
||||
intermediateType = AnalyzerUtils.replaceNullType2Boolean(intermediateType);
|
||||
intermediateSlotDesc.setType(intermediateType);
|
||||
intermediateSlotDesc.setIsNullable(aggrFn.isNullable());
|
||||
intermediateSlotDesc.setIsMaterialized(true);
|
||||
|
|
|
|||
|
|
@ -850,4 +850,15 @@ public class ArrayTypeTest extends PlanTestBase {
|
|||
assertThat(exception.getMessage(), containsString("Array function 'reverse' is not supported for" +
|
||||
" DECIMAL256 type"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testArrayNull() throws Exception {
|
||||
String sql = "with test_cte as (\n"
|
||||
+ " select array<varchar>[] as some_array\n"
|
||||
+ ")\n"
|
||||
+ "select array_agg(some_array)\n"
|
||||
+ "from test_cte;";
|
||||
String plan = getThriftPlan(sql);
|
||||
assertContains(plan, "function_name:array_agg");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue