Skip to content

Commit 0f838c9

Browse files
author
chengyitian
committed
AJ-788: support append iotAnyVector for PartitionedTableAppender;
1 parent ad63c63 commit 0f838c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/com/xxdb/data/Entity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ else if(type == Entity.DATA_TYPE.DT_STRING || type == Entity.DATA_TYPE.DT_SYMBOL
102102
return Entity.DATA_CATEGORY.LITERAL;
103103
else if(type==Entity.DATA_TYPE.DT_INT128 || type==Entity.DATA_TYPE.DT_UUID || type==Entity.DATA_TYPE.DT_IPADDR)
104104
return Entity.DATA_CATEGORY.BINARY;
105-
else if(type == Entity.DATA_TYPE.DT_ANY)
105+
else if(type == Entity.DATA_TYPE.DT_ANY || type == DATA_TYPE.DT_IOTANY)
106106
return Entity.DATA_CATEGORY.MIXED;
107107
else if(type == Entity.DATA_TYPE.DT_VOID)
108108
return Entity.DATA_CATEGORY.NOTHING;

src/com/xxdb/route/PartitionedTableAppender.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public int append(Table table) throws IOException {
160160
private void checkColumnType(int col, Entity.DATA_CATEGORY category, Entity.DATA_TYPE type) {
161161
Entity.DATA_CATEGORY expectCategory = this.columnCategories[col];
162162
Entity.DATA_TYPE expectType = this.columnTypes[col];
163-
if (category != expectCategory) {
163+
if (category != expectCategory && expectCategory != Entity.DATA_CATEGORY.MIXED) {
164164
throw new RuntimeException("column " + col + ", expect category " + expectCategory.name() + ", got category " + category.name());
165165
} else if (category == Entity.DATA_CATEGORY.TEMPORAL && type != expectType) {
166166
throw new RuntimeException("column " + col + ", temporal column must have exactly the same type, expect " + expectType.name() + ", got " + type.name() );

0 commit comments

Comments
 (0)