[vectorized](jdbc) support array type in jdbc external table (#15303)

This commit is contained in:
zhangstar333
2022-12-30 00:29:08 +08:00
committed by GitHub
parent edb9a3b58d
commit 85c7c531f1
11 changed files with 385 additions and 154 deletions

View File

@ -266,7 +266,7 @@ public class ColumnDef {
defaultValue = DefaultValue.BITMAP_EMPTY_DEFAULT_VALUE;
}
if (type.getPrimitiveType() == PrimitiveType.ARRAY) {
if (type.getPrimitiveType() == PrimitiveType.ARRAY && isOlap) {
if (isKey()) {
throw new AnalysisException("Array can only be used in the non-key column of"
+ " the duplicate table at present.");

View File

@ -390,7 +390,7 @@ public class CreateTableStmt extends DdlStmt {
for (ColumnDef columnDef : columnDefs) {
columnDef.analyze(engineName.equals("olap"));
if (columnDef.getType().isArrayType()) {
if (columnDef.getType().isArrayType() && engineName.equals("olap")) {
if (columnDef.getAggregateType() != null && columnDef.getAggregateType() != AggregateType.NONE) {
throw new AnalysisException("Array column can't support aggregation "
+ columnDef.getAggregateType());