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
4 changes: 1 addition & 3 deletions source/dnode/vnode/src/meta/metaTable.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,11 @@ int32_t metaUpdateVtbMetaRsp(SMetaEntry *pEntry, char *tbName, SSchemaWrapper *p
}
}

if (taosHashGetSize(pColRefHash) > 1000) {
if (taosHashGetSize(pColRefHash) > 2000) {
code = TSDB_CODE_VTABLE_TOO_MANY_REFERENCE;
goto _return;
}



memcpy(pMetaRsp->pColRefs, pRef->pColRef, pRef->nCols * sizeof(SColRef));
tstrncpy(pMetaRsp->tbName, tbName, TSDB_TABLE_NAME_LEN);
if (tableType == TSDB_VIRTUAL_NORMAL_TABLE) {
Expand Down
6 changes: 3 additions & 3 deletions test/cases/05-VirtualTables/test_vtable_max_column_num.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setup_class(cls):
tdSql.execute("alter local 'maxSQLLength' '4194304'")

sql = "insert into "
for i in range(32767):
for i in range(3000):
tdSql.execute(f"create table d_{i}(ts timestamp, double_col double)")
sql += f" d_{i} values(1696000000000, {i})"
sql += f" (1696000001000, {i+1})"
Expand Down Expand Up @@ -386,15 +386,15 @@ def test_virtual_table_error_case(self):
tdLog.info(f"test create virtual child tables.")
sql = "CREATE VTABLE vtb_virtual_child_exceed_ref ("
for i in range(32763):
sql += f"col_{i} from d_{i%1001}.double_col"
sql += f"col_{i} from d_{i%2001}.double_col"
if i != 32762:
sql += ", "
sql += ") USING vtb_virtual_stb_max_col_exceed_ref TAGS (1);"
tdSql.error(sql)

sql = "CREATE VTABLE `vtb_virtual_ntb_max_col_exceed_ref` (ts timestamp"
for i in range(32766):
sql += f", col_{i} double from d_{i%1001}.double_col"
sql += f", col_{i} double from d_{i%2001}.double_col"
sql += ")"
tdSql.error(sql)

Loading