Merge pull request #19906 from taosdata/fix/TS-2612
fix(query): fix max/min result inconsistent using with first or last plus interval time window query
This commit is contained in:
commit
df4967614f
|
@ -372,7 +372,7 @@ static void handleInt8Col(const void* data, int32_t start, int32_t numOfRows, SM
|
||||||
pBuf->v = i8VectorCmpAVX2(data, numOfRows, isMinFunc, signVal);
|
pBuf->v = i8VectorCmpAVX2(data, numOfRows, isMinFunc, signVal);
|
||||||
} else {
|
} else {
|
||||||
if (!pBuf->assign) {
|
if (!pBuf->assign) {
|
||||||
pBuf->v = ((int8_t*)data)[0];
|
pBuf->v = ((int8_t*)data)[start];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (signVal) {
|
if (signVal) {
|
||||||
|
@ -406,7 +406,7 @@ static void handleInt16Col(const void* data, int32_t start, int32_t numOfRows, S
|
||||||
pBuf->v = i16VectorCmpAVX2(data, numOfRows, isMinFunc, signVal);
|
pBuf->v = i16VectorCmpAVX2(data, numOfRows, isMinFunc, signVal);
|
||||||
} else {
|
} else {
|
||||||
if (!pBuf->assign) {
|
if (!pBuf->assign) {
|
||||||
pBuf->v = ((int16_t*)data)[0];
|
pBuf->v = ((int16_t*)data)[start];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (signVal) {
|
if (signVal) {
|
||||||
|
@ -440,7 +440,7 @@ static void handleInt32Col(const void* data, int32_t start, int32_t numOfRows, S
|
||||||
pBuf->v = i32VectorCmpAVX2(data, numOfRows, isMinFunc, signVal);
|
pBuf->v = i32VectorCmpAVX2(data, numOfRows, isMinFunc, signVal);
|
||||||
} else {
|
} else {
|
||||||
if (!pBuf->assign) {
|
if (!pBuf->assign) {
|
||||||
pBuf->v = ((int32_t*)data)[0];
|
pBuf->v = ((int32_t*)data)[start];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (signVal) {
|
if (signVal) {
|
||||||
|
@ -470,7 +470,7 @@ static void handleInt32Col(const void* data, int32_t start, int32_t numOfRows, S
|
||||||
static void handleInt64Col(const void* data, int32_t start, int32_t numOfRows, SMinmaxResInfo* pBuf, bool isMinFunc,
|
static void handleInt64Col(const void* data, int32_t start, int32_t numOfRows, SMinmaxResInfo* pBuf, bool isMinFunc,
|
||||||
bool signVal) {
|
bool signVal) {
|
||||||
if (!pBuf->assign) {
|
if (!pBuf->assign) {
|
||||||
pBuf->v = ((int64_t*)data)[0];
|
pBuf->v = ((int64_t*)data)[start];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (signVal) {
|
if (signVal) {
|
||||||
|
@ -504,7 +504,7 @@ static void handleFloatCol(SColumnInfoData* pCol, int32_t start, int32_t numOfRo
|
||||||
*val = floatVectorCmpAVX(pData, numOfRows, isMinFunc);
|
*val = floatVectorCmpAVX(pData, numOfRows, isMinFunc);
|
||||||
} else {
|
} else {
|
||||||
if (!pBuf->assign) {
|
if (!pBuf->assign) {
|
||||||
*val = pData[0];
|
*val = pData[start];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMinFunc) { // min
|
if (isMinFunc) { // min
|
||||||
|
@ -535,7 +535,7 @@ static void handleDoubleCol(SColumnInfoData* pCol, int32_t start, int32_t numOfR
|
||||||
*val = (double)doubleVectorCmpAVX(pData, numOfRows, isMinFunc);
|
*val = (double)doubleVectorCmpAVX(pData, numOfRows, isMinFunc);
|
||||||
} else {
|
} else {
|
||||||
if (!pBuf->assign) {
|
if (!pBuf->assign) {
|
||||||
*val = pData[0];
|
*val = pData[start];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMinFunc) { // min
|
if (isMinFunc) { // min
|
||||||
|
|
|
@ -549,6 +549,7 @@
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -R
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -R
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -R
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -R
|
||||||
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -R
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -R
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py
|
||||||
|
@ -834,6 +835,7 @@
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 2
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 2
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 2
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 2
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 2
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 2
|
||||||
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 2
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 2
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 2
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 2
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 2
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 2
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 2
|
||||||
|
@ -930,6 +932,7 @@
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 3
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 3
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 3
|
||||||
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 3
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 3
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 3
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 3
|
||||||
|
@ -1027,6 +1030,7 @@
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 4
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 4
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 4
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 4
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 4
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 4
|
||||||
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 4
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 4
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 4
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 4
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 4
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 4
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 4
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue