[TD-2281]<fix>: filter unsupported mixed up query functions.
This commit is contained in:
parent
7090b3feb0
commit
b8f38e0568
|
@ -4540,11 +4540,11 @@ static void sumrate_finalizer(SQLFunctionCtx *pCtx) {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int32_t functionCompatList[] = {
|
int32_t functionCompatList[] = {
|
||||||
// count, sum, avg, min, max, stddev, percentile, apercentile, first, last
|
// count, sum, avg, min, max, stddev, percentile, apercentile, first, last
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
// last_row, top, bottom, spread, twa, leastsqr, ts, ts_dummy, tag_dummy, ts_z
|
// last_row,top, bottom, spread, twa, leastsqr, ts, ts_dummy, tag_dummy, ts_z
|
||||||
4, -1, -1, 1, 1, 1, 1, 1, 1, -1,
|
4, -1, -1, 1, 1, 1, 1, 1, 1, -1,
|
||||||
// tag, colprj, tagprj, arithmetic, diff, first_dist, last_dist, interp rate irate
|
// tag, colprj, tagprj, arithmetic, diff, first_dist, last_dist, interp rate irate
|
||||||
1, 1, 1, 1, -1, 1, 1, 5, 1, 1,
|
1, 1, 1, 1, -1, 1, 1, 5, 1, 1,
|
||||||
// sum_rate, sum_irate, avg_rate, avg_irate
|
// sum_rate, sum_irate, avg_rate, avg_irate
|
||||||
1, 1, 1, 1,
|
1, 1, 1, 1,
|
||||||
|
|
|
@ -2835,6 +2835,10 @@ static bool functionCompatibleCheck(SQueryInfo* pQueryInfo, bool joinQuery) {
|
||||||
|
|
||||||
if (functionCompatList[functionId] != factor) {
|
if (functionCompatList[functionId] != factor) {
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
if (factor == -1) { // two functions with the same -1 flag
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (functionId == TSDB_FUNC_LAST_ROW && joinQuery) {
|
if (functionId == TSDB_FUNC_LAST_ROW && joinQuery) {
|
||||||
|
|
Loading…
Reference in New Issue