提交 82714623 编写于 作者: H Haojun Liao

[td-1369]

上级 9768c30b
......@@ -50,14 +50,16 @@ static FORCE_INLINE char *getPosInResultPage(SQueryRuntimeEnv *pRuntimeEnv, int3
tFilePage* page) {
assert(pResult != NULL && pRuntimeEnv != NULL);
SQuery *pQuery = pRuntimeEnv->pQuery;
// tFilePage *page = getResBufPage(pRuntimeEnv->pResultBuf, pResult->pos.pageId);
SQuery *pQuery = pRuntimeEnv->pQuery;
int32_t realRowId = (int32_t)(pResult->pos.rowId * GET_ROW_PARAM_FOR_MULTIOUTPUT(pQuery, pRuntimeEnv->topBotQuery, pRuntimeEnv->stableQuery));
return ((char *)page->data) + pRuntimeEnv->offset[columnIndex] * pRuntimeEnv->numOfRowsPerPage +
pQuery->pSelectExpr[columnIndex].bytes * realRowId;
}
bool isNull_filter(SColumnFilterElem *pFilter, char* minval, char* maxval);
bool notNull_filter(SColumnFilterElem *pFilter, char* minval, char* maxval);
__filter_func_t *getRangeFilterFuncArray(int32_t type);
__filter_func_t *getValueFilterFuncArray(int32_t type);
......
......@@ -205,6 +205,23 @@ bool doFilterData(SQuery *pQuery, int32_t elemPos) {
for (int32_t j = 0; j < pFilterInfo->numOfFilters; ++j) {
SColumnFilterElem *pFilterElem = &pFilterInfo->pFilters[j];
bool isnull = isNull(pElem, pFilterInfo->info.type);
if (isnull) {
if (pFilterElem->fp == isNull_filter) {
qualified = true;
break;
} else {
continue;
}
} else {
if (pFilterElem->fp == notNull_filter) {
qualified = true;
break;
} else if (pFilterElem->fp == isNull_filter) {
continue;
}
}
if (pFilterElem->fp(pFilterElem, pElem, pElem)) {
qualified = true;
break;
......
......@@ -285,69 +285,12 @@ bool nequal_nchar(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return wcsncmp((wchar_t *)pFilter->filterInfo.pz, varDataVal(minval), varDataLen(minval)/TSDB_NCHAR_SIZE) != 0;
}
////////////////////////////////////////////////////////////////
bool isNull_i8(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return isNull(minval, TSDB_DATA_TYPE_TINYINT);
}
bool isNull_i16(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return isNull(minval, TSDB_DATA_TYPE_SMALLINT);
}
bool isNull_i32(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return isNull(minval, TSDB_DATA_TYPE_INT);
}
bool isNull_i64(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return isNull(minval, TSDB_DATA_TYPE_BIGINT);
}
bool isNull_ds(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return isNull(minval, TSDB_DATA_TYPE_FLOAT);
}
bool isNull_dd(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return isNull(minval, TSDB_DATA_TYPE_DOUBLE);
}
bool isNull_binary(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return isNull(minval, TSDB_DATA_TYPE_BINARY);
}
bool isNull_nchar(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return isNull(minval, TSDB_DATA_TYPE_NCHAR);
}
////////////////////////////////////////////////////////////////
bool notNull_i8(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return !isNull(minval, TSDB_DATA_TYPE_TINYINT);
}
bool notNull_i16(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return !isNull(minval, TSDB_DATA_TYPE_SMALLINT);
}
bool notNull_i32(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return !isNull(minval, TSDB_DATA_TYPE_INT);
}
bool notNull_i64(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return !isNull(minval, TSDB_DATA_TYPE_BIGINT);
}
bool notNull_ds(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return !isNull(minval, TSDB_DATA_TYPE_FLOAT);
}
bool notNull_dd(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return isNull(minval, TSDB_DATA_TYPE_DOUBLE);
}
bool notNull_binary(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return !isNull(minval, TSDB_DATA_TYPE_BINARY);
bool isNull_filter(SColumnFilterElem *pFilter, char* minval, char* maxval) {
return true;
}
bool notNull_nchar(SColumnFilterElem *pFilter, char* minval, char *maxval) {
return !isNull(minval, TSDB_DATA_TYPE_NCHAR);
bool notNull_filter(SColumnFilterElem *pFilter, char* minval, char* maxval) {
return true;
}
////////////////////////////////////////////////////////////////
......@@ -463,8 +406,8 @@ bool (*filterFunc_i8[])(SColumnFilterElem *pFilter, char *minval, char *maxval)
largeEqual_i8,
nequal_i8,
NULL,
isNull_i8,
notNull_i8,
isNull_filter,
notNull_filter,
};
bool (*filterFunc_i16[])(SColumnFilterElem *pFilter, char *minval, char *maxval) = {
......@@ -476,8 +419,8 @@ bool (*filterFunc_i16[])(SColumnFilterElem *pFilter, char *minval, char *maxval)
largeEqual_i16,
nequal_i16,
NULL,
isNull_i16,
notNull_i16,
isNull_filter,
notNull_filter,
};
bool (*filterFunc_i32[])(SColumnFilterElem *pFilter, char *minval, char *maxval) = {
......@@ -489,8 +432,8 @@ bool (*filterFunc_i32[])(SColumnFilterElem *pFilter, char *minval, char *maxval)
largeEqual_i32,
nequal_i32,
NULL,
isNull_i32,
notNull_i32,
isNull_filter,
notNull_filter,
};
bool (*filterFunc_i64[])(SColumnFilterElem *pFilter, char *minval, char *maxval) = {
......@@ -502,8 +445,8 @@ bool (*filterFunc_i64[])(SColumnFilterElem *pFilter, char *minval, char *maxval)
largeEqual_i64,
nequal_i64,
NULL,
isNull_i64,
notNull_i64,
isNull_filter,
notNull_filter,
};
bool (*filterFunc_ds[])(SColumnFilterElem *pFilter, char *minval, char *maxval) = {
......@@ -515,8 +458,8 @@ bool (*filterFunc_ds[])(SColumnFilterElem *pFilter, char *minval, char *maxval)
largeEqual_ds,
nequal_ds,
NULL,
isNull_ds,
notNull_ds,
isNull_filter,
notNull_filter,
};
bool (*filterFunc_dd[])(SColumnFilterElem *pFilter, char *minval, char *maxval) = {
......@@ -528,8 +471,8 @@ bool (*filterFunc_dd[])(SColumnFilterElem *pFilter, char *minval, char *maxval)
largeEqual_dd,
nequal_dd,
NULL,
isNull_dd,
notNull_dd,
isNull_filter,
notNull_filter,
};
bool (*filterFunc_str[])(SColumnFilterElem* pFilter, char* minval, char *maxval) = {
......@@ -541,8 +484,8 @@ bool (*filterFunc_str[])(SColumnFilterElem* pFilter, char* minval, char *maxval)
NULL,
nequal_str,
like_str,
isNull_binary,
notNull_binary,
isNull_filter,
notNull_filter,
};
bool (*filterFunc_nchar[])(SColumnFilterElem* pFitler, char* minval, char* maxval) = {
......@@ -554,8 +497,8 @@ bool (*filterFunc_nchar[])(SColumnFilterElem* pFitler, char* minval, char* maxva
NULL,
nequal_nchar,
like_nchar,
isNull_nchar,
notNull_nchar,
isNull_filter,
notNull_filter,
};
bool (*rangeFilterFunc_i8[])(SColumnFilterElem *pFilter, char *minval, char *maxval) = {
......
#sleep 2000
#run general/parser/alter.sim
#sleep 2000
#run general/parser/alter1.sim
#sleep 2000
#run general/parser/alter_stable.sim
#sleep 2000
#run general/parser/auto_create_tb.sim
#sleep 2000
#run general/parser/auto_create_tb_drop_tb.sim
#sleep 2000
#run general/parser/col_arithmetic_operation.sim
#sleep 2000
#run general/parser/columnValue.sim
#sleep 2000
#run general/parser/commit.sim
#sleep 2000
#run general/parser/create_db.sim
#sleep 2000
#run general/parser/create_mt.sim
#sleep 2000
#run general/parser/create_tb.sim
#sleep 2000
#run general/parser/dbtbnameValidate.sim
#sleep 2000
#run general/parser/fill.sim
#sleep 2000
#run general/parser/fill_stb.sim
#sleep 2000
##run general/parser/fill_us.sim #
#sleep 2000
#run general/parser/first_last.sim
#sleep 2000
#run general/parser/import_commit1.sim
#sleep 2000
#run general/parser/import_commit2.sim
#sleep 2000
#run general/parser/import_commit3.sim
#sleep 2000
##run general/parser/import_file.sim
#sleep 2000
#run general/parser/insert_tb.sim
#sleep 2000
#run general/parser/tags_dynamically_specifiy.sim
#sleep 2000
#run general/parser/interp.sim
#sleep 2000
#run general/parser/lastrow.sim
#sleep 2000
#run general/parser/limit.sim
#sleep 2000
#run general/parser/limit1.sim
#sleep 2000
#run general/parser/limit1_tblocks100.sim
#sleep 2000
#run general/parser/limit2.sim
#sleep 2000
#run general/parser/mixed_blocks.sim
#sleep 2000
#run general/parser/nchar.sim
#sleep 2000
#run general/parser/null_char.sim
#sleep 2000
#run general/parser/selectResNum.sim
#sleep 2000
#run general/parser/select_across_vnodes.sim
#sleep 2000
#run general/parser/select_from_cache_disk.sim
#sleep 2000
#run general/parser/set_tag_vals.sim
#sleep 2000
#run general/parser/single_row_in_tb.sim
#sleep 2000
#run general/parser/slimit.sim
#sleep 2000
#run general/parser/slimit1.sim
#sleep 2000
#run general/parser/slimit_alter_tags.sim
#sleep 2000
#run general/parser/tbnameIn.sim
#sleep 2000
#run general/parser/slimit_alter_tags.sim # persistent failed
#sleep 2000
#run general/parser/join.sim
sleep 2000
run general/parser/alter.sim
sleep 2000
run general/parser/alter1.sim
sleep 2000
run general/parser/alter_stable.sim
sleep 2000
run general/parser/auto_create_tb.sim
sleep 2000
run general/parser/auto_create_tb_drop_tb.sim
sleep 2000
run general/parser/col_arithmetic_operation.sim
sleep 2000
run general/parser/columnValue.sim
sleep 2000
run general/parser/commit.sim
sleep 2000
run general/parser/create_db.sim
sleep 2000
run general/parser/create_mt.sim
sleep 2000
run general/parser/create_tb.sim
sleep 2000
run general/parser/dbtbnameValidate.sim
sleep 2000
run general/parser/fill.sim
sleep 2000
run general/parser/fill_stb.sim
sleep 2000
#run general/parser/fill_us.sim #
sleep 2000
run general/parser/first_last.sim
sleep 2000
run general/parser/import_commit1.sim
sleep 2000
run general/parser/import_commit2.sim
sleep 2000
run general/parser/import_commit3.sim
sleep 2000
#run general/parser/import_file.sim
sleep 2000
run general/parser/insert_tb.sim
sleep 2000
run general/parser/tags_dynamically_specifiy.sim
sleep 2000
run general/parser/interp.sim
sleep 2000
run general/parser/lastrow.sim
sleep 2000
run general/parser/limit.sim
sleep 2000
run general/parser/limit1.sim
sleep 2000
run general/parser/limit1_tblocks100.sim
sleep 2000
run general/parser/limit2.sim
sleep 2000
run general/parser/mixed_blocks.sim
sleep 2000
run general/parser/nchar.sim
sleep 2000
run general/parser/null_char.sim
sleep 2000
run general/parser/selectResNum.sim
sleep 2000
run general/parser/select_across_vnodes.sim
sleep 2000
run general/parser/select_from_cache_disk.sim
sleep 2000
run general/parser/set_tag_vals.sim
sleep 2000
run general/parser/single_row_in_tb.sim
sleep 2000
run general/parser/slimit.sim
sleep 2000
run general/parser/slimit1.sim
sleep 2000
run general/parser/slimit_alter_tags.sim
sleep 2000
run general/parser/tbnameIn.sim
sleep 2000
run general/parser/slimit_alter_tags.sim # persistent failed
sleep 2000
run general/parser/join.sim
sleep 2000
run general/parser/join_multivnode.sim
sleep 2000
......@@ -99,10 +99,13 @@ run general/parser/union.sim
sleep 2000
run general/parser/constCol.sim
sleep 2000
run general/parser/where.sim
sleep 2000
run general/parser/timestamp.sim
sleep 2000
run general/parser/sliding.sim
#sleep 2000
#run general/parser/repeatStream.sim
#sleep 2000
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册