提交 01262490 编写于 作者: wmmhello's avatar wmmhello

fix user-specified constant value selection with join query

上级 e0748e80
...@@ -1881,7 +1881,7 @@ static void addProjectQueryCol(SQueryInfo* pQueryInfo, int32_t startPos, SColumn ...@@ -1881,7 +1881,7 @@ static void addProjectQueryCol(SQueryInfo* pQueryInfo, int32_t startPos, SColumn
ids.num = 1; ids.num = 1;
ids.ids[0] = *pIndex; ids.ids[0] = *pIndex;
if (pIndex->columnIndex == TSDB_TBNAME_COLUMN_INDEX || pIndex->columnIndex == TSDB_UD_COLUMN_INDEX || if (pIndex->columnIndex == TSDB_TBNAME_COLUMN_INDEX || pIndex->columnIndex <= TSDB_UD_COLUMN_INDEX ||
pIndex->columnIndex >= tscGetNumOfColumns(pTableMeta)) { pIndex->columnIndex >= tscGetNumOfColumns(pTableMeta)) {
ids.num = 0; ids.num = 0;
} }
......
...@@ -8150,8 +8150,8 @@ int32_t createQueryFunc(SQueriedTableInfo* pTableInfo, int32_t numOfOutput, SExp ...@@ -8150,8 +8150,8 @@ int32_t createQueryFunc(SQueriedTableInfo* pTableInfo, int32_t numOfOutput, SExp
// it is a user-defined constant value column // it is a user-defined constant value column
assert(pExprs[i].base.functionId == TSDB_FUNC_PRJ); assert(pExprs[i].base.functionId == TSDB_FUNC_PRJ);
type = pExprs[i].base.param[1].nType; type = pExprs[i].base.param[0].nType;
bytes = pExprs[i].base.param[1].nLen; bytes = pExprs[i].base.param[0].nLen;
if (type == TSDB_DATA_TYPE_BINARY || type == TSDB_DATA_TYPE_NCHAR) { if (type == TSDB_DATA_TYPE_BINARY || type == TSDB_DATA_TYPE_NCHAR) {
bytes += VARSTR_HEADER_SIZE; bytes += VARSTR_HEADER_SIZE;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册