Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.doris.mysql.privilege.PrivPredicate;
import org.apache.doris.qe.ConnectContext;
import org.apache.doris.statistics.AnalysisInfo.AnalysisType;
import org.apache.doris.statistics.ColumnStatistic;
import org.apache.doris.statistics.util.StatisticsUtil;

import com.google.common.collect.Sets;
Expand Down Expand Up @@ -193,7 +192,7 @@ private void checkColumn() throws AnalysisException {
ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_COLUMN_NAME,
colName, FeNameFormat.getColumnNameRegex());
}
if (ColumnStatistic.UNSUPPORTED_TYPE.contains(column.getType())) {
if (StatisticsUtil.isUnsupportedType(column.getType())) {
containsUnsupportedTytpe = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.doris.analysis.TableName;
import org.apache.doris.analysis.UserIdentity;
import org.apache.doris.analysis.VariableExpr;
import org.apache.doris.catalog.AggStateType;
import org.apache.doris.catalog.ArrayType;
import org.apache.doris.catalog.Column;
import org.apache.doris.catalog.DatabaseIf;
Expand Down Expand Up @@ -761,7 +762,8 @@ public static boolean isUnsupportedType(Type type) {
return type instanceof ArrayType
|| type instanceof StructType
|| type instanceof MapType
|| type instanceof VariantType;
|| type instanceof VariantType
|| type instanceof AggStateType;
}

public static void sleep(long millis) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@

suite("test_analyze_with_agg_complex_type") {
sql """drop table if exists test_agg_complex_type;"""
sql """set enable_agg_state=true"""

sql """create table test_agg_complex_type (
datekey int,
device_id bitmap BITMAP_UNION NULL,
hll_test hll hll_union,
qs QUANTILE_STATE QUANTILE_UNION
qs QUANTILE_STATE QUANTILE_UNION,
agg_st_1 agg_state max_by(int ,int)
)
aggregate key (datekey)
distributed by hash(datekey) buckets 1
properties(
"replication_num" = "1"
);"""

sql """insert into test_agg_complex_type values (1,to_bitmap(1), hll_hash("11"), TO_QUANTILE_STATE("11", 1.0));"""
sql """insert into test_agg_complex_type values (1,to_bitmap(1), hll_hash("11"), TO_QUANTILE_STATE("11", 1.0), max_by_state(1,2));"""

sql """insert into test_agg_complex_type values (2, to_bitmap(1), hll_hash("12"), TO_QUANTILE_STATE("11", 1.0));"""
sql """insert into test_agg_complex_type values (2, to_bitmap(1), hll_hash("12"), TO_QUANTILE_STATE("11", 1.0), max_by_state(1,2));"""

sql """ANALYZE TABLE test_agg_complex_type WITH SYNC"""

Expand Down