From aa5eb64530cd4d41ae3fe62644b5124b1c090e51 Mon Sep 17 00:00:00 2001 From: Jax Liu Date: Sun, 23 Mar 2025 19:17:49 +0800 Subject: [PATCH] update error message --- data/sqlite/random/groupby/slt_good_0.slt | 98 +++--- data/sqlite/random/groupby/slt_good_1.slt | 190 +++++------ data/sqlite/random/groupby/slt_good_10.slt | 138 ++++---- data/sqlite/random/groupby/slt_good_11.slt | 316 +++++++++--------- data/sqlite/random/groupby/slt_good_12.slt | 370 ++++++++++----------- data/sqlite/random/groupby/slt_good_13.slt | 66 ++-- data/sqlite/random/groupby/slt_good_2.slt | 158 ++++----- data/sqlite/random/groupby/slt_good_3.slt | 216 ++++++------ data/sqlite/random/groupby/slt_good_4.slt | 252 +++++++------- data/sqlite/random/groupby/slt_good_5.slt | 240 ++++++------- data/sqlite/random/groupby/slt_good_6.slt | 32 +- data/sqlite/random/groupby/slt_good_7.slt | 200 +++++------ data/sqlite/random/groupby/slt_good_8.slt | 128 +++---- data/sqlite/random/groupby/slt_good_9.slt | 144 ++++---- 14 files changed, 1274 insertions(+), 1274 deletions(-) diff --git a/data/sqlite/random/groupby/slt_good_0.slt b/data/sqlite/random/groupby/slt_good_0.slt index 019e025..056f334 100644 --- a/data/sqlite/random/groupby/slt_good_0.slt +++ b/data/sqlite/random/groupby/slt_good_0.slt @@ -28171,7 +28171,7 @@ SELECT DISTINCT 98 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 86 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0 query I rowsort @@ -28187,7 +28187,7 @@ SELECT DISTINCT COALESCE ( cor0.col0, cor0.col0 ) AS col1 FROM tab1 cor0 GROUP B # Datafusion - Expected - 2882 # Datafusion - Expected - 2895 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + 33 * - COALESCE ( - 86, tab1.col2 ) + + col1 FROM tab1 GROUP BY tab1.col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function @@ -28196,7 +28196,7 @@ SELECT ALL + 33 * - COALESCE ( - 86, tab1.col2 ) + + col1 FROM tab1 GROUP BY tab # Datafusion - Expected - 0 # Datafusion - Expected - 6561 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( - cor0.col1, cor0.col1, 63, - cor0.col2 ) * - cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col1 query I rowsort @@ -28308,7 +28308,7 @@ SELECT ALL col1 col0 FROM tab0 GROUP BY col1 HAVING NOT ( NULL ) IS NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + ( + CASE + 64 WHEN cor0.col0 THEN NULL WHEN 77 THEN cor0.col2 END * cor0.col0 ) + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col0 query I rowsort @@ -28855,7 +28855,7 @@ SELECT ALL 98 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -3776 # Datafusion - Expected - -3776 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + - COALESCE ( 59, - cor0.col1 ) * 64 FROM tab2, tab2 AS cor0 GROUP BY tab2.col2 query I rowsort @@ -30229,7 +30229,7 @@ SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2 # Datafusion - Expected - -51 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col1 + - COALESCE ( + 57, + col2 ) FROM tab1 AS cor0 GROUP BY col1 query I rowsort @@ -30405,7 +30405,7 @@ SELECT ALL COALESCE ( - 12, - cor0.col1, + cor0.col1 ) * + cor0.col1 * + 58 AS c # Datafusion - Expected - -37 # Datafusion - Expected - -37 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 88, + cor0.col0, cor0.col1 ) + 51 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -30466,7 +30466,7 @@ SELECT - 58 / + cor1.col0 + ( 95 ) FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP # Datafusion - Expected - -43 # Datafusion - Expected - -60 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0 query I rowsort @@ -30729,7 +30729,7 @@ SELECT DISTINCT - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0 # Datafusion - Expected - -86 # Datafusion - Expected - -86 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( COALESCE ( - 86, tab1.col2 ), - tab1.col0, tab1.col1 ) AS col1 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -32285,7 +32285,7 @@ SELECT DISTINCT + cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 284 # Datafusion - Expected - 32 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 4, - cor0.col0 ) * cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, col2, cor0.col1 query I rowsort @@ -33236,7 +33236,7 @@ SELECT + 16 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 55 # Datafusion - Expected - 55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 55, - tab0.col1, - tab0.col1, tab0.col0 ) AS col0 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -33423,7 +33423,7 @@ SELECT 83 AS col1 FROM tab1 cor0 GROUP BY cor0.col0 # Datafusion - Expected - 99 # Datafusion - Expected - 99 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 99, cor0.col2, cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0 query I rowsort @@ -33943,7 +33943,7 @@ SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -26 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 26, cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -34326,7 +34326,7 @@ SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1 # Datafusion - Expected - -84 # Datafusion - Expected - -97 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT - 38 + - tab1.col1 - tab1.col1 / COALESCE ( + 20, - tab1.col0 ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -35339,7 +35339,7 @@ SELECT - 46 AS col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1 # Datafusion - Expected - 11 # Datafusion - Expected - 11 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( - 11, cor0.col0, + cor0.col0 ) FROM tab1, tab0 AS cor0 GROUP BY tab1.col1 query I rowsort @@ -36915,7 +36915,7 @@ SELECT 10 * - 57 AS col2 FROM tab2 cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 93 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 93, cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY col2 query I rowsort @@ -38050,7 +38050,7 @@ SELECT DISTINCT + 13 + cor0.col2 * 90 FROM tab1, tab0 cor0 GROUP BY cor0.col2 # Datafusion - Expected - 83 # Datafusion - Expected - 84 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - cor0.col0 / - 73 + COALESCE ( 83, cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col0 query I rowsort @@ -39610,7 +39610,7 @@ SELECT cor0.col2 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 98, cor0.col2, + col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -41572,7 +41572,7 @@ SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1 # Datafusion - Expected - 3230 # Datafusion - Expected - 6715 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 85, + cor0.col2, - cor0.col2, cor0.col1 ) * + col2 FROM tab0 cor0 GROUP BY cor0.col2 query I rowsort @@ -42579,7 +42579,7 @@ SELECT ALL 17 + 3 AS col1 FROM tab0 AS cor0 GROUP BY col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 75 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 75, cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2 query I rowsort @@ -43419,7 +43419,7 @@ SELECT ALL - 14 * - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, col2 # Datafusion - Expected - 29 # Datafusion - Expected - 29 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 29, + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -44144,7 +44144,7 @@ SELECT DISTINCT 56 FROM tab0 AS cor0 GROUP BY cor0.col0, col1 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL CASE + 8 WHEN 76 THEN - cor0.col1 * + 8 WHEN 9 THEN NULL ELSE NULL END FROM tab0 AS cor0 GROUP BY cor0.col2, col0 query I rowsort @@ -44185,7 +44185,7 @@ SELECT 77 + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 9 values hashing to 632aae78dbfb549c713e2d28f1e22d7f skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + 86, - cor0.col2 ) * cor1.col1 + + cor1.col1 col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1, cor1.col1 query I rowsort @@ -44809,7 +44809,7 @@ SELECT ALL col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1 # Datafusion - Expected - 5 # Datafusion - Expected - 5 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 5, - 11, cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -44851,7 +44851,7 @@ SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0 # Datafusion - Expected - 6 # Datafusion - Expected - 6 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 6, cor0.col2 * - ( cor0.col0 ) ) FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -45310,7 +45310,7 @@ SELECT cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1 # Datafusion - Expected - 30 # Datafusion - Expected - 30 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 30, cor0.col1 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0 query I rowsort @@ -45510,7 +45510,7 @@ SELECT DISTINCT + - 95 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -6591 # Datafusion - Expected - -6672 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT 16 + + cor0.col1 - COALESCE ( 88, - col0 ) * + 76 FROM tab0 AS cor0 GROUP BY col1 query I rowsort @@ -45582,7 +45582,7 @@ SELECT ALL + cor0.col0 col1 FROM tab0 cor0 GROUP BY col0 # Datafusion - Expected - -99 # Datafusion - Expected - -99 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 99, - cor0.col2 + + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -46221,7 +46221,7 @@ SELECT - 50 AS col2 FROM tab0, tab0 cor0 GROUP BY cor0.col1 # Datafusion - Expected - 7437 # Datafusion - Expected - 7518 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT cor0.col0 * COALESCE ( + 81, + cor0.col2 ) + 66 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort label-6902 @@ -48964,7 +48964,7 @@ NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - 12 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 12, + cor0.col0 * + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY col1 query I rowsort @@ -52392,7 +52392,7 @@ SELECT 35 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2 # Datafusion - Expected - 75 # Datafusion - Expected - 92 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 49, cor0.col1 ) + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -52450,7 +52450,7 @@ SELECT DISTINCT col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 5 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 5, cor0.col2, + col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -53136,7 +53136,7 @@ SELECT ALL + cor0.col2 / 79 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1 # Datafusion - Expected - 3871 # Datafusion - Expected - 4263 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + cor0.col2 * COALESCE ( 49, cor0.col0 + col0, cor0.col1 * + cor0.col0 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Types were automatically converted from: @@ -53618,7 +53618,7 @@ SELECT + cor0.col1 + 43 FROM tab2 cor0 GROUP BY cor0.col1 # Datafusion - Expected - 3 # Datafusion - Expected - 3 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 3, - cor0.col1 * + cor0.col1, 76, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -55229,7 +55229,7 @@ SELECT ALL 28 + cor0.col2 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 83 # Datafusion - Expected - 83 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 83, cor0.col2, cor0.col1, - cor0.col0 * - col2 + + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -56737,7 +56737,7 @@ SELECT - 57 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 5490 # Datafusion - Expected - 5490 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - cor0.col1 + COALESCE ( 61, cor0.col2 ) * 90 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1 query I rowsort label-8488 @@ -57158,7 +57158,7 @@ SELECT DISTINCT - 38 * 15 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 76 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 76, cor0.col0 ) FROM tab2 cor0 GROUP BY cor0.col1 query I rowsort @@ -57621,7 +57621,7 @@ SELECT cor0.col1 - 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 134 # Datafusion - Expected - 136 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 75, cor0.col2, cor0.col0 * + cor0.col1 ) + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -58329,7 +58329,7 @@ SELECT cor0.col0 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -60 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 60, + cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -58741,7 +58741,7 @@ SELECT - cor0.col0 col2 FROM tab0, tab0 cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 98, col0, cor0.col1 + - 23 ) FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -59970,7 +59970,7 @@ SELECT DISTINCT - + 40 + + cor0.col1 AS col1 FROM tab1, tab1 AS cor0 GROUP BY co # Datafusion - Expected - -22 # Datafusion - Expected - -22 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 22, - tab0.col0, - cor0.col1 ) FROM tab0, tab2 AS cor0 GROUP BY tab0.col1 query I rowsort @@ -60809,14 +60809,14 @@ SELECT ALL - 22 + - col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 3160 # Datafusion - Expected - 3480 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col2 * COALESCE ( + 40, col1 ) FROM tab2 AS cor0 GROUP BY cor0.col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: # Datafusion - Expected - 1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 82, - cor0.col0, - CAST ( NULL AS INTEGER ) ) / - 70 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -61009,7 +61009,7 @@ SELECT ALL ( + cor0.col0 ) * - 49 FROM tab1 AS cor0 GROUP BY col1, cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 50 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 50, - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -61993,7 +61993,7 @@ SELECT 48 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 27 # Datafusion - Expected - 27 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + ( + COALESCE ( 27, - cor0.col0 ) ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -62565,7 +62565,7 @@ SELECT cor0.col0 * + cor0.col2 * 3 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, # Datafusion - Expected - 43 # Datafusion - Expected - 83 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + cor0.col0, 72, + 29 * cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -63577,7 +63577,7 @@ SELECT 38 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 2470 # Datafusion - Expected - 5135 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col2 * COALESCE ( 65, cor0.col0 + + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2 query I rowsort @@ -65389,7 +65389,7 @@ SELECT ALL - 45 + - 2 col0 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 77 # Datafusion - Expected - 77 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 77, - cor0.col2 + + cor0.col1 * - 24, - cor0.col1 + - cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -65445,7 +65445,7 @@ SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1 # Datafusion - Expected - 74 # Datafusion - Expected - 74 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 74, - cor0.col2, NULLIF ( cor0.col1, cor0.col0 ) ) FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_1.slt b/data/sqlite/random/groupby/slt_good_1.slt index 1ef375d..f5d25c3 100644 --- a/data/sqlite/random/groupby/slt_good_1.slt +++ b/data/sqlite/random/groupby/slt_good_1.slt @@ -438,7 +438,7 @@ SELECT DISTINCT 20 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 3 # Datafusion - Expected - 3 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 3, 40 * cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -1287,7 +1287,7 @@ SELECT 67 AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 29 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: cor1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 29, + tab1.col1 ) AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col2 query I rowsort @@ -1669,7 +1669,7 @@ SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY col1, col0, cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -85 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( - 85, + cor0.col2 + 58 ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -2698,7 +2698,7 @@ SELECT ALL - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT ( cor0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 95 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + COALESCE ( - 95, + tab0.col0 ) AS col1 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -3638,7 +3638,7 @@ SELECT + 59 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 79 # Datafusion - Expected - 87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( cor0.col2, + 58, cor0.col1 * cor0.col0 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort label-544 @@ -3678,7 +3678,7 @@ SELECT + 49 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 1, cor0.col0 ) + - CAST ( NULL AS FLOAT8 ) FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col1 query I rowsort @@ -3907,7 +3907,7 @@ SELECT ALL 47 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 89 # Datafusion - Expected - 89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 89, cor0.col1 * + cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0 query I rowsort @@ -5036,7 +5036,7 @@ SELECT DISTINCT + cor0.col0 * - 69 col0 FROM tab2, tab1 AS cor0, tab0 AS cor1 GR # Datafusion - Expected - 28 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - COALESCE ( + col0, tab1.col0 ), 76, + col1 ) AS col1 FROM tab1 GROUP BY col0 query I rowsort @@ -5356,7 +5356,7 @@ SELECT + - 27 AS col1 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - NULLIF ( + col2, cor0.col2 ) * - COALESCE ( 78, + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -7098,7 +7098,7 @@ SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab2 cor0 GROUP BY col2, col0, cor0.c # Datafusion - Expected - 3043 # Datafusion - Expected - 5803 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - COALESCE ( 69, col2, + 41, cor0.col1 ), - cor0.col2, 80 ) * cor0.col0 + 76 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0 query I rowsort @@ -7856,7 +7856,7 @@ SELECT DISTINCT - 94 + - tab0.col2 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - -1659 # Datafusion - Expected - -1827 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + COALESCE ( - 21, tab1.col0 ), + cor0.col0 ) * - cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2 query I rowsort label-1176 @@ -9253,7 +9253,7 @@ SELECT ALL 14 * - COALESCE ( - 87, tab0.col2 ) AS col2 FROM tab0 GROUP BY tab0.c # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT CASE - 75 WHEN - 96 THEN - cor0.col1 * - ( cor0.col0 ) WHEN cor0.col0 THEN NULL END FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -10655,7 +10655,7 @@ SELECT ALL - 42 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 72 # Datafusion - Expected - 72 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 72, + cor0.col2 + - 8 ) FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0 query I rowsort @@ -11761,7 +11761,7 @@ SELECT ( - cor0.col1 ) + + 59 * + cor0.col1 + 1 AS col0 FROM tab1 AS cor0 GROUP # Datafusion - Expected - -3658 # Datafusion - Expected - -3782 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + cor0.col1, 84, cor0.col0 + cor0.col2 ) * - 62 AS col0 FROM tab2 cor0 GROUP BY cor0.col1 query I rowsort @@ -13092,7 +13092,7 @@ SELECT ALL 35 AS col0 FROM tab1 AS cor0 GROUP BY col2 # Datafusion - Expected - -38 # Datafusion - Expected - 19 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - + COALESCE ( + 64, + col2 ) + + tab0.col0 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -13952,7 +13952,7 @@ SELECT + 3 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0 # Datafusion - Expected - 55 # Datafusion - Expected - 55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 55, - tab0.col2 + + tab0.col2 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -14046,7 +14046,7 @@ SELECT + cor0.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col2 # Datafusion - Expected - -57 # Datafusion - Expected - -57 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( + 57, + cor0.col2 * cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -14086,7 +14086,7 @@ SELECT DISTINCT - cor0.col0 * - ( 99 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.c # Datafusion - Datafusion expected results: # Datafusion - Expected - -26 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 26, - col2 * cor0.col0 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -15067,7 +15067,7 @@ SELECT + + cor0.col2 * cor0.col2 + - 4 FROM tab1, tab0 cor0 GROUP BY cor0.col2 # Datafusion - Expected - 47 # Datafusion - Expected - 47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 47, - 49 * cor0.col1, col0 * cor0.col1, + col2 + cor0.col0 * - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -15142,7 +15142,7 @@ SELECT - - 7 col2 FROM tab0 GROUP BY col1 # Datafusion - Expected - -22 # Datafusion - Expected - -22 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 22, col2 ) FROM tab2 GROUP BY col1 query I rowsort @@ -15531,7 +15531,7 @@ SELECT + 80 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - CASE - cor0.col1 WHEN COALESCE ( + 63, cor0.col2 * col2 ) + cor0.col1 THEN cor0.col1 END AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -15596,7 +15596,7 @@ SELECT ( + 14 ) * - 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 57 # Datafusion - Expected - 57 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 57, - col2 / col0 + + ( 49 ) * cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0 query I rowsort @@ -16023,7 +16023,7 @@ SELECT + cor0.col1 + + cor0.col1 * - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1 # Datafusion - Expected - 83 # Datafusion - Expected - 84 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - cor0.col0 / - 73 + COALESCE ( 83, + cor0.col0 + + cor0.col2, cor0.col2 * - cor0.col0 - - cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col0 query I rowsort @@ -16313,7 +16313,7 @@ SELECT - 91 / 55 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -13 # Datafusion - Expected - -13 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col2 could not be resolved from available columns: cor1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 13, + cor1.col2, - cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1 query I rowsort @@ -16464,7 +16464,7 @@ SELECT 88 + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.co # Datafusion - Datafusion expected results: # Datafusion - Expected - 98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 98, cor0.col2, + cor0.col2 / 71 + col1 * - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -17437,7 +17437,7 @@ SELECT DISTINCT + 3 AS col2 FROM tab0 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 75 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 75, - cor0.col2 + - cor0.col0, + cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2 query I rowsort @@ -18234,7 +18234,7 @@ SELECT ALL - COALESCE ( tab0.col0, tab0.col0 * tab0.col0 ) FROM tab0 GROUP BY ta # Datafusion - Expected - 30 # Datafusion - Expected - 30 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 30, cor0.col1 * - cor0.col1, NULLIF ( - cor0.col2, - cor0.col1 * - CASE - col0 WHEN cor0.col2 THEN cor0.col2 WHEN - ( 78 ) THEN cor0.col0 * - cor0.col0 ELSE NULL END + cor0.col0 * cor0.col2 ) ) AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0 query I rowsort @@ -19543,7 +19543,7 @@ SELECT tab1.col0 col1 FROM tab1 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -43 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( - 43, + cor0.col1 - + cor0.col2, + 80 + + cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -19935,7 +19935,7 @@ SELECT ALL + tab2.col0 * + 25 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - 377146 # Datafusion - Expected - 415338 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 * COALESCE ( - 62 * - 77, col0 + NULLIF ( cor0.col1 - cor0.col0, - col0 - - cor0.col1 ) ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -20568,7 +20568,7 @@ SELECT 95 AS col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 5 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 5, cor0.col2 + - col2, cor0.col0 * - cor0.col0, cor0.col0 / 56 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -20838,7 +20838,7 @@ SELECT + 43 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2 # Datafusion - Expected - 3871 # Datafusion - Expected - 4263 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + cor0.col2 * COALESCE ( 49, cor0.col0 - col0, cor0.col1 / + cor0.col0 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -21036,7 +21036,7 @@ SELECT + 30 * cor0.col2 + cor0.col1 * NULLIF ( + cor0.col2, cor0.col2 * 58 ) FRO # Datafusion - Expected - 3 # Datafusion - Expected - 3 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 3, - cor0.col1 * + cor0.col1, 76, + cor0.col0 * 65 ) FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -21595,7 +21595,7 @@ SELECT ALL + col1 AS col1 FROM tab0 GROUP BY col1 # Datafusion - Expected - -2369 # Datafusion - Expected - -621 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT cor0.col2 + - cor0.col0 * + NULLIF ( COALESCE ( cor0.col2, - 37, + ( - cor0.col0 ) + cor0.col1 ) - + 9, - 15 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2 query I rowsort @@ -21911,7 +21911,7 @@ SELECT ALL - 82 FROM tab0 GROUP BY col2 # Datafusion - Expected - 34 # Datafusion - Expected - 34 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col0 could not be resolved from available columns: cor1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 34, + cor1.col0 / - cor0.col2, CASE + 87 WHEN - cor0.col2 * cor0.col1 + + 5 THEN - cor1.col2 * - cor0.col2 ELSE NULL END - cor1.col1, - cor0.col0 * cor0.col1 + cor1.col1 ) col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1 query I rowsort @@ -22811,7 +22811,7 @@ SELECT - tab2.col2 AS col1 FROM tab2 GROUP BY col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -60 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 60, cor0.col2 * + cor0.col2 + 52, 31 + - col0 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -22933,7 +22933,7 @@ SELECT ALL + 57 FROM tab1 GROUP BY tab1.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 98, + cor0.col2 + cor0.col1, col1 + + cor0.col2, - cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -23623,7 +23623,7 @@ SELECT ALL + 43 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, co # Datafusion - Expected - 3160 # Datafusion - Expected - 3480 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col2 * COALESCE ( + 40, + cor0.col0 + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -24148,7 +24148,7 @@ SELECT - cor0.col1 col2 FROM tab1, tab0 cor0 GROUP BY cor0.col1 # Datafusion - Expected - 27 # Datafusion - Expected - 27 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + ( + COALESCE ( 27, cor0.col2 / cor0.col1, - 39 + cor0.col0 ) ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -25054,7 +25054,7 @@ SELECT cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2 # Datafusion - Expected - 6241 # Datafusion - Expected - 7569 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + NULLIF ( + cor0.col2, - cor0.col2 * COALESCE ( 9, + cor0.col0 * cor0.col1 ) ) * cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col2 query I rowsort @@ -25197,7 +25197,7 @@ SELECT ALL tab2.col2 FROM tab2 GROUP BY col2 # Datafusion - Expected - 74 # Datafusion - Expected - 74 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 74, - cor0.col2, - cor0.col0 * cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -25212,7 +25212,7 @@ SELECT + - 98 col2 FROM tab0 GROUP BY col0 # Datafusion - Expected - 77 # Datafusion - Expected - 77 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 77, - cor0.col2 + + cor0.col1 / - 24, - cor0.col1 - - cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -25815,7 +25815,7 @@ SELECT DISTINCT + tab2.col1 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - 3978 # Datafusion - Expected - 3978 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 51, - col0 + - cor0.col1, - CASE - cor0.col1 WHEN + cor0.col1 + - 44 THEN NULL WHEN cor0.col2 THEN + cor0.col1 + - CASE + COALESCE ( + col0, - col1 ) WHEN COALESCE ( + cor0.col1, cor0.col0 / CAST ( 7 AS INTEGER ) ) * + cor0.col1 THEN + cor0.col0 END * - cor0.col0 WHEN cor0.col1 THEN NULL WHEN cor0.col0 THEN NULL END ) * 78 FROM tab2 cor0 GROUP BY cor0.col2 query I rowsort @@ -25968,7 +25968,7 @@ SELECT DISTINCT - col1 - col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.co # Datafusion - Expected - -38 # Datafusion - Expected - -38 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 38, cor0.col2, col1 + 90 * + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -26238,7 +26238,7 @@ SELECT + 55 AS col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -85 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( - 85, + cor0.col2 + + 3 * + cor0.col0, 58, + cor0.col1 + ( cor0.col2 - cor0.col0 ) ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -26834,7 +26834,7 @@ SELECT ALL + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 79 # Datafusion - Expected - 87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( cor0.col2, + 58, cor0.col1 / cor0.col0 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -27162,7 +27162,7 @@ SELECT 43 + - 94 col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 76 # Datafusion - Expected - 76 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 76, - tab1.col1 / - col0 ) FROM tab1 GROUP BY tab1.col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function @@ -27171,7 +27171,7 @@ SELECT COALESCE ( 76, - tab1.col1 / - col0 ) FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + cor0.col0 / + COALESCE ( - 39, cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -27415,7 +27415,7 @@ SELECT ALL - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.c # Datafusion - Datafusion expected results: # Datafusion - Expected - -12 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT ( - COALESCE ( + 12, - tab2.col1 ) ) FROM tab2 GROUP BY col2 query I rowsort @@ -27661,7 +27661,7 @@ SELECT DISTINCT + 10 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 32 # Datafusion - Expected - 32 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 32, - cor0.col2 * cor0.col1, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0 query I rowsort @@ -28193,7 +28193,7 @@ SELECT - 93 + 49 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 62 # Datafusion - Expected - 62 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 62, cor0.col1 ) AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0 query I rowsort @@ -28270,7 +28270,7 @@ SELECT ALL - 78 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0 # Datafusion - Expected - 110 # Datafusion - Expected - 29 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 29, - col1 + NULLIF ( + cor0.col0 + - 92, - cor0.col1 ) * 75, + 9, + cor0.col1 + + cor0.col0 ) + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -28333,7 +28333,7 @@ SELECT ALL 57 * - 24 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -54 # Datafusion - Expected - -54 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 54, cor0.col0 + - cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -28402,7 +28402,7 @@ SELECT DISTINCT - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -2698 # Datafusion - Expected - -304 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - cor0.col2 * CASE 41 WHEN + 82 THEN col1 / 13 ELSE 38 END AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -28490,7 +28490,7 @@ SELECT DISTINCT 68 FROM tab2 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 46, cor0.col1, + cor0.col2, cor0.col2 * cor0.col1 - + col0 ) * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -28572,7 +28572,7 @@ SELECT - 13 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT CASE 75 WHEN - 96 THEN - cor0.col1 * - ( cor0.col0 ) WHEN cor0.col0 THEN NULL END FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -28756,7 +28756,7 @@ SELECT 63 * col0 FROM tab1 GROUP BY col0 # Datafusion - Expected - 47 # Datafusion - Expected - 47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 47, col2 ) AS col2 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -30474,7 +30474,7 @@ SELECT ALL cor0.col0 + 76 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -11 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 11, + cor0.col0 * cor0.col2 ) FROM tab1 AS cor0 GROUP BY col2 query I rowsort @@ -31907,7 +31907,7 @@ SELECT col1 AS col2 FROM tab0 cor0 GROUP BY col1 # Datafusion - Expected - 96 # Datafusion - Expected - 96 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 96, - cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -32352,7 +32352,7 @@ SELECT ALL 52 AS col2 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 63 # Datafusion - Expected - 63 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 63, col2, cor0.col2 * + cor0.col0 + cor0.col0 * cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0 query I rowsort @@ -33156,7 +33156,7 @@ SELECT - cor0.col2 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING NULL NOT IN ( col2 ) query I rowsort @@ -34558,7 +34558,7 @@ SELECT - 7 * 50 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -5964 # Datafusion - Expected - -5964 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 60, - cor0.col2 ) + - 72 * 82 AS col2 FROM tab2 AS cor0 GROUP BY col0 query I rowsort @@ -35045,7 +35045,7 @@ SELECT 16 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2 # Datafusion - Expected - -19 # Datafusion - Expected - -19 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 19, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -35272,7 +35272,7 @@ SELECT + 13 AS col1 FROM tab2 GROUP BY tab2.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 83 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 83, + col0 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -35460,7 +35460,7 @@ SELECT ALL - col0 * ( - 87 ) + + 89 col2 FROM tab2 cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 9 values hashing to f6f26b9a04da14807208b93d507095c5 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col1 could not be resolved from available columns: cor1\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 90, cor1.col1 + 31 ) FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0, cor0.col1 query I rowsort @@ -35710,7 +35710,7 @@ SELECT DISTINCT 69 + 36 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -39 # Datafusion - Expected - -39 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 39, col1 + - 65 ) FROM tab2 AS cor0 GROUP BY col2, cor0.col2 query I rowsort @@ -36456,7 +36456,7 @@ SELECT DISTINCT 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 91 # Datafusion - Expected - 92 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + NULLIF ( COALESCE ( cor0.col0, 94, cor0.col1 * cor0.col0 + + cor0.col0 * 33 ), + 90 ) FROM tab2 AS cor0 GROUP BY cor0.col0, col0 query I rowsort @@ -37156,7 +37156,7 @@ SELECT + 13 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 26 # Datafusion - Expected - 26 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + 26, + cor0.col1, + 66, + col2 ) FROM tab2 AS cor0 GROUP BY col1 query I rowsort @@ -37303,7 +37303,7 @@ SELECT ALL 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -11 # Datafusion - Expected - -11 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 11, cor0.col1 + + cor0.col2, 62 ) FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -38527,7 +38527,7 @@ SELECT ALL 85 FROM tab1 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 134 # Datafusion - Expected - 134 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT 66 + COALESCE ( + 68, + cor0.col2 * + 81 ) FROM tab1 AS cor0 GROUP BY col1 query I rowsort @@ -40101,7 +40101,7 @@ SELECT ALL 6 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 96 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 96, col0, cor0.col1 + cor0.col2 / - cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -42129,7 +42129,7 @@ SELECT 91 - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0 # Datafusion - Expected - -71 # Datafusion - Expected - -71 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 71, cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -42368,7 +42368,7 @@ SELECT DISTINCT - cor0.col0 * + COALESCE ( 19, - col0 * + cor0.col0 + cor0.col1, # Datafusion - Expected - -92 # Datafusion - Expected - -92 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( - 92, - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -42689,7 +42689,7 @@ SELECT ( COALESCE ( - cor0.col0, 56 + + cor0.col0 ) ) FROM tab2 AS cor0 GROUP BY # Datafusion - Datafusion expected results: # Datafusion - Expected - 98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 98, cor0.col1, cor0.col2 * - 54, 94 - - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col0 query I rowsort @@ -43219,7 +43219,7 @@ SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.c # Datafusion - Expected - -20 # Datafusion - Expected - -20 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 20, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -43340,7 +43340,7 @@ SELECT DISTINCT 89 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - -7735 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + COALESCE ( 91, tab0.col2 ) * 85 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -43681,7 +43681,7 @@ NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL NOT BETWEEN col1 AND NULL query I rowsort @@ -43957,7 +43957,7 @@ SELECT ALL + 65 / - 76 AS col2 FROM tab0, tab2 cor0 GROUP BY cor0.col2 # Datafusion - Expected - 166 # Datafusion - Expected - 89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col0 + COALESCE ( + ( 74 ), - cor0.col0 * 18, + cor0.col0 + + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort label-6592 @@ -44682,7 +44682,7 @@ SELECT col1 AS col1 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - 0 # Datafusion - Expected - 81 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - - COALESCE ( col1, CAST ( + 52 AS INTEGER ) + 63, + tab0.col0 * tab0.col0 ) FROM tab0 GROUP BY col1 query I rowsort label-6700 @@ -45700,7 +45700,7 @@ SELECT ALL + cor0.col2 / cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 15747 # Datafusion - Expected - 8816 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 94, col0 * - CASE - cor0.col2 WHEN col2 + cor0.col2 * cor0.col1 THEN NULL WHEN + col2 THEN NULL ELSE - cor0.col2 END - col2 ) * cor0.col2 + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -46488,7 +46488,7 @@ SELECT ALL col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0 # Datafusion - Expected - 78 # Datafusion - Expected - 78 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col2 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 78, - cor1.col2 * - 62 - + 55 ) col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2 query I rowsort @@ -47163,7 +47163,7 @@ SELECT + col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2 # Datafusion - Expected - -26 # Datafusion - Expected - 55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - cor0.col1 + COALESCE ( 55, - col1, - cor0.col2 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -47806,7 +47806,7 @@ SELECT DISTINCT + - 12 col1 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - -16 # Datafusion - Expected - -16 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 16, cor0.col1 * cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -50088,7 +50088,7 @@ SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1, cor0.col1 # Datafusion - Expected - 6 # Datafusion - Expected - 6 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 6, - cor0.col2 * 9, + cor0.col2 * cor0.col1, cor0.col2 + + cor0.col1 ) col1 FROM tab2 AS cor0 GROUP BY col0 query I rowsort @@ -52987,7 +52987,7 @@ SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1 # Datafusion - Expected - 24 # Datafusion - Expected - 24 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 24, col0 * cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -53505,7 +53505,7 @@ SELECT 26 FROM tab0 GROUP BY col1 # Datafusion - Expected - -67 # Datafusion - Expected - -67 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 67, + cor0.col1 * col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort label-8025 @@ -54245,7 +54245,7 @@ SELECT cor0.col2 / cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 823 # Datafusion - Expected - 863 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 + + 52 * + COALESCE ( 15, cor0.col2 + cor0.col2 / 65, cor0.col1 + - 53 ) col1 FROM tab0 AS cor0 GROUP BY col0 query I rowsort label-8136 @@ -55646,7 +55646,7 @@ SELECT DISTINCT + cor0.col0 * 33 - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY # Datafusion - Expected - -40 # Datafusion - Expected - -40 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 40, - cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort label-8346 @@ -55702,7 +55702,7 @@ SELECT DISTINCT col2 * + 77 FROM tab2 GROUP BY col2 # Datafusion - Expected - -94 # Datafusion - Expected - -94 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 94, - cor0.col1 * cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2, col0 query I rowsort @@ -56543,7 +56543,7 @@ SELECT ALL - 25 / 28 col1 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -93 # Datafusion - Expected - -93 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 93, cor0.col1, 38 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort label-8481 @@ -58783,7 +58783,7 @@ SELECT ALL + - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 462 # Datafusion - Expected - 462 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 22, - tab1.col0 * 21 ) * 21 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -62604,7 +62604,7 @@ SELECT + - tab0.col2 AS col0 FROM tab0 GROUP BY col2 # Datafusion - Expected - 29 # Datafusion - Expected - 29 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 29, cor0.col0, + cor0.col2 * cor0.col1 - + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -64398,7 +64398,7 @@ SELECT ALL - 87 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 42 # Datafusion - Expected - 42 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 42, col2 + cor0.col2 * col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -64421,7 +64421,7 @@ SELECT 32 AS col0 FROM tab2 cor0 GROUP BY cor0.col1 # Datafusion - Expected - -2082 # Datafusion - Expected - -5098 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 57, cor0.col0, COALESCE ( CASE col0 WHEN - col0 THEN NULL WHEN cor0.col0 * cor0.col2 THEN NULL WHEN + col0 THEN - cor0.col1 END, - 93, cor0.col2 ) ) + + col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -64887,7 +64887,7 @@ SELECT DISTINCT 98 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 71 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 71, cor0.col2 + - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -66215,7 +66215,7 @@ SELECT ALL cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT - c # Datafusion - Expected - 21 # Datafusion - Expected - 21 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 21, + cor0.col0, - CAST ( NULL AS INTEGER ), cor0.col2 + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_10.slt b/data/sqlite/random/groupby/slt_good_10.slt index 3bb12c2..9d8ade3 100644 --- a/data/sqlite/random/groupby/slt_good_10.slt +++ b/data/sqlite/random/groupby/slt_good_10.slt @@ -322,7 +322,7 @@ SELECT col0 AS col1 FROM tab2 WHERE NOT NULL BETWEEN NULL AND NULL GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2, avg\(tab1\.col1\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2, avg\(tab1\.col1\)" appears in the SELECT clause satisfies this requirement SELECT - col2 AS col1 FROM tab1 GROUP BY col2 HAVING NOT NULL BETWEEN + col2 AND AVG ( ALL col1 ) + - col1 query I rowsort @@ -1216,7 +1216,7 @@ SELECT DISTINCT + + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 AS col2 FROM tab1 GROUP BY col1 HAVING NULL NOT BETWEEN ( + col1 + + col1 ) AND ( + col2 ) query II rowsort @@ -1526,7 +1526,7 @@ SELECT + col2 col1 FROM tab1 AS cor0 GROUP BY col2, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL BETWEEN + col2 AND NULL query I rowsort @@ -2075,7 +2075,7 @@ SELECT ALL + - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL col2 AS col0 FROM tab2 cor0 GROUP BY col2 HAVING NULL < - col0 query I rowsort @@ -3541,7 +3541,7 @@ SELECT ALL + col2 AS col0 FROM tab2 GROUP BY col2 HAVING NOT NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + - col2 AS col0 FROM tab0 cor0 GROUP BY col2, col2 HAVING NOT NULL NOT BETWEEN - col0 AND NULL query I rowsort @@ -5757,7 +5757,7 @@ SELECT - col0 * col2 FROM tab0 AS cor0 GROUP BY col2, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 col1 FROM tab2 AS cor0 GROUP BY col2 HAVING ( NULL ) IN ( col1 ) query I rowsort @@ -6557,7 +6557,7 @@ SELECT + col2 - - col2 + - col1 FROM tab1 GROUP BY col2, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2, col0 HAVING NOT NULL BETWEEN NULL AND + col0 - col1 query I rowsort @@ -7355,7 +7355,7 @@ SELECT - col1 * + - col1 + + col1 FROM tab2 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 AS col1 FROM tab1 GROUP BY col2 HAVING + col1 > NULL query I rowsort @@ -8775,7 +8775,7 @@ SELECT + col1 AS col1 FROM tab0 cor0 WHERE ( NOT NULL <> NULL ) OR ( NULL ) > NU # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col2 AS col0 FROM tab2 GROUP BY col2 HAVING + - col0 < NULL query I rowsort @@ -10773,7 +10773,7 @@ SELECT col0 AS col1 FROM tab0 AS cor0 WHERE NOT + col1 IS NULL GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - col0 AS col2 FROM tab1 GROUP BY col0 HAVING NOT + - col2 <> NULL query I rowsort @@ -11631,7 +11631,7 @@ SELECT + col0 * col0 FROM tab1 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + + col2 AS col1 FROM tab2 WHERE - + col1 IS NOT NULL GROUP BY col2 HAVING ( NULL ) <> col1 query II rowsort @@ -12717,7 +12717,7 @@ SELECT ALL col0 * + col0 FROM tab1 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT + col2 < NULL query I rowsort @@ -13002,7 +13002,7 @@ SELECT DISTINCT col0 * col0 col0 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 AS col1 FROM tab2 GROUP BY col0 HAVING NOT ( ( NOT NULL <> + col1 ) ) query I rowsort @@ -13407,7 +13407,7 @@ SELECT DISTINCT - col0 FROM tab2 GROUP BY col0 HAVING NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col2 - + col2 * - col2 col0 FROM tab0 GROUP BY col2 HAVING NOT ( NULL ) NOT IN ( col0 ) # Datafusion - Datafusion expected results: @@ -13456,7 +13456,7 @@ SELECT ALL - col1 AS col2 FROM tab1 GROUP BY col2, col1, col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + col2 col1 FROM tab1 GROUP BY col2 HAVING col1 = NULL query I rowsort @@ -13964,7 +13964,7 @@ SELECT ALL - col1 FROM tab0 GROUP BY col1 HAVING NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 AS col0 FROM tab0 GROUP BY col1 HAVING NOT ( NOT col0 BETWEEN NULL AND NULL ) query I rowsort @@ -13988,7 +13988,7 @@ SELECT + col0 - - col0 FROM tab0 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + col2 col0 FROM tab2 AS cor0 WHERE col1 < NULL GROUP BY col2 HAVING NULL > - col0 query I rowsort @@ -14380,7 +14380,7 @@ SELECT ALL + col1 * col2 FROM tab2 AS cor0 GROUP BY col1, col2 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 AS col1, col1 AS col2 FROM tab1 GROUP BY col1 HAVING ( NULL ) = col2 query I rowsort @@ -17339,7 +17339,7 @@ SELECT col0 FROM tab2 AS cor0 GROUP BY col1, col0, col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col1 AS col0 FROM tab1 GROUP BY col1 HAVING - col0 <= NULL query I rowsort @@ -18912,7 +18912,7 @@ SELECT DISTINCT + col1 / - col2 FROM tab2 AS cor0 GROUP BY col2, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT col2 < NULL query I rowsort @@ -19542,7 +19542,7 @@ SELECT DISTINCT - col2 * col2 FROM tab2 AS cor0 GROUP BY col2, col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + col0 AS col2 FROM tab0 WHERE NULL IS NOT NULL GROUP BY col0 HAVING NULL > + col2 query I rowsort @@ -20942,7 +20942,7 @@ SELECT - col0 AS col2 FROM tab2 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - col2 * + - col1 AS col0 FROM tab0 GROUP BY col2, col1 HAVING NULL NOT BETWEEN col0 AND - col0 query I rowsort @@ -22045,7 +22045,7 @@ SELECT - - col0 FROM tab0 AS cor0 GROUP BY col1, col0 HAVING - - col0 >= NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 + - col2 col0 FROM tab2 AS cor0 GROUP BY col2, col2 HAVING NOT NULL NOT IN ( col0 ) query I rowsort @@ -22178,7 +22178,7 @@ SELECT ALL - - col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, col2, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col1 HAVING + col0 = NULL query I rowsort @@ -24182,7 +24182,7 @@ SELECT - - col2 FROM tab1 AS cor0 GROUP BY col2, col0, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col2 * - col2 * + + col2 - - col2 col1 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT - + col1 < NULL query I rowsort @@ -24196,7 +24196,7 @@ SELECT DISTINCT - + col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT AVG ( col0 ) # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0 AS col1 FROM tab1 GROUP BY col0 HAVING NULL BETWEEN ( - + col0 ) AND + col1 query I rowsort @@ -24528,7 +24528,7 @@ SELECT ALL + col2 FROM tab0 GROUP BY col2 HAVING NOT NULL BETWEEN NULL AND ( col # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0, tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col0 AS col2 FROM tab2 GROUP BY col0, col0 HAVING NOT NULL < col2 + col0 query I rowsort @@ -24989,7 +24989,7 @@ SELECT DISTINCT AVG ( col2 ) AS col1 FROM tab0 AS cor0 WHERE NOT col1 <= ( NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 AS col0 FROM tab1 GROUP BY col2 HAVING NULL <= - col0 query I rowsort @@ -25415,7 +25415,7 @@ SELECT - col0 FROM tab1 AS cor0 GROUP BY col0, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL col0 col1 FROM tab1 AS cor0 GROUP BY col0, col2 HAVING NOT NULL NOT IN ( col1, col1 - - col1 ) query I rowsort @@ -27912,7 +27912,7 @@ SELECT ALL - col2 AS col0 FROM tab0 WHERE NOT NULL IS NOT NULL GROUP BY col0, co # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 AS col0 FROM tab1 GROUP BY col2 HAVING NOT NULL BETWEEN ( - col2 ) AND ( col0 ) query I rowsort @@ -28058,7 +28058,7 @@ SELECT ALL - col1 * - col1 AS col2 FROM tab1 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col0 AS col2 FROM tab0 GROUP BY col0 HAVING NULL >= col2 query I rowsort @@ -29396,7 +29396,7 @@ SELECT DISTINCT - col1 FROM tab1 AS cor0 GROUP BY col1, col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 col1 FROM tab2 GROUP BY col2 HAVING NOT ( NULL NOT IN ( col1 ) ) query I rowsort @@ -34328,7 +34328,7 @@ SELECT - col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT NULL = NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col2 col0 FROM tab2 AS cor0 GROUP BY col2, col1 HAVING NULL < + + col0 - col2 query I rowsort @@ -34971,7 +34971,7 @@ SELECT ALL + + col0 FROM tab0 AS cor0 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, avg\(\(\- tab0\.col2\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, avg\(\(\- tab0\.col2\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL AVG ( ALL - col2 ) AS col0 FROM tab0 WHERE NOT ( - col2 ) BETWEEN ( NULL ) AND NULL GROUP BY col2 HAVING NULL BETWEEN + col0 AND ( NULL ) query I rowsort @@ -35193,7 +35193,7 @@ SELECT col1 FROM tab2 AS cor0 GROUP BY col1, col2, col1 HAVING NOT + col2 IS NOT # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - col2 AS col0 FROM tab1 AS cor0 GROUP BY col1, col2 HAVING NOT NULL <= - - col0 query I rowsort @@ -37806,7 +37806,7 @@ SELECT DISTINCT - - col0 AS col1 FROM tab1 cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 AS col2 FROM tab2 cor0 GROUP BY col0 HAVING NULL <> ( + col2 ) query I rowsort @@ -38045,7 +38045,7 @@ SELECT col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, col2 HAVING NOT NULL <= NUL # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2, tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + col2 * + col2 col1 FROM tab2 GROUP BY col2, col2 HAVING NOT NULL IN ( - col1 ) query I rowsort @@ -39453,7 +39453,7 @@ SELECT ALL col2 col2 FROM tab2 AS cor0 GROUP BY col2 HAVING NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 col0 FROM tab0 GROUP BY col1 HAVING - col0 NOT BETWEEN NULL AND NULL # Datafusion - Types were automatically converted from: @@ -40405,7 +40405,7 @@ SELECT col1 AS col2 FROM tab1 GROUP BY col1, col2, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, col0 HAVING NOT - col2 <= NULL query I rowsort @@ -40554,7 +40554,7 @@ SELECT DISTINCT - col1 * - col1 + - col1 * - - col1 AS col0 FROM tab1 AS cor0 GR # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING + col2 > NULL query I rowsort @@ -40575,7 +40575,7 @@ SELECT - col2 FROM tab2 GROUP BY col0, col2 HAVING NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col0 HAVING NULL > ( col1 ) query I rowsort @@ -40961,7 +40961,7 @@ SELECT DISTINCT col1 - col1 - col1 FROM tab0 AS cor0 GROUP BY col1, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0 AS col2 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT col2 / - col2 + + col0 <> NULL query I rowsort @@ -41041,7 +41041,7 @@ SELECT col2 AS col2 FROM tab2 GROUP BY col1, col0, col2 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2, tab1\.col2, avg\(tab1\.col2\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2, tab1\.col2, avg\(tab1\.col2\)" appears in the SELECT clause satisfies this requirement SELECT ALL - AVG ( ALL col2 ) AS col1 FROM tab1 GROUP BY col2, col2 HAVING ( NULL ) BETWEEN NULL AND ( col1 ) query I rowsort @@ -41167,7 +41167,7 @@ SELECT DISTINCT + col0, col0 * col0 / + col0 FROM tab1 AS cor0 GROUP BY col0, co # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col1 * col2 + - - col1 + - + col2 AS col0 FROM tab2 AS cor0 GROUP BY col1, col2 HAVING - + col0 <> NULL query I rowsort @@ -41851,7 +41851,7 @@ SELECT ALL col2 + - - col2 AS col1 FROM tab0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 col1 FROM tab1 cor0 WHERE NOT NULL IS NOT NULL GROUP BY col2 HAVING col1 > NULL query I rowsort @@ -42493,7 +42493,7 @@ SELECT - col0 AS col2 FROM tab2 AS cor0 WHERE NOT + col1 IS NOT NULL GROUP BY co # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0, avg\(\(\- tab2\.col0\)\), avg\(tab2\.col0\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, avg\(\(\- tab2\.col0\)\), avg\(tab2\.col0\)" appears in the SELECT clause satisfies this requirement SELECT + AVG ( - + col0 ) * col0 AS col1 FROM tab2 GROUP BY col0 HAVING NOT NULL = - - col1 + - AVG ( ALL col0 ) query II rowsort @@ -42694,7 +42694,7 @@ SELECT ALL col0 AS col1 FROM tab1 cor0 GROUP BY col0, col0, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col0 HAVING - col1 * col1 * - col0 = NULL query I rowsort @@ -43331,7 +43331,7 @@ SELECT ALL col1 + + col1 FROM tab2 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 col0 FROM tab2 AS cor0 WHERE NOT NULL IS NULL GROUP BY col1, col2 HAVING ( NULL ) NOT BETWEEN col0 AND NULL query I rowsort @@ -43956,7 +43956,7 @@ SELECT DISTINCT col1 + + col1 FROM tab0 cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT col0 <= NULL query I rowsort @@ -44754,7 +44754,7 @@ SELECT ALL - + col2 FROM tab2 cor0 GROUP BY col0, col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2, tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col2 AS col1 FROM tab2 GROUP BY col2, col0 HAVING NULL NOT BETWEEN NULL AND + col1 query I rowsort @@ -45356,7 +45356,7 @@ SELECT DISTINCT + col1 FROM tab2 GROUP BY col1 HAVING NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL col2 col2, + col2 * + + col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, col2 HAVING + col0 < NULL query I rowsort @@ -48212,7 +48212,7 @@ SELECT - col2 FROM tab0 AS cor0 GROUP BY col2, col2 HAVING NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0, avg\(tab1\.col0\), avg\(DISTINCT tab1\.col0\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, avg\(tab1\.col0\), avg\(DISTINCT tab1\.col0\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT AVG ( ALL + col0 ) * - AVG ( DISTINCT col0 ) AS col1 FROM tab1 GROUP BY col0 HAVING ( col1 ) <> NULL query I rowsort @@ -48433,7 +48433,7 @@ SELECT ALL + col0 FROM tab1 GROUP BY col0, col0, col2 HAVING NOT NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - col2 - col2 * - col0 AS col1 FROM tab2 AS cor0 GROUP BY col2, col0 HAVING NOT + + col1 >= NULL query I rowsort @@ -49445,7 +49445,7 @@ SELECT DISTINCT col0, - col0 col0 FROM tab1 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2 HAVING NULL >= - col1 query I rowsort @@ -49529,7 +49529,7 @@ SELECT + col1 col0 FROM tab1 GROUP BY col2, col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, tab0\.col2, tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, tab0\.col2, tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT + col2 AS col0 FROM tab0 GROUP BY col2, col2, col2 HAVING NULL < col0 query I rowsort @@ -51545,7 +51545,7 @@ SELECT ALL - col0 col0 FROM tab2 GROUP BY col2, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col2 FROM tab1 cor0 GROUP BY col1, col1 HAVING - col2 < NULL query I rowsort @@ -52117,7 +52117,7 @@ SELECT DISTINCT + col0 col0 FROM tab1 AS cor0 WHERE - col2 IS NOT NULL GROUP BY # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2, tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT - col2 AS col1 FROM tab0 GROUP BY col2, col2 HAVING NOT NULL BETWEEN NULL AND - - col2 / - col1 query I rowsort @@ -52996,7 +52996,7 @@ SELECT ALL col0 / + col0 AS col0 FROM tab2 GROUP BY col2, col0 HAVING NOT NULL I # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + col0 AS col1, col0 AS col2 FROM tab1 GROUP BY col0 HAVING NOT + col2 BETWEEN NULL AND NULL query I rowsort @@ -53140,7 +53140,7 @@ SELECT ALL + col2 - - + col2 + - - col2 FROM tab2 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 AS col2 FROM tab1 GROUP BY col1 HAVING NOT NULL <> - col2 query I rowsort @@ -54339,7 +54339,7 @@ SELECT DISTINCT - + col1 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0 AS col2 FROM tab0 AS cor0 WHERE - col2 >= + col0 GROUP BY col0 HAVING + col2 > NULL query I rowsort @@ -54462,7 +54462,7 @@ SELECT col2 + col2 AS col0 FROM tab1 GROUP BY col1, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0, avg\(\(\- cor0\.col0\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0, avg\(\(\- cor0\.col0\)\)" appears in the SELECT clause satisfies this requirement SELECT AVG ( + - col0 ) AS col1 FROM tab0 cor0 GROUP BY col2, col0 HAVING + col1 + col2 BETWEEN NULL AND NULL query I rowsort @@ -55464,7 +55464,7 @@ SELECT - col1 FROM tab0 AS cor0 GROUP BY col1 HAVING NULL = NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col0 col2 FROM tab1 GROUP BY col0 HAVING ( + col0 - + + col2 ) = NULL query I rowsort @@ -56459,7 +56459,7 @@ SELECT + col2 FROM tab0 GROUP BY col2, col0, col2 # Datafusion - Expected - -48 # Datafusion - Expected - -76 skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, avg\(DISTINCT cor0\.col1\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, avg\(DISTINCT cor0\.col1\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + col2 + + - col2 col1 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL IS NULL OR NOT AVG ( DISTINCT col1 ) * - col1 IS NOT NULL query I rowsort @@ -56688,7 +56688,7 @@ SELECT ALL + - col1 - - + col1 AS col0 FROM tab2 AS cor0 GROUP BY col1 HAVING ( # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col0 AS col2 FROM tab1 AS cor0 GROUP BY col0 HAVING col2 * col0 <> ( NULL ) query I rowsort @@ -56790,7 +56790,7 @@ SELECT DISTINCT + - col1 FROM tab2 WHERE NULL IS NULL GROUP BY col1, col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col2 FROM tab2 GROUP BY col1 HAVING NOT ( col2 ) BETWEEN NULL AND NULL query I rowsort @@ -57497,7 +57497,7 @@ SELECT col1 AS col1 FROM tab0 GROUP BY col1 HAVING AVG ( - col2 ) <> NULL # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col0 col2 FROM tab2 GROUP BY col0 HAVING NULL NOT IN ( + col2 ) query I rowsort @@ -58179,7 +58179,7 @@ SELECT ALL + col1 AS col1 FROM tab1 GROUP BY col1, col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + col2 col0 FROM tab0 GROUP BY col1, col2 HAVING NOT col0 <= NULL query I rowsort @@ -60585,7 +60585,7 @@ SELECT col0 col0 FROM tab0 cor0 GROUP BY col0, col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col2 FROM tab2 GROUP BY col1 HAVING NULL >= + col2 + + - col1 query I rowsort @@ -62125,7 +62125,7 @@ SELECT DISTINCT col0 FROM tab1 cor0 WHERE NOT ( col0 ) <= NULL GROUP BY col2, co # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL col2 AS col0 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT + col0 < NULL query II rowsort diff --git a/data/sqlite/random/groupby/slt_good_11.slt b/data/sqlite/random/groupby/slt_good_11.slt index c3f799b..bd24f89 100644 --- a/data/sqlite/random/groupby/slt_good_11.slt +++ b/data/sqlite/random/groupby/slt_good_11.slt @@ -426,7 +426,7 @@ SELECT + col2 / + col2 AS col0 FROM tab1 cor0 GROUP BY col2 HAVING NULL IS NOT N # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 col2 FROM tab2 GROUP BY col0 HAVING NULL BETWEEN - col2 AND NULL query I rowsort @@ -583,7 +583,7 @@ SELECT DISTINCT col2 * - col2 AS col1 FROM tab1 GROUP BY col1, col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2, tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL col2 AS col0, + col2 FROM tab2 GROUP BY col2, col2 HAVING col0 <> NULL query I rowsort @@ -711,7 +711,7 @@ SELECT + col1 * - col1 AS col0 FROM tab0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1, tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1, tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 col0 FROM tab1 GROUP BY col1, col1 HAVING NOT NULL NOT IN ( - col0 ) query I rowsort @@ -1210,7 +1210,7 @@ SELECT - col1 AS col1 FROM tab2 GROUP BY col1 HAVING NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, col1 HAVING NULL <= + col0 query I rowsort @@ -1905,7 +1905,7 @@ SELECT col0 FROM tab1 AS cor0 GROUP BY col0, col0, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - col0 * + col0 AS col1 FROM tab1 cor0 GROUP BY col0 HAVING NULL NOT BETWEEN + col1 AND NULL query I rowsort @@ -3144,7 +3144,7 @@ SELECT DISTINCT - col0 col1 FROM tab2 WHERE NULL > ( NULL ) GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col2 AS col1 FROM tab2 GROUP BY col2 HAVING NOT NULL <> - col1 query I rowsort @@ -3636,7 +3636,7 @@ SELECT ALL - col2 / - col2 AS col2 FROM tab1 GROUP BY col2 HAVING col2 > NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT - col2 AS col1 FROM tab0 GROUP BY col2 HAVING col1 > NULL query I rowsort @@ -3824,7 +3824,7 @@ SELECT - - col2 + + col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0, tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col2 AS col1 FROM tab2 GROUP BY col0, col2 HAVING NOT ( NULL ) BETWEEN NULL AND ( col1 ) query I rowsort @@ -3957,7 +3957,7 @@ SELECT - - col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, col1, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 AS col0 FROM tab0 AS cor0 GROUP BY col2 HAVING + col0 >= NULL # Datafusion - Datafusion expected results: @@ -4464,7 +4464,7 @@ SELECT ALL col1 FROM tab2 GROUP BY col1, col0 HAVING NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + col0 AS col1 FROM tab2 AS cor0 GROUP BY col2, col0 HAVING NULL <= - - col1 query I rowsort @@ -6684,7 +6684,7 @@ SELECT DISTINCT + col2 * - AVG ( ALL + col2 ) AS col0 FROM tab2 WHERE - + col2 I # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2, tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 AS col1 FROM tab2 GROUP BY col2, col2 HAVING - + col1 <= NULL query I rowsort @@ -6746,7 +6746,7 @@ SELECT - - col1 FROM tab0 AS cor0 GROUP BY col1, col0, col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col1 AS col0 FROM tab2 GROUP BY col1 HAVING NULL <> - col0 query I rowsort @@ -6759,7 +6759,7 @@ SELECT ALL + col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, col2, col2, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - + col1 AS col2 FROM tab1 cor0 GROUP BY col1, col1 HAVING + + col2 <> NULL query I rowsort @@ -7739,7 +7739,7 @@ SELECT ALL col0 AS col1 FROM tab2 AS cor0 GROUP BY col1, col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0 AS col2 FROM tab1 GROUP BY col0 HAVING NOT NULL = - col2 query I rowsort @@ -8107,7 +8107,7 @@ SELECT col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL BETWEEN NULL AND NUL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + - col2 col0 FROM tab0 AS cor0 GROUP BY col2 HAVING ( NULL ) <> col0 query I rowsort @@ -9176,7 +9176,7 @@ SELECT DISTINCT + col2 AS col0 FROM tab2 AS cor0 GROUP BY col0, col2, col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col0 FROM tab0 GROUP BY col1, col1 HAVING NULL = - col0 query I rowsort @@ -9472,7 +9472,7 @@ SELECT AVG ( ALL + col0 ) FROM tab2 GROUP BY col0, col0 HAVING NOT ( NULL ) IS N # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col2, avg\(\(\- cor0\.col2\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2, avg\(\(\- cor0\.col2\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2, AVG ( ALL - col2 ) * - - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, col2 HAVING NOT NULL <= col1 query I rowsort @@ -9794,7 +9794,7 @@ SELECT DISTINCT + col1 col2 FROM tab2 cor0 GROUP BY col1, col0, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 + col1 * - col1 AS col2 FROM tab2 AS cor0 GROUP BY col0, col1 HAVING NOT NULL NOT BETWEEN col2 AND NULL query I rowsort @@ -10722,7 +10722,7 @@ SELECT DISTINCT - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, col2 HAVING - + # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL col2 AS col0 FROM tab2 AS cor0 GROUP BY col2 HAVING ( - - col0 ) > NULL query I rowsort @@ -11462,7 +11462,7 @@ SELECT ALL col0 AS col2 FROM tab1 GROUP BY col1, col0 HAVING NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 AS col0 FROM tab1 GROUP BY col2 HAVING NOT ( NULL ) <= - col0 - - col0 query I rowsort @@ -12618,7 +12618,7 @@ SELECT DISTINCT col0 AS col0 FROM tab1 AS cor0 WHERE NULL IS NULL GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0 AS col2 FROM tab2 GROUP BY col0 HAVING + - col2 > NULL query I rowsort @@ -12672,7 +12672,7 @@ SELECT - col1 * - AVG ( DISTINCT - + col1 ) FROM tab1 WHERE NOT NULL IS NULL GRO # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2, tab1\.col2, tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2, tab1\.col2, tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL col2 AS col0 FROM tab1 GROUP BY col2, col2, col2 HAVING NOT NULL <> - - col0 query I rowsort @@ -12759,7 +12759,7 @@ SELECT + col0 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT ( NULL IS NOT NULL ) # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT NULL >= + - col1 query I rowsort @@ -12966,7 +12966,7 @@ SELECT ALL - + col0 * col0 + + + col0 AS col1, col0 + col0 FROM tab2 AS cor0 GRO # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col1, col1 HAVING col0 <> NULL query I rowsort @@ -13310,7 +13310,7 @@ SELECT col1 / - col1 FROM tab2 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0, tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT + col0 AS col2, + col1 FROM tab1 GROUP BY col0, col1 HAVING NOT ( NULL ) < col1 + col2 query I rowsort @@ -14130,7 +14130,7 @@ SELECT col1 + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT - col2 AS col0 FROM tab2 GROUP BY col2 HAVING + col0 <= NULL query I rowsort @@ -14464,7 +14464,7 @@ SELECT col0 col2 FROM tab1 AS cor0 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, avg\(DISTINCT cor0\.col0\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, avg\(DISTINCT cor0\.col0\)" appears in the SELECT clause satisfies this requirement SELECT + col0 * - - AVG ( DISTINCT col0 ) AS col1 FROM tab1 cor0 GROUP BY col0 HAVING NOT NULL BETWEEN - col1 AND NULL query I rowsort @@ -14980,7 +14980,7 @@ SELECT ALL col0 AS col1 FROM tab0 GROUP BY col1, col0 HAVING NOT NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, avg\(\(\- \(\- cor0\.col2\)\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, avg\(\(\- \(\- cor0\.col2\)\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col0 col2 FROM tab0 AS cor0 GROUP BY col0 HAVING - col2 - + + AVG ( ALL - - col2 ) >= NULL query I rowsort @@ -15111,7 +15111,7 @@ SELECT col0 * + - col0 * col0 FROM tab2 AS cor0 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 / + + col1 AS col0 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT col0 <= NULL query I rowsort @@ -16214,7 +16214,7 @@ SELECT ALL + AVG ( DISTINCT - col0 ) + - col0 * col0 AS col1 FROM tab2 GROUP BY # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 * - col1 AS col2 FROM tab0 GROUP BY col1 HAVING col2 >= NULL query I rowsort @@ -16851,7 +16851,7 @@ SELECT ALL col0 FROM tab2 GROUP BY col0 HAVING ( NULL ) IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1, tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 AS col2 FROM tab2 GROUP BY col1, col0 HAVING ( + col2 ) >= NULL query I rowsort @@ -16969,7 +16969,7 @@ SELECT ALL - col2 * - col2 FROM tab1 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 / - col1 AS col2 FROM tab0 AS cor0 WHERE col0 IS NULL GROUP BY col1 HAVING ( col2 ) IS NULL OR NOT NULL IS NOT NULL query II rowsort @@ -17328,7 +17328,7 @@ SELECT DISTINCT col0 col1 FROM tab2 GROUP BY col2, col0, col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT 26 - - col2 col1 FROM tab1 GROUP BY col2 HAVING NOT 62 NOT BETWEEN + col1 + - - col1 AND - 38 query I rowsort @@ -17702,7 +17702,7 @@ SELECT + col2 * - 25 FROM tab0 GROUP BY col0, col2 HAVING NOT - 27 IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col2 col1, ( - 94 ) - - - 67 * + - col2 + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col2 HAVING - col1 BETWEEN ( NULL ) AND NULL query I rowsort label-2859 @@ -17719,7 +17719,7 @@ SELECT ( + + col2 ) col2, - col2 * + - 32 AS col1 FROM tab2 AS cor0 WHERE col0 + # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - col0 * + 57 * col0 col2 FROM tab1 AS cor0 GROUP BY col0, col0, col0 HAVING NOT NULL NOT BETWEEN ( + col2 ) AND col2 query I rowsort label-2862 @@ -17805,7 +17805,7 @@ SELECT DISTINCT 77 FROM tab2 AS cor0 WHERE + 15 + col0 IS NULL GROUP BY col0, co # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT CASE - CAST ( NULL AS INTEGER ) WHEN - col1 THEN + col0 - - 48 ELSE NULL END AS col2 FROM tab0 GROUP BY col1 query I rowsort label-2876 @@ -17892,7 +17892,7 @@ SELECT + 86 + col2 / 2 AS col2 FROM tab2 WHERE NOT col2 < - col0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - + col2 col0 FROM tab0 AS cor0 GROUP BY col2 HAVING ( NULL ) <> 11 + - + col0 * CAST ( NULL AS INTEGER ) query I rowsort @@ -18880,7 +18880,7 @@ SELECT col2 AS col2 FROM tab0 AS cor0 WHERE NOT ( NULL ) IS NULL GROUP BY col2 H # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, avg\(DISTINCT \(\- cor0\.col0\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, avg\(DISTINCT \(\- cor0\.col0\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT CASE col2 WHEN - col2 THEN - AVG ( DISTINCT - col0 ) END AS col1 FROM tab1 cor0 GROUP BY col2 HAVING + col1 = NULL query I rowsort @@ -18970,7 +18970,7 @@ SELECT ALL + col1 AS col0 FROM tab1 WHERE NULL > + + 71 * + - col2 + + col1 + - # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, col1, col2 HAVING NOT NULL BETWEEN + - 33 * - - 38 + + col1 AND + col2 + - + col0 query I rowsort @@ -19106,7 +19106,7 @@ SELECT ALL ( col0 ) AS col0 FROM tab2 GROUP BY col0, col2 HAVING NOT - col2 / + # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2, tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT + col2 col0 FROM tab2 GROUP BY col2, col1 HAVING NOT ( - ( - ( - + CASE 38 WHEN - col2 + + + col1 THEN - ( - - 57 ) / - 79 * + col2 WHEN - col0 THEN - 13 ELSE NULL END ) ) / + + col2 < NULL ) query II rowsort @@ -19841,7 +19841,7 @@ SELECT DISTINCT + col2 FROM tab0 AS cor0 WHERE NOT NULL IS NULL GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT 55 * - col2 AS col1 FROM tab2 AS cor0 WHERE NOT NULL > NULL GROUP BY col2 HAVING NULL >= col1 query I rowsort @@ -20372,7 +20372,7 @@ SELECT DISTINCT col0 - + - col0 FROM tab1 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 + + col1 + 10 * - 81 * COALESCE ( 7, + 91 + col1 + ( + col2 ) ) + - - col1 AS col1 FROM tab1 GROUP BY col1 HAVING NOT ( col1 = NULL ) query I rowsort @@ -20622,7 +20622,7 @@ SELECT col0 * + col0 + - col0 AS col0, col0 AS col0 FROM tab2 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0, tab1\.col2, tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col2, tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col0 + COALESCE ( ( + 53 ), - CAST ( NULL AS INTEGER ) * NULLIF ( - col2, - col1 ) ) AS col1 FROM tab1 WHERE ( - col0 ) = NULL GROUP BY col0, col2, col2 query I rowsort @@ -20820,7 +20820,7 @@ SELECT - + 44 col0 FROM tab2 AS cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 50, col1 ) FROM tab1 GROUP BY col2 HAVING NOT NULL <= + - ( + - 58 ) + + + col2 query I rowsort @@ -21226,7 +21226,7 @@ SELECT DISTINCT + - col0 AS col0 FROM tab2 WHERE NOT NULL <= + 48 * + + 99 * + + # Datafusion - Expected - 38 # Datafusion - Expected - -46 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + 38, + COALESCE ( - - COALESCE ( - 46, + - col1 ), + 74 ) AS col0 FROM tab2 GROUP BY col0 query I rowsort @@ -21580,7 +21580,7 @@ SELECT ALL ( - col2 ) + - - col2 - - 93 AS col0 FROM tab1 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col0 FROM tab0 GROUP BY col2, col1 HAVING NOT ( NULL ) <> - ( + col0 ) query I rowsort @@ -22061,7 +22061,7 @@ SELECT DISTINCT 61 AS col2 FROM tab2 GROUP BY col1, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + - 75 AS col0 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL NOT BETWEEN - - col0 + 12 AND ( - 59 ) query II rowsort label-3571 @@ -22180,7 +22180,7 @@ SELECT 36 FROM tab1 GROUP BY col2, col1 # Datafusion - Expected - -83 # Datafusion - Expected - -83 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 83, + - ( col2 ) * - - col0 * CAST ( + col1 AS INTEGER ) ) FROM tab1 GROUP BY col1 query I rowsort @@ -22353,7 +22353,7 @@ SELECT 93 FROM tab0 GROUP BY col2, col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT - col2 * - CAST ( NULL AS INTEGER ), ( + + 19 ) col1 FROM tab0 GROUP BY col2 HAVING ( NULL ) = ( col1 ) query I rowsort @@ -22531,7 +22531,7 @@ NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0, tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT + 35, + col2 * - 15 AS col1 FROM tab0 GROUP BY col0, col2 HAVING NOT NULL > - col1 * + 42 * - col0 + + col2 + - col1 query I rowsort @@ -22642,7 +22642,7 @@ SELECT DISTINCT + 93 FROM tab0 GROUP BY col0 HAVING NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT 16 / col1 col2 FROM tab1 AS cor0 WHERE NOT ( + col2 IN ( - col0 * - 77 ) ) GROUP BY col1 HAVING NOT ( NULL ) NOT IN ( + col2 - col2 ) query I rowsort @@ -22829,7 +22829,7 @@ SELECT DISTINCT + ( + 48 ) + - - 94 + + 86 * col0 AS col1 FROM tab1 AS cor0 GROU # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 * - col1 * - COALESCE ( 30, 14, - col0 + 5 ) FROM tab2 GROUP BY col1 HAVING ( NULL ) IS NOT NULL query I rowsort @@ -22856,7 +22856,7 @@ SELECT ALL - 50 * col0 FROM tab2 GROUP BY col1, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - 14 - col0 AS col2 FROM tab1 AS cor0 WHERE NULL <> col2 - - col2 GROUP BY col0 HAVING NOT + CAST ( - col2 AS INTEGER ) * col0 + - col2 / - 81 BETWEEN NULL AND NULL query I rowsort @@ -22913,7 +22913,7 @@ SELECT - 85 - + col2 FROM tab1 GROUP BY col2 HAVING ( NULL ) IS NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0 + 58 * + ( col0 * 4 ) col1 FROM tab0 GROUP BY col0 HAVING ( NULL ) IN ( col1 - - 68 ) query I rowsort label-3711 @@ -22927,7 +22927,7 @@ SELECT - 77 - col0 AS col2 FROM tab0 GROUP BY col0 HAVING NOT NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 HAVING ( col1 ) <= NULL query I rowsort label-3714 @@ -24133,7 +24133,7 @@ SELECT DISTINCT col0 + 90 * - ( col2 ) + - col0 FROM tab1 cor0 GROUP BY col2, co # Datafusion - Expected - 83 # Datafusion - Expected - 83 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 83, - - col0 / CASE col0 WHEN col1 THEN NULL WHEN col0 THEN - col1 END ) FROM tab1 AS cor0 GROUP BY col1 # Datafusion - Types were automatically converted from: @@ -24326,7 +24326,7 @@ SELECT - 30 - + col1 * + - 46 * 94 FROM tab2 cor0 GROUP BY col1, col0 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 AS col0, - CAST ( NULL AS FLOAT8 ) + col1 AS col1 FROM tab0 GROUP BY col1, col1 HAVING + 22 * + 61 + - - col0 > NULL query I rowsort @@ -24529,7 +24529,7 @@ SELECT DISTINCT 15, - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col2, col1 H # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 * - col1 * col1 + - + col1 AS col2, col1 AS col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT ( NULL ) BETWEEN + ( - col1 ) AND + col2 + - 3 query I rowsort @@ -24988,7 +24988,7 @@ SELECT + CAST ( + + 96 AS INTEGER ) FROM tab1 AS cor0 GROUP BY col0, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + 29 * + col0 AS col2 FROM tab2 AS cor0 GROUP BY col1, col0, col1 HAVING NULL > + col2 + + + col0 * - col2 * col1 * + 48 * - col1 query I rowsort label-4056 @@ -25933,7 +25933,7 @@ SELECT ALL + col2 * - 83 * NULLIF ( - 83, - 11 ) FROM tab2 AS cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, avg\(DISTINCT Int64\(35\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, avg\(DISTINCT Int64\(35\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT + - NULLIF ( + col1, - col0 ) * - AVG ( DISTINCT 35 ) >= NULL query I rowsort @@ -27208,7 +27208,7 @@ SELECT ALL col0 FROM tab1 WHERE ( + CAST ( NULL AS INTEGER ) / - col0 ) <= ( col # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 90, ( 11 ) + - col1 * + CAST ( NULL AS INTEGER ), col0 - col0 ) + - col0 FROM tab0 GROUP BY col0 HAVING NOT ( col0 ) <> NULL query I rowsort @@ -27558,7 +27558,7 @@ SELECT + col1 / - col1 * col1 FROM tab0 GROUP BY col1 HAVING + col1 IS NULL # Datafusion - Expected - 0 # Datafusion - Expected - 49005 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 * 98 * + COALESCE ( + 7, - col2 ) - col1 * col1 AS col1 FROM tab0 GROUP BY col1 query I rowsort label-4475 @@ -27721,7 +27721,7 @@ SELECT ALL 99 FROM tab2 GROUP BY col1, col0 HAVING NOT ( NULL ) > + 80 # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - col0 + + col0 AS col1 FROM tab0 WHERE col1 IN ( CAST ( col0 AS INTEGER ) ) GROUP BY col0 HAVING NOT CAST ( NULL AS INTEGER ) <= ( - col1 + + col1 ) query I rowsort @@ -28038,7 +28038,7 @@ SELECT + col2 + - + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2, col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT CASE - 59 WHEN 88 THEN - col0 * + + col2 + - 25 + - + CAST ( + col0 AS INTEGER ) END AS col1 FROM tab2 AS cor0 GROUP BY col1 query I rowsort @@ -28158,7 +28158,7 @@ SELECT + + col1 * 56 FROM tab1 AS cor0 GROUP BY col1, col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - 7 * + col1 * - col1 AS col0 FROM tab0 GROUP BY col1 HAVING NULL >= - col0 query I rowsort @@ -28614,7 +28614,7 @@ SELECT + col1 * + 99 AS col1 FROM tab0 AS cor0 GROUP BY col0, col1 # Datafusion - Expected - 22 # Datafusion - Expected - 22 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + + ( + 22 ), + - 99 * + - CASE + - col0 WHEN - col0 THEN - col2 ELSE NULL END * + col0 - + col0 ) FROM tab1 AS cor0 GROUP BY col1 HAVING NULL IS NULL query I rowsort @@ -28708,7 +28708,7 @@ SELECT 7 + - col1 FROM tab0 GROUP BY col1, col0, col2 HAVING NOT NULL BETWEEN + # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 + + CASE + - 82 WHEN - 28 THEN - col0 + - col2 END AS col1, - col1 / + col1 FROM tab0 GROUP BY col1, col2 HAVING + col1 > col1 # Datafusion - Datafusion expected results: @@ -28780,7 +28780,7 @@ SELECT col1 * + + col1 FROM tab2 cor0 GROUP BY col0, col1, col1 HAVING NOT + 56 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 AS col0 FROM tab0 AS cor0 WHERE NOT + 58 * + 43 IS NULL GROUP BY col1 HAVING NOT NULL NOT BETWEEN col0 AND NULL query I rowsort label-4677 @@ -28904,7 +28904,7 @@ NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col0 - col1, col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, col0 HAVING ( NULL ) <> + col2 - + CAST ( NULL AS INTEGER ) query I rowsort @@ -29607,7 +29607,7 @@ SELECT DISTINCT - + 78 + col1 col0 FROM tab2 cor0 GROUP BY col1, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + 85 * - + col2 + - - col2 + 54 + + 58 + - col2 * + col2 * - col2 / + - col2 AS col0 FROM tab2 cor0 GROUP BY col2 HAVING NOT 79 * - + col2 * - col0 >= NULL query I rowsort @@ -29941,7 +29941,7 @@ SELECT + col1 * ( + AVG ( 8 ) ) AS col2 FROM tab2 GROUP BY col1 HAVING NOT ( NUL # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 AS col0 FROM tab0 GROUP BY col2 HAVING NOT NULL = ( col0 + 42 * - CAST ( + 33 AS INTEGER ) ) query I rowsort @@ -30075,7 +30075,7 @@ SELECT 49 FROM tab0 AS cor0 WHERE + 99 * col2 IS NULL GROUP BY col0, col2 # Datafusion - Expected - 85 # Datafusion - Expected - 85 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 85, col0 / + ( col2 ) ) FROM tab0 AS cor0 GROUP BY col0 query I rowsort @@ -30234,7 +30234,7 @@ SELECT ALL 31 / - col2 AS col1 FROM tab0 GROUP BY col2 HAVING col2 <= NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col1 AS col2 FROM tab1 GROUP BY col1 HAVING NOT NULL < - col2 * CAST ( col2 AS INTEGER ) query I rowsort @@ -30566,7 +30566,7 @@ SELECT + 14 FROM tab0 cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1, tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT col1 * + col1 * - col1 AS col0 FROM tab2 GROUP BY col1, col2 HAVING NOT NULL BETWEEN col0 AND - - NULLIF ( col0, col0 * - col2 / + col0 ) query I rowsort @@ -30636,7 +30636,7 @@ SELECT DISTINCT + 16 * + col2 FROM tab2 AS cor0 GROUP BY col2, col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + 6 col1, - 40 FROM tab2 GROUP BY col0 HAVING NULL NOT IN ( - col1 * col1 * - col1 - - + 84, 62 - + 15 * + col1 ) query I rowsort @@ -31317,7 +31317,7 @@ SELECT DISTINCT - 22 AS col0 FROM tab1 WHERE NOT - ( + COALESCE ( - + 77, + - 49 # Datafusion - Expected - -65 # Datafusion - Expected - 97 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + + col1 + col1 + COALESCE ( - + 65, + + ( col0 ) ) AS col2 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT ( NOT ( + col1 ) IS NOT NULL ) query I rowsort @@ -32636,7 +32636,7 @@ SELECT - col0 / - 47 + - + col0 AS col0, col0 AS col1 FROM tab2 AS cor0 WHERE NO # Datafusion - Expected - -1 # Datafusion - Expected - 9 skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - 1, 9 AS col0 FROM tab0 cor0 GROUP BY col2 HAVING NOT - 76 = - ( col2 ) + COALESCE ( + + 86, + + col0 ) query I rowsort @@ -32702,7 +32702,7 @@ SELECT ALL + col0 AS col0 FROM tab2 cor0 GROUP BY col0 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, avg\(Int64\(6\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, avg\(Int64\(6\)\)" appears in the SELECT clause satisfies this requirement SELECT - + col1 * + col1 * + NULLIF ( - CAST ( NULL AS INTEGER ), + - 27 * + + NULLIF ( - col0, col1 * 9 ) ) + - + 78 + col1 + - + col1 * 26 / col1 / + AVG ( ALL + 6 ) FROM tab1 AS cor0 GROUP BY col1 query I rowsort @@ -32763,7 +32763,7 @@ SELECT ALL - col2 FROM tab0 AS cor0 WHERE NOT ( NULL ) BETWEEN - - col0 AND - co # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + - col1 * col1 col0 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT - col0 + + col0 <= NULL query I rowsort @@ -33844,7 +33844,7 @@ SELECT DISTINCT + col0 * + 56 FROM tab2 AS cor0 GROUP BY col0, col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + col2 AS col0 FROM tab2 GROUP BY col2 HAVING - + col0 > NULL query II rowsort label-5508 @@ -34185,7 +34185,7 @@ SELECT 76 FROM tab2 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1, tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 / + 8 col1, col1 AS col0 FROM tab2 GROUP BY col1, col1 HAVING NOT ( NULL ) <> col0 query II rowsort @@ -34817,7 +34817,7 @@ SELECT - + 0 FROM tab0 AS cor0 GROUP BY col1, col0 HAVING - + ( - col1 ) + + + c # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL CAST ( 59 AS INTEGER ) AS col1 FROM tab1 GROUP BY col0 HAVING NOT NULL BETWEEN col1 * - 34 AND NULL query II rowsort label-5670 @@ -35060,7 +35060,7 @@ SELECT - 74 * col2 * ( col2 ) + col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, co # Datafusion - Expected - 558 # Datafusion - Expected - 8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + 34 + - col0 + COALESCE ( 7, 29 * col0, + col0 * + CAST ( 29 * + col2 AS INTEGER ) ) * col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, col0 query I rowsort label-5710 @@ -35086,7 +35086,7 @@ SELECT + col1 col2 FROM tab2 WHERE NOT 21 IS NULL GROUP BY col0, col1 HAVING - c # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 + + 77, col1 * + - 34 AS col2 FROM tab2 GROUP BY col1 HAVING col2 BETWEEN ( NULL ) AND ( NULL ) query I rowsort @@ -35118,7 +35118,7 @@ SELECT + col1 + - col1 / col1 + + 92 - - col1 FROM tab2 AS cor0 GROUP BY col1 HA # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + col2 * 94 - + 68 + - + col2 * col2 + - + CASE - 2 WHEN - CAST ( + 60 AS FLOAT8 ) THEN + 38 END AS col1 FROM tab1 cor0 GROUP BY col2 HAVING NULL <= + + col1 query I rowsort @@ -35531,7 +35531,7 @@ SELECT ALL + - col2 * - - col2 FROM tab2 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 AS col0 FROM tab0 GROUP BY col1 HAVING NOT ( col0 * + CAST ( 14 / + col0 AS INTEGER ) > NULL ) # Datafusion - Types were automatically converted from: @@ -36330,7 +36330,7 @@ SELECT + col0 * 79 AS col0 FROM tab1 AS cor0 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 * + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, col2 HAVING NULL >= ( col2 + - 30 * col0 ) query I rowsort label-5924 @@ -36645,7 +36645,7 @@ SELECT DISTINCT col0, + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0 col1 FROM tab1 GROUP BY col0 HAVING NULL > col1 query I rowsort @@ -37176,7 +37176,7 @@ SELECT 48 FROM tab1 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ( col2 ) AS col1 FROM tab1 GROUP BY col2 HAVING NOT NULL <> + 14 / - col2 * 34 + 1 + - col1 / col1 * col2 query I rowsort @@ -37361,7 +37361,7 @@ SELECT DISTINCT - col0 AS col2 FROM tab1 GROUP BY col1, col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT 71 AS col1 FROM tab2 GROUP BY col2 HAVING NOT NULL NOT BETWEEN NULL AND - col1 / + col2 query I rowsort label-6089 @@ -37374,7 +37374,7 @@ SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 WHERE - 29 # Datafusion - Expected - 47 # Datafusion - Expected - 47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 47, col2 ) FROM tab0 AS cor0 GROUP BY col0, col0 query I rowsort @@ -37912,7 +37912,7 @@ SELECT - - 9 * + - 82, 98 FROM tab0 AS cor0 GROUP BY col0, col2 HAVING NOT ( NUL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - col2 + 45 AS col1 FROM tab2 AS cor0 GROUP BY col0, col2 HAVING NOT NULL > + col1 # Datafusion - Datafusion expected results: @@ -38019,7 +38019,7 @@ SELECT DISTINCT - + ( - col2 ) / - col2 FROM tab0 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT NULL <> + NULLIF ( - col0, 49 ) + - 92 query I rowsort @@ -38078,7 +38078,7 @@ SELECT col0 * col0 / + col0 FROM tab2 GROUP BY col0 HAVING ( ( + 13 ) - - col0 ) # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - + col1 * 63 + + 89 * + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, col1, col2 HAVING NULL >= - + col0 / + col1 query I rowsort @@ -38224,7 +38224,7 @@ SELECT col1 AS col1, 48 col1 FROM tab0 AS cor0 GROUP BY col2, col1 HAVING NOT - # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0, tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + col2 AS col1 FROM tab1 GROUP BY col0, col2 HAVING NOT ( + 1 ) IN ( + CASE + ( col0 ) WHEN 79 * + CAST ( NULL AS INTEGER ) THEN col1 END ) query I rowsort label-6240 @@ -38319,7 +38319,7 @@ SELECT + 91 FROM tab1 AS cor0 GROUP BY col0 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + - 5 * + + NULLIF ( + CAST ( NULL AS INTEGER ), - NULLIF ( col0, col0 * CAST ( + 64 AS INTEGER ) ) * 91 + - col1 ) FROM tab0 AS cor0 GROUP BY col0, col0 query I rowsort @@ -38861,7 +38861,7 @@ SELECT + + col2 - + col1 col2 FROM tab0 AS cor0 GROUP BY col2, col1, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - 21 + + col1 + - 41 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING + 44 + + col2 NOT BETWEEN NULL AND ( NULL ) query I rowsort @@ -39270,7 +39270,7 @@ SELECT DISTINCT ( + 4 ) + - col2 / + 17 FROM tab2 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL col2 + - 55 + 50 * - + ( + col2 ) AS col1 FROM tab2 GROUP BY col2 HAVING - + col1 > NULL query I rowsort label-6422 @@ -40109,7 +40109,7 @@ SELECT ALL 8 FROM tab2 AS cor0 GROUP BY col0, col0 HAVING NOT ( NULL ) <> - 78 # Datafusion - Expected - -930 # Datafusion - Expected - -930 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0, tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 10, - - col2 + - 67, - + 99 ) * + 93 FROM tab1 GROUP BY col0, col0 query I rowsort label-6560 @@ -40522,7 +40522,7 @@ SELECT col2 / col2 - col2 AS col1 FROM tab2 AS cor0 WHERE NOT ( + col0 ) NOT IN # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2, tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2, tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT + col2 col0 FROM tab1 GROUP BY col2, col1 HAVING - col0 > NULL query I rowsort @@ -40867,7 +40867,7 @@ SELECT ALL - col1 FROM tab0 WHERE NOT - col0 * - col0 + - + col0 <> col0 * + 50 # Datafusion - Expected - -1 # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 / - col1, + CASE + - 33 WHEN + 66 THEN col0 + + col2 + - - col1 + - - col0 * + col0 ELSE NULL END AS col0 FROM tab2 GROUP BY col1 query I rowsort @@ -41057,7 +41057,7 @@ SELECT ALL col0 + - col0 AS col1 FROM tab0 WHERE col1 + col0 < ( NULL ) GROUP BY # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + col1 AS col0 FROM tab1 GROUP BY col1 HAVING NULL NOT BETWEEN ( - 66 * + col0 ) AND NULL query I rowsort @@ -41217,7 +41217,7 @@ SELECT + 45 - - col0 AS col1 FROM tab2 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0, tab2\.col1, tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, tab2\.col1, tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT 19 AS col2 FROM tab2 GROUP BY col0, col1, col1 HAVING NULL NOT BETWEEN + - NULLIF ( + - col2, - + ( + 2 ) ) AND + col2 query I rowsort @@ -42159,7 +42159,7 @@ SELECT DISTINCT + col0 + + + col0 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - + ( CAST ( + + CAST ( - col0 AS FLOAT8 ) AS INTEGER ) ) + - + COALESCE ( - + 27, + - col1, + col0 ) * + col0 + - ( + col0 ) - - 6 AS col2 FROM tab1 AS cor0 GROUP BY col0, col1 HAVING NOT NULL NOT BETWEEN - col2 + - 97 * - col2 AND - ( col2 ) query I rowsort @@ -42791,7 +42791,7 @@ SELECT DISTINCT - ( + 21 ) * + - 48 FROM tab1 AS cor0 GROUP BY col2 HAVING NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + 45 + - col2 AS col1 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT + ( col1 ) < ( NULL ) query I rowsort @@ -43051,7 +43051,7 @@ NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col2 AS col0 FROM tab1 AS cor0 WHERE NOT ( - col2 + - ( + + col1 ) + + col0 + 31 * - ( + col0 ) ) BETWEEN NULL AND 52 GROUP BY col2 HAVING NULL <= - 87 * - col0 + - 59 query I rowsort label-7061 @@ -43340,7 +43340,7 @@ SELECT DISTINCT ( 22 ) / - col2 + + col2 AS col1 FROM tab2 GROUP BY col2, col2 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0, tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ( + CASE CAST ( NULL AS INTEGER ) WHEN - - col1 THEN 0 / col1 END ) FROM tab1 WHERE + col2 IS NOT NULL GROUP BY col0, col0 query I rowsort @@ -44397,7 +44397,7 @@ SELECT ALL + col2 + + 37 FROM tab0 AS cor0 GROUP BY col2, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 AS col1, col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, col2 HAVING NOT ( col1 ) BETWEEN NULL AND ( NULL ) query I rowsort @@ -44631,7 +44631,7 @@ SELECT ALL 7 AS col0 FROM tab1 AS cor0 GROUP BY col2 # Datafusion - Expected - 59 # Datafusion - Expected - 61 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( col1, + + 68, ( + col2 ) ) AS col2 FROM tab2 AS cor0 GROUP BY col1, col1 query I rowsort label-7320 @@ -44773,7 +44773,7 @@ SELECT + 14 + - + col0 * + col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, col0 HA # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - + col1 AS col2 FROM tab1 cor0 GROUP BY col1 HAVING col2 <> NULL query I rowsort @@ -44999,7 +44999,7 @@ SELECT DISTINCT ( - CAST ( - - 52 AS INTEGER ) ) * - col1 + 7 * - 23 + col1 AS c # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT - 49 AS col1 FROM tab1 WHERE + + 47 + + - col1 > NULL GROUP BY col2 HAVING NULL NOT BETWEEN - col1 AND ( - 53 + 29 ) query I rowsort @@ -45068,7 +45068,7 @@ SELECT ALL - col1 + col1 * - col1 FROM tab1 AS cor0 WHERE 48 * - col1 IN ( 70 / # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 69, + col2 - - col2, col2 ) * - COALESCE ( - col0, + col0 ) FROM tab1 GROUP BY col0 HAVING NOT + 0 <> ( + 57 ) query I rowsort @@ -45126,7 +45126,7 @@ SELECT DISTINCT + col0 * col0 + - 81 FROM tab0 AS cor0 WHERE NOT NULL IS NULL GR # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2 HAVING ( + col1 ) <= NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function @@ -45135,7 +45135,7 @@ SELECT ALL - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2 HAVING ( + col1 ) <= N # Datafusion - Expected - -2 # Datafusion - Expected - -2 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - - col2 / + col2 + - COALESCE ( + 98 + - 95, col1 ) FROM tab2 cor0 GROUP BY col2 # Datafusion - Types were automatically converted from: @@ -45257,7 +45257,7 @@ SELECT COALESCE ( - 54, - 75 ) FROM tab0 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2, tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT col0, 75 * col2 AS col1 FROM tab2 GROUP BY col2, col0 HAVING NOT + col1 < NULL query I rowsort @@ -45424,7 +45424,7 @@ SELECT - 67 FROM tab2 GROUP BY col1, col0, col0 HAVING NULL IS NOT NULL # Datafusion - Expected - -39 # Datafusion - Expected - -39 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 + - col2 + + COALESCE ( ( - 39 ), + ( + NULLIF ( + + CAST ( + CAST ( col2 AS INTEGER ) AS INTEGER ), - - col0 * ( 79 ) ) ) + col2, - + col2 * - col2 ) FROM tab0 GROUP BY col2, col2 query I rowsort @@ -45749,13 +45749,13 @@ SELECT col2 + - col2 AS col0 FROM tab1 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2, avg\(Int64\(13\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, avg\(Int64\(13\)\)" appears in the SELECT clause satisfies this requirement SELECT CASE 42 WHEN - 99 THEN AVG ( 13 ) * - col1 - + col2 * + col2 END + + col2 FROM tab0 WHERE ( NULL ) NOT BETWEEN ( col1 ) AND ( - CASE WHEN col2 NOT BETWEEN NULL AND ( col2 + 48 ) THEN col1 ELSE + col2 * + col0 END ) GROUP BY col2 HAVING NOT NULL BETWEEN ( - col2 ) AND NULL # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0, tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0 / - COALESCE ( 87 * - 29, NULLIF ( col0, - col1 ) * - col1 + col0 ) FROM tab2 WHERE NOT col1 NOT BETWEEN - 11 + - CAST ( NULL AS INTEGER ) * - CAST ( - col1 AS INTEGER ) AND col0 GROUP BY col0, col0 query I rowsort @@ -46049,7 +46049,7 @@ SELECT 99 + col1 FROM tab2 GROUP BY col1, col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0, tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - col0 * - col0 * + col0 * + + col0 * col0 AS col0, col0 AS col1 FROM tab2 GROUP BY col0, col0 HAVING NOT NULL <= + col1 query I rowsort label-7564 @@ -46324,7 +46324,7 @@ SELECT ALL + CAST ( - 27 AS INTEGER ) FROM tab1 AS cor0 GROUP BY col1 HAVING NOT # Datafusion - Datafusion expected results: # Datafusion - Expected - -86 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - - 86, - + COALESCE ( col0, col1 + - col1 ) * - - ( + col0 ) ) AS col2 FROM tab0 GROUP BY col2 query I rowsort @@ -46582,7 +46582,7 @@ NULL # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1, tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 - + col1 AS col2 FROM tab2 GROUP BY col1, col1 HAVING NOT - - col2 >= NULL query I rowsort @@ -46901,7 +46901,7 @@ SELECT - col1 FROM tab0 AS cor0 WHERE NULL IN ( - col1 ) GROUP BY col0, col1 # Datafusion - Expected - 34 # Datafusion - Expected - 32 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 34, - col1 * - col0 + + + 60 ), 32 AS col1 FROM tab0 cor0 GROUP BY col2, col0 HAVING + 30 > - col0 * 14 query I rowsort @@ -46932,7 +46932,7 @@ SELECT col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, col2 HAVING - 33 = + col2 # Datafusion - Expected - 72 # Datafusion - Expected - 72 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 72, - + col0 * - - col2 + - + col1 ) FROM tab1 GROUP BY col1 query I rowsort label-7711 @@ -47070,13 +47070,13 @@ SELECT col2 * 43 AS col2 FROM tab0 WHERE NOT 85 < + col1 GROUP BY col2, col2 HAV # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col2 FROM tab2 GROUP BY col1 HAVING NULL BETWEEN ( - col1 / CAST ( col2 AS INTEGER ) ) AND ( 13 ) # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 0, col1 ) FROM tab1 GROUP BY col2 HAVING NOT NULL > NULL query I rowsort @@ -47288,7 +47288,7 @@ NULL # Datafusion - Expected - 89 # Datafusion - Expected - 89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 89, + col2 ) FROM tab0 cor0 GROUP BY col1 query I rowsort @@ -47347,7 +47347,7 @@ SELECT ALL - col0 FROM tab2 WHERE NOT col0 + - 9 * 28 <> - col0 * - + 92 AND ( N # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - col1 + 88 col0 FROM tab2 GROUP BY col1 HAVING NULL >= + col1 + col0 query I rowsort @@ -48991,7 +48991,7 @@ SELECT col1 FROM tab0 GROUP BY col1, col1 HAVING NOT ( 39 IS NOT NULL ) # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - + 63 + - 36 AS col2, + NULLIF ( - CAST ( NULL AS INTEGER ), + col2 ) + - + col0 / - 32 / + col0 FROM tab2 AS cor0 GROUP BY col0 HAVING NOT + CAST ( NULL AS FLOAT8 ) > ( - + 7 ) query I rowsort @@ -49056,7 +49056,7 @@ SELECT DISTINCT + - 73 AS col2 FROM tab2 AS cor0 WHERE NOT ( NULL ) IS NULL GROU # Datafusion - Expected - 1560 # Datafusion - Expected - 507 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, tab0\.col1, tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col1, tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + 53 * + 8 + col1 * + 13 - - COALESCE ( + 83, - col0, - col1 * + 59 ) AS col2 FROM tab0 GROUP BY col1, col1, col1 HAVING NOT NULL IS NOT NULL query I rowsort @@ -49091,7 +49091,7 @@ SELECT col1 + - col1 + + col1 + - - col1 col1 FROM tab2 AS cor0 GROUP BY col1 # Datafusion - Expected - 96 # Datafusion - Expected - 96 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + ( + ( + COALESCE ( CAST ( + 0 AS INTEGER ), + col1 ) ) ) - - 96 AS col1 FROM tab0 AS cor0 GROUP BY col2 # Datafusion - Types were automatically converted from: @@ -50465,7 +50465,7 @@ SELECT + + 74 * col0 / + col0 + - - 47 * - + col0 AS col1, + col0 FROM tab2 AS c # Datafusion - Expected - -72 # Datafusion - Expected - -72 skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - 72 AS col2 FROM tab2 AS cor0 GROUP BY col0 HAVING - 49 NOT BETWEEN ( - 46 ) AND - + 47 + - + col2 query I rowsort @@ -51040,7 +51040,7 @@ SELECT DISTINCT + + col2 AS col2 FROM tab1 cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0, - col0 AS col1 FROM tab0 GROUP BY col0 HAVING NULL = col0 + + col1 / + CAST ( NULL AS INTEGER ) query II rowsort label-8388 @@ -51375,7 +51375,7 @@ SELECT NULLIF ( - 6, + + col0 ) AS col2 FROM tab2 AS cor0 WHERE 41 IS NULL GROUP # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0, col0 / - col0 AS col2 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT col2 NOT BETWEEN NULL AND NULL query I rowsort @@ -51501,7 +51501,7 @@ SELECT - 36 + + 65 FROM tab0 AS cor0 GROUP BY col0 # Datafusion - Expected - -62 # Datafusion - Expected - -64 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + + 82 + - col1 + + - 6 - COALESCE ( + 79, 34 + - col2 ) AS col2 FROM tab2 AS cor0 WHERE NOT ( NULL ) IS NOT NULL GROUP BY col1 query I rowsort @@ -51620,7 +51620,7 @@ SELECT ALL col0 FROM tab0 GROUP BY col0, col0, col2 HAVING NULL IS NULL # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + CASE - - 56 WHEN + 25 THEN + - col2 * + + 18 * + 96 + - ( + + 15 ) * col2 - + col2 * - col0 + + col0 END FROM tab1 AS cor0 GROUP BY col2 query II rowsort @@ -53330,7 +53330,7 @@ SELECT + col0 FROM tab1 AS cor0 GROUP BY col0 HAVING ( - 51 ) IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + 50 AS col0 FROM tab0 AS cor0 GROUP BY col1, col2 HAVING NOT ( NULL ) NOT BETWEEN ( col2 ) AND + col0 + 13 * col0 query I rowsort @@ -53372,7 +53372,7 @@ SELECT ( + col1 ) FROM tab1 WHERE col2 IS NOT NULL GROUP BY col1 HAVING NULL IS # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY col1 HAVING NOT ( col2 <= NULL ) # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function @@ -53381,7 +53381,7 @@ SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY col1 HAVING NOT ( col # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + CASE WHEN NOT NULL NOT BETWEEN NULL AND NULL THEN - col1 ELSE NULL END FROM tab2 GROUP BY col0 query I rowsort @@ -53394,7 +53394,7 @@ SELECT - 99 FROM tab0 GROUP BY col1 HAVING NULL IS NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - -59 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0, tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - 9 + COALESCE ( + - 50, col1, col0 * CAST ( NULL AS INTEGER ) ) FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY col0, col0 query I rowsort @@ -53858,7 +53858,7 @@ SELECT - col0 AS col2, + col0 AS col2 FROM tab1 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL ( + col1 ) AS col0, col1 AS col2 FROM tab0 AS cor0 WHERE NOT ( + ( + col0 ) ) IS NULL GROUP BY col1 HAVING ( NOT col2 * + 27 * + - 3 <> NULL ) query I rowsort @@ -53871,7 +53871,7 @@ SELECT - 92 - + + 12 AS col1 FROM tab2 AS cor0 GROUP BY col2, col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0, tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0 * COALESCE ( 0, 77 * NULLIF ( + col0, - col0 ) + - 30, + col0, col1 * + 49 ) FROM tab1 WHERE NOT 27 * + - col1 IS NULL GROUP BY col0, col0 HAVING NOT + 81 IS NOT NULL query I rowsort @@ -53908,7 +53908,7 @@ SELECT ALL + col0 + - + col0 + + - col0 + - 39 * col1 AS col2, + col1 FROM tab2 # Datafusion - Expected - 71 # Datafusion - Expected - 8 skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL col2 col0 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT ( NULL ) IS NOT NULL OR NOT - col0 < NULL query I rowsort @@ -55738,7 +55738,7 @@ SELECT - 98 AS col0 FROM tab0 AS cor0 GROUP BY col2 HAVING - col2 <= + 36 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 AS col0, col1 FROM tab0 GROUP BY col1, col1 HAVING NOT NULL < col0 query I rowsort @@ -56320,7 +56320,7 @@ SELECT col1 FROM tab2 GROUP BY col1 HAVING NOT ( - col1 + - ( + 17 ) ) IS NOT NU # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( - + 18, + - 49, + - col2 + - col2 * 99 ) * 70 FROM tab1 GROUP BY col0 HAVING + 33 IS NULL query I rowsort @@ -56354,7 +56354,7 @@ SELECT + 81 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + - COALESCE ( - ( + 3 ), col0 ) - col1 * NULLIF ( col1, col1 - 24 ) AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT NULL <> ( NULL ) query I rowsort @@ -56545,7 +56545,7 @@ SELECT ALL + 6 + col1 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL <> NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - - CASE WHEN NOT ( NULL ) BETWEEN ( + + 21 ) AND 42 * - CASE - col1 WHEN - col1 * - 20 * - col1 + - 83 THEN NULL ELSE - COALESCE ( CAST ( NULL AS INTEGER ), + + 58 + 99 ) * + col1 END THEN + - 84 END AS col2 FROM tab1 cor0 GROUP BY col0 query I rowsort @@ -56678,7 +56678,7 @@ SELECT ALL + + 87 - 12 FROM tab0 AS cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + 9 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT 13 * - col0 <= NULL query II rowsort @@ -56843,7 +56843,7 @@ SELECT ALL - 22 + + col0 FROM tab2 AS cor0 WHERE + col0 * col0 IS NOT NULL GROUP # Datafusion - Expected - -1992 # Datafusion - Expected - -239856 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 * + - COALESCE ( + 48, + COALESCE ( 27, col2 ) ) + - 76 * ( - col1 + + col1 * col1 ) FROM tab1 AS cor0 GROUP BY col1 query I rowsort @@ -56910,7 +56910,7 @@ SELECT DISTINCT col1 col2 FROM tab2 GROUP BY col0, col1, col0 # Datafusion - Expected - -4 # Datafusion - Expected - -4 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 4, + + col0 * 32 ) FROM tab2 AS cor0 GROUP BY col2 query I rowsort @@ -56949,7 +56949,7 @@ SELECT 12 + col0 * - col2 col1 FROM tab2 AS cor0 WHERE ( ( NOT NULL >= col0 * co # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT CAST ( NULL AS INTEGER ) + col2 col1, - col2 - - + COALESCE ( 3, + NULLIF ( 47, + 66 / col0 ), - 79 ) AS col2 FROM tab0 AS cor0 GROUP BY col2, col2 HAVING NOT + CAST ( + ( + 90 ) AS INTEGER ) >= ( NULL ) query I rowsort @@ -57012,7 +57012,7 @@ SELECT DISTINCT + col1 FROM tab0 GROUP BY col2, col1 HAVING NOT NULL > NULL # Datafusion - Expected - 42 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 - - + 61 / - - COALESCE ( - 35, + 83, - col2 ) FROM tab0 AS cor0 GROUP BY col0 query I rowsort @@ -58159,7 +58159,7 @@ SELECT ALL + - ( + col0 ) col2 FROM tab1 AS cor0 GROUP BY col1, col0, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - - col0 + - ( + col0 ) + + - CASE WHEN ( + col0 ) < ( NULL ) THEN - col2 END + 97 / col0 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT NULL NOT IN ( - col0 * + col0 ) query I rowsort @@ -58212,7 +58212,7 @@ SELECT - 34 + - 62 FROM tab0 WHERE - + col1 IS NOT NULL GROUP BY col2, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, col1 HAVING COALESCE ( COALESCE ( + 24, col0 ), - - NULLIF ( - col1, + col2 ) * 51 + CASE + col0 - - 79 * col1 WHEN + ( - col2 ) THEN NULL ELSE - 5 * col2 END ) > NULL query I rowsort label-9551 @@ -58882,7 +58882,7 @@ SELECT ALL + 46 FROM tab0 cor0 GROUP BY col1, col2, col0 HAVING - col2 + - - col # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col2 AS col0 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT ( ( NULL ) > - 11 * + - col0 + + ( + col0 ) ) # Datafusion - Datafusion expected results: @@ -60134,7 +60134,7 @@ SELECT ALL - AVG ( DISTINCT 81 ) AS col2 FROM tab2 cor0 WHERE NOT - col2 * col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + - ( ( + - col2 ) ) AS col1 FROM tab1 AS cor0 GROUP BY col2, col0 HAVING NOT + col1 <> NULL query I rowsort @@ -60451,7 +60451,7 @@ SELECT DISTINCT 22 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT NULL BETWEEN NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + col0 col2 FROM tab2 AS cor0 GROUP BY col0 HAVING NOT NULL IN ( + col2 ) query I rowsort label-9918 @@ -60489,7 +60489,7 @@ SELECT - 31 AS col0 FROM tab2 WHERE NOT col1 / col1 IS NOT NULL GROUP BY col0, c # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2, tab0\.col0, tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, tab0\.col0, tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT + 45 * + CAST ( 44 AS INTEGER ) * + COALESCE ( 13, - col1 ) + col2 FROM tab0 GROUP BY col2, col0, col2 HAVING ( - 39 + + col0 ) IS NULL query I rowsort @@ -60608,7 +60608,7 @@ SELECT ALL + ( + col1 ) AS col0 FROM tab1 AS cor0 GROUP BY col1, col0 HAVING NOT # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT col1, + col1 + 43 AS col0 FROM tab0 AS cor0 GROUP BY col1, col2 HAVING NULL BETWEEN ( col0 ) AND - + 68 * + + 41 - - 84 + + - col1 query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_12.slt b/data/sqlite/random/groupby/slt_good_12.slt index 1cee96e..98bde5d 100644 --- a/data/sqlite/random/groupby/slt_good_12.slt +++ b/data/sqlite/random/groupby/slt_good_12.slt @@ -1779,7 +1779,7 @@ SELECT ALL col2 + col2 * - col2 / - - col2 FROM tab2 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - 29 * - + 95 AS col1 FROM tab0 GROUP BY col0 HAVING + CAST ( NULL AS INTEGER ) / ( + 17 ) = - + ( ( - + col1 ) ) query I rowsort @@ -1968,7 +1968,7 @@ SELECT col0 * - col0 + - col0 FROM tab2 GROUP BY col0, col0 HAVING NOT NULL IS N # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + ( 41 ) col0 FROM tab2 AS cor0 GROUP BY col2 HAVING col0 NOT BETWEEN NULL AND NULL query I rowsort @@ -2268,7 +2268,7 @@ SELECT ALL - + 88 + + CASE + col2 WHEN + 75 THEN + col2 END FROM tab0 AS cor0 GR # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT 79 AS col2 FROM tab2 WHERE NULL BETWEEN ( + col1 ) AND col0 GROUP BY col1 HAVING NOT col2 NOT BETWEEN NULL AND NULL query I rowsort @@ -2969,7 +2969,7 @@ SELECT DISTINCT col1 AS col0 FROM tab1 GROUP BY col1 HAVING NOT 47 IS NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0, tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - col0 AS col1 FROM tab1 GROUP BY col0, col2 HAVING NOT NULL <= col1 query I rowsort @@ -3361,7 +3361,7 @@ SELECT DISTINCT + 64 AS col1 FROM tab1 AS cor0 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + + col2 / - - 31 col1 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT NULL = - col2 * + - col1 / col2 + + col1 query I rowsort @@ -3419,7 +3419,7 @@ SELECT - ( + col0 ) * + - 60 - - + col0 FROM tab2 cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT col1 <> NULL query I rowsort @@ -4268,7 +4268,7 @@ SELECT - CAST ( 23 AS INTEGER ) FROM tab0 AS cor0 GROUP BY col2 HAVING NOT ( NUL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT 81 AS col0 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT ( NULL ) < 65 / col0 * 39 query I rowsort @@ -4282,7 +4282,7 @@ SELECT ALL - ( col2 ) AS col0 FROM tab0 AS cor0 WHERE NOT ( col0 * - COALESCE ( # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + - col1 * col1 / ( + - col1 ) - - col1 / col1 AS col2 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL = ( + col1 / - ( + col2 ) ) query I rowsort label-689 @@ -4510,13 +4510,13 @@ SELECT + col2 * + col2 AS col2 FROM tab2 cor0 GROUP BY col2 HAVING NULL IS NOT N # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + 86 * 64 AS col0 FROM tab1 GROUP BY col1 HAVING col0 - + CAST ( NULL AS INTEGER ) >= NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, avg\(\(\- cor0\.col0\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, avg\(\(\- cor0\.col0\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + + AVG ( - ( col0 ) ) AS col2 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT ( col2 ) >= + CAST ( NULL AS FLOAT8 ) query I rowsort @@ -4658,7 +4658,7 @@ SELECT DISTINCT - 79 FROM tab1 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - col0 AS col2 FROM tab2 cor0 GROUP BY col0 HAVING + NULLIF ( col2, + + 58 ) >= NULL query I rowsort @@ -5197,7 +5197,7 @@ SELECT ALL - 21 - + col1 FROM tab1 AS cor0 GROUP BY col1, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - 70 AS col0, 2 AS col2 FROM tab1 AS cor0 GROUP BY col2 HAVING - ( - - col0 ) <= NULL query I rowsort @@ -5333,13 +5333,13 @@ SELECT ALL + AVG ( DISTINCT - + col0 ) AS col1 FROM tab1 AS cor0 GROUP BY col0 H # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + col1 * - col0 * CASE WHEN NULL = + col2 THEN NULL ELSE col0 END + + col1 FROM tab0 AS cor0 GROUP BY col0, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 37, col2 / + col1 ) AS col2 FROM tab2 AS cor0 GROUP BY col0, col0 HAVING ( + col0 ) * - - 4 >= NULL query II rowsort @@ -5682,7 +5682,7 @@ SELECT + - 27 AS col2 FROM tab0 AS cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - - 92 * + + CAST ( NULL AS INTEGER ) AS col1, ( - - 48 ) AS col0 FROM tab0 AS cor0 GROUP BY col1 HAVING - col0 <= NULL query I rowsort @@ -5694,7 +5694,7 @@ SELECT - 7 FROM tab0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1, tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1, tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 * - + col1 * + COALESCE ( + - 17, - COALESCE ( - col0, + + col0 * col2 + + + col2 ), - col2 ) - col1 AS col1 FROM tab1 GROUP BY col1, col1 HAVING NULL > NULL query I rowsort @@ -6387,7 +6387,7 @@ SELECT - + ( - - 26 ) FROM tab1 AS cor0 GROUP BY col2, col1, col1 HAVING NOT ( - # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col2 + + col0 + + + NULLIF ( + CAST ( NULL AS FLOAT8 ), + col0 + - col1 ) FROM tab2 cor0 GROUP BY col0, col2 query I rowsort @@ -6404,7 +6404,7 @@ SELECT ALL 85 FROM tab0 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col0 HAVING ( NOT NULL < - col1 * 9 ) query I rowsort @@ -6551,7 +6551,7 @@ SELECT DISTINCT - col0 + - 54 AS col2 FROM tab0 AS cor0 GROUP BY col0, col2, col # Datafusion - Datafusion expected results: # Datafusion - Expected - 28 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 30, + col0 ) - 2 FROM tab0 cor0 GROUP BY col2 query I rowsort @@ -6774,7 +6774,7 @@ SELECT ALL + 43 * + col1 AS col2 FROM tab0 GROUP BY col1 HAVING NULL = NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 * col1 AS col2 FROM tab0 WHERE NOT ( NULL ) IS NULL GROUP BY col1 HAVING NULL >= col2 query I rowsort label-1099 @@ -7011,7 +7011,7 @@ SELECT col0 + - + col0 AS col2 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2, tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 AS col1 FROM tab2 GROUP BY col2, col2 HAVING + - col1 NOT BETWEEN NULL AND NULL query I rowsort @@ -7056,7 +7056,7 @@ SELECT ALL + 70 * 34 * - + col0 AS col0 FROM tab2 GROUP BY col0 HAVING NULL IS N # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - - 97 col1 FROM tab2 AS cor0 GROUP BY col0 HAVING NOT NULL IN ( - + col1, col1 * - col1 ) query I rowsort @@ -7285,7 +7285,7 @@ SELECT - 86 AS col0 FROM tab0 AS cor0 GROUP BY col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + - NULLIF ( - CAST ( NULL AS INTEGER ), - 74 * + NULLIF ( - - col2, ( - col2 ) ) / + col0 ) FROM tab1 AS cor0 GROUP BY col1, col0 query I rowsort @@ -7961,7 +7961,7 @@ SELECT DISTINCT - 62 FROM tab0 AS cor0 GROUP BY col2, col2, col0 HAVING + ( + co # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - 57 + - col2 - + COALESCE ( + 83, + col1 ) + col2 + - CAST ( NULL AS INTEGER ) * + 18 * + col2 - - + ( - ( - 90 ) ) FROM tab0 AS cor0 GROUP BY col2 query I rowsort @@ -8062,7 +8062,7 @@ SELECT 15 AS col0 FROM tab2 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1, tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1, tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + col1 AS col2 FROM tab1 GROUP BY col1, col0 HAVING + col2 < NULL query I rowsort @@ -8436,7 +8436,7 @@ SELECT - + col2 AS col2 FROM tab1 cor0 GROUP BY col0, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col0 * - col0 - - col0 * - col0 AS col1 FROM tab2 AS cor0 WHERE NOT - CAST ( + col0 AS INTEGER ) <> - col1 / + col2 GROUP BY col0 HAVING NOT NULL BETWEEN NULL AND + CAST ( NULL AS INTEGER ) - col1 / - col0 query I rowsort @@ -8975,7 +8975,7 @@ SELECT ALL + col1 + - col1 * NULLIF ( + col1, col1 ) AS col0 FROM tab0 GROUP BY # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 AS col0 FROM tab0 AS cor0 GROUP BY col2 HAVING - col2 * + col2 + - col0 + + 39 - - + 32 <= NULL # Datafusion - Datafusion expected results: @@ -9069,7 +9069,7 @@ SELECT - ( + col2 ) FROM tab0 AS cor0 GROUP BY col2, col0 HAVING ( NULL ) IS NOT # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT 40 AS col0 FROM tab1 GROUP BY col1 HAVING ( NULL ) < - col0 query I rowsort @@ -9554,7 +9554,7 @@ SELECT col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, col1 HAVING NOT col1 IS NOT # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + + 41 col2 FROM tab0 AS cor0 GROUP BY col0 HAVING col0 + - 16 + + col2 < NULL query I rowsort @@ -10449,7 +10449,7 @@ SELECT ALL - col2 / - col2 + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col2 # Datafusion - Expected - 0 # Datafusion - Expected - -59 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - col2 + + col2, + COALESCE ( - 59, ( - - 75 ) * - - col0 ) col0 FROM tab0 AS cor0 GROUP BY col2 query I rowsort @@ -10691,7 +10691,7 @@ SELECT ALL 77 * + 26 AS col1 FROM tab2 GROUP BY col0 HAVING ( NULL ) >= col0 * 5 # Datafusion - Expected - -3382 # Datafusion - Expected - -7031 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 * - - COALESCE ( - 89, col1 * NULLIF ( ( 97 ), + col2 * - col2 ), - col2 + col1 ) AS col1 FROM tab0 GROUP BY col2 query I rowsort @@ -11173,7 +11173,7 @@ SELECT ALL - col0 FROM tab1 cor0 GROUP BY col0 HAVING - + 91 IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col2 / + 34 * - 30 + + 38 AS col0, - 43 FROM tab2 AS cor0 GROUP BY col2 HAVING NULL < 69 * col0 query II rowsort label-1821 @@ -11194,7 +11194,7 @@ SELECT DISTINCT - 40 AS col2 FROM tab2 GROUP BY col1, col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0, tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL 88 + 59 col2 FROM tab0 GROUP BY col0, col1 HAVING NOT - - ( col2 ) * + - col1 = NULL query I rowsort @@ -11378,7 +11378,7 @@ SELECT - 50 * + + col0 / 45 FROM tab2 GROUP BY col0, col1, col0 HAVING NOT NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col1 col0 FROM tab1 AS cor0 GROUP BY col1, col2 HAVING NOT ( NULL ) NOT IN ( ( col0 ) ) query I rowsort @@ -11610,7 +11610,7 @@ SELECT - 21 * col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, col1 HAVING NOT ( co # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 AS col1 FROM tab0 GROUP BY col0 HAVING NOT NULL <= - col1 - - col1 query I rowsort @@ -11698,7 +11698,7 @@ SELECT DISTINCT 40 FROM tab1 GROUP BY col0, col1 HAVING ( col1 ) IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0, tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col2 AS col1 FROM tab2 GROUP BY col0, col2 HAVING NOT + col1 >= NULL query I rowsort @@ -11743,19 +11743,19 @@ SELECT DISTINCT 95 * - ( - 56 ) * + ( - + 69 ) FROM tab0 AS cor0 GROUP BY col1 # Datafusion - Expected - -57 # Datafusion - Expected - -57 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL ( - COALESCE ( + 57, - col0 * 81 * col1 ) ) FROM tab1 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + + col1 - col1 * COALESCE ( - + 86, - + col0 * - + col1 + col2, col2 ) - 55 * + - 11 AS col1 FROM tab2 AS cor0 WHERE col1 NOT BETWEEN NULL AND NULL GROUP BY col1 HAVING NOT NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col1 col0 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT + col0 + - + col0 NOT BETWEEN NULL AND NULL query I rowsort @@ -11940,7 +11940,7 @@ SELECT + col1 * 89 - col1 + col1 / - - col0 - 42 FROM tab1 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - ( - col1 ) AS col2 FROM tab2 AS cor0 GROUP BY col1, col1 HAVING ( + col2 >= ( NULL ) ) query I rowsort @@ -12712,7 +12712,7 @@ SELECT ALL + col2 FROM tab1 AS cor0 GROUP BY col2 HAVING - CAST ( NULL AS FLOAT8 # Datafusion - Expected - -2 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 48, - col0, col0 ) / col2 col1 FROM tab0 cor0 GROUP BY col2 query I rowsort label-2073 @@ -12972,7 +12972,7 @@ SELECT + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col0 HAVING + CAST ( - col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + 39 * - 65 / + col1 + col1 * col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT col0 <= NULL query II rowsort @@ -13649,7 +13649,7 @@ SELECT ALL - col2 + + + col2 * + 26 AS col2 FROM tab0 AS cor0 GROUP BY col2 HAVI # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + 65 AS col0, col2 AS col2 FROM tab2 AS cor0 WHERE NOT NULL NOT IN ( col2, col2 * + + 24 + - ( col2 ), + 11 * + + col1 ) GROUP BY col1, col2 HAVING NULL NOT BETWEEN ( - col0 + 81 ) AND col0 query II rowsort @@ -13902,7 +13902,7 @@ SELECT - - col2 AS col1, - col2 * + + 59 + - - CAST ( NULL AS INTEGER ) FROM tab # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, avg\(\(\- cor0\.col1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, avg\(\(\- cor0\.col1\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL - AVG ( - col1 ) * 60 AS col2 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL <= ( - col2 ) query I rowsort label-2268 @@ -13945,7 +13945,7 @@ SELECT col2 FROM tab2 GROUP BY col2, col2 HAVING NOT 18 * + col2 < + 41 - 47 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col2 * 32 AS col1 FROM tab1 GROUP BY col2 HAVING NOT NULL >= CAST ( NULL AS INTEGER ) / col1 - 6 query I rowsort @@ -13987,7 +13987,7 @@ SELECT DISTINCT 13 AS col2 FROM tab1 GROUP BY col0 HAVING NOT NULL IN ( 68 ) # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0, tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 col1 FROM tab0 GROUP BY col0, col0 HAVING NOT ( + col0 + col1 ) >= NULL query I rowsort label-2282 @@ -14079,7 +14079,7 @@ SELECT NULLIF ( col0, + 67 + + 55 ) FROM tab0 GROUP BY col0, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + + col0 col2 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT ( NULL ) BETWEEN NULL AND + col2 # Datafusion - Datafusion expected results: @@ -15499,7 +15499,7 @@ SELECT ALL - col0 FROM tab0 GROUP BY col0 HAVING NULL <= NULL # Datafusion - Expected - -183 # Datafusion - Expected - -184 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col0 + - COALESCE ( + 92, - + 56 * + ( + col1 / 9 ) + 78 * - col2, - 67, - col0 + + 40 ) + + 32 / + col0 FROM tab2 GROUP BY col0 HAVING ( NULL ) IS NULL query I rowsort @@ -16632,7 +16632,7 @@ SELECT - 83 * - col1 FROM tab0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 AS col0 FROM tab0 GROUP BY col1 HAVING + + 48 BETWEEN + + 73 AND col0 * + CAST ( + 28 AS INTEGER ) query I rowsort @@ -16734,7 +16734,7 @@ SELECT DISTINCT + - 83 col2 FROM tab1 WHERE + col2 * + col0 * col0 * - col1 BETW # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL 43 col1 FROM tab1 AS cor0 GROUP BY col0, col0 HAVING + - col0 * - col1 >= ( NULL ) query II rowsort @@ -16778,7 +16778,7 @@ SELECT - + 46 FROM tab2 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2, avg\(\(\- cor0\.col0\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2, avg\(\(\- cor0\.col0\)\)" appears in the SELECT clause satisfies this requirement SELECT + AVG ( ALL + - col0 ) col1 FROM tab1 cor0 GROUP BY col0, col2 HAVING NOT NULL NOT BETWEEN ( - col2 / + + 50 + + + 62 / - - CAST ( NULL AS INTEGER ) - col1 ) AND 96 * 18 + col1 query I rowsort @@ -17352,7 +17352,7 @@ SELECT DISTINCT col1 FROM tab0 GROUP BY col1 HAVING ( NULL ) IN ( - 60 ) # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + 89 AS col2 FROM tab2 AS cor0 GROUP BY col0 HAVING NOT NULL >= col2 / col2 query I rowsort @@ -17602,7 +17602,7 @@ SELECT + ( - col0 ) AS col0 FROM tab2 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0, avg\(DISTINCT tab2\.col1\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, avg\(DISTINCT tab2\.col1\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - ( col0 ), col0 AS col1 FROM tab2 GROUP BY col0 HAVING NOT NULL NOT BETWEEN + col0 AND AVG ( DISTINCT + col1 ) + - col1 query I rowsort @@ -17958,7 +17958,7 @@ SELECT DISTINCT - + 67 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT ( - 36 ) IS NU # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 AS col1 FROM tab0 AS cor0 GROUP BY col2 HAVING ( NULL ) >= + col2 + + col1 * + 71 query I rowsort @@ -18145,7 +18145,7 @@ SELECT DISTINCT + 68 AS col0 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col0 FROM tab0 GROUP BY col1 HAVING NOT ( NULL ) BETWEEN + col0 AND NULL query II rowsort @@ -18187,7 +18187,7 @@ SELECT 34 FROM tab2 GROUP BY col2 HAVING NOT NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + ( col0 ) AS col1 FROM tab1 GROUP BY col0 HAVING ( NULL ) NOT BETWEEN 67 + col0 * + col1 AND + col0 query I rowsort @@ -18409,7 +18409,7 @@ SELECT + + col2 AS col1 FROM tab0 WHERE NOT - col0 NOT IN ( - col1, - col0, + - # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + - col1 * col1 col2 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL >= - col2 query I rowsort @@ -18527,7 +18527,7 @@ SELECT ALL col1, col1 AS col1 FROM tab0 AS cor0 GROUP BY col1 # Datafusion - Expected - 61 # Datafusion - Expected - -52 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1, - COALESCE ( 52, - col0 * - + col0 + - + col2 ) FROM tab2 AS cor0 GROUP BY col1 HAVING NOT - 91 / + 60 IS NULL query I rowsort @@ -18657,7 +18657,7 @@ SELECT + 24 FROM tab0 AS cor0 GROUP BY col2, col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, tab0\.col2, tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col2, tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + CAST ( NULL AS INTEGER ) - 37, - 43 / - COALESCE ( - 92, - col0 * 85 + + col0 ) + - 19 - 10 * 97 FROM tab0 GROUP BY col1, col2, col1 HAVING NOT 21 = NULL query I rowsort @@ -18830,7 +18830,7 @@ SELECT ALL ( + col2 ), col2 AS col2 FROM tab2 cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + - col1 AS col0 FROM tab1 cor0 GROUP BY col1, col1 HAVING NULL < col0 + ( + 38 ) query II rowsort @@ -19263,7 +19263,7 @@ SELECT col1 - + 29 * + - ( - COALESCE ( col1, + ( - 69 ) ) ) FROM tab0 GROUP BY # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 * - - 7 col1 FROM tab1 cor0 GROUP BY col0 HAVING + - col1 >= NULL query I rowsort @@ -19385,7 +19385,7 @@ SELECT DISTINCT - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0 HAVING - col0 IS # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0, avg\(tab0\.col0\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, avg\(tab0\.col0\)" appears in the SELECT clause satisfies this requirement SELECT ALL col0 * - 92 + AVG ( + col0 ) AS col2 FROM tab0 GROUP BY col0 HAVING ( NULL ) <= col2 query I rowsort @@ -19846,7 +19846,7 @@ SELECT + 0 AS col2 FROM tab1 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - - col1 / + col1 - COALESCE ( 56, col0 * + 88 + CAST ( NULL AS INTEGER ) * + - col0 + + col1 * - col2 ) * col1 AS col0 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT + col0 <= ( NULL ) query I rowsort @@ -19891,7 +19891,7 @@ SELECT ALL 49 + col0 AS col2 FROM tab0 GROUP BY col0, col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT CAST ( NULL AS INTEGER ) + 73 * col1 AS col2 FROM tab2 GROUP BY col1 HAVING NOT col2 NOT BETWEEN NULL AND NULL query I rowsort @@ -20560,7 +20560,7 @@ SELECT ALL + col2 * - col2 AS col1 FROM tab2 GROUP BY col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + CASE col2 WHEN - CAST ( NULL AS INTEGER ) THEN + - col1 END * - ( - col1 ) - - col1 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT + - col1 IS NULL query I rowsort @@ -20670,7 +20670,7 @@ SELECT ALL COALESCE ( + col0, + col2 * - ( - 30 ), - 52 * + col2 - + + col0 + + # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2, tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + + 36, - 17 * - - col1 + + col2, col0 ) AS col1 FROM tab2 GROUP BY col2, col0 HAVING NULL NOT BETWEEN - CAST ( 60 AS INTEGER ) / - CAST ( - col1 AS INTEGER ) AND + 12 query III rowsort label-3376 @@ -21099,7 +21099,7 @@ SELECT DISTINCT - col1 FROM tab1 AS cor0 WHERE - col0 BETWEEN NULL AND col1 GROU # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + + CASE - 56 WHEN + 63 THEN col2 * + 96 * col1 / + - 84 / + - col2 + + col1 ELSE NULL END AS col1 FROM tab2 AS cor0 GROUP BY col1, col0 query I rowsort @@ -21149,7 +21149,7 @@ SELECT DISTINCT - col1, col1 / 14 col0 FROM tab1 AS cor0 GROUP BY col1, col0 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL NULLIF ( + + col0, col0 ) * - + COALESCE ( - ( 87 ), + 48, col1 ) * - - 56 * 91 col2 FROM tab0 AS cor0 GROUP BY col0, col2 query I rowsort @@ -21854,7 +21854,7 @@ SELECT ALL + 64 AS col1 FROM tab2 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 * - + COALESCE ( + 81, + col2, - + col1 ) AS col0 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL NOT IN ( + + ( - 67 ) ) query II rowsort label-3568 @@ -21972,7 +21972,7 @@ SELECT col2 * + col2 + NULLIF ( - col2, col2 ) AS col1 FROM tab1 AS cor0 WHERE N # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 col2 FROM tab2 AS cor0 WHERE NOT ( 83 ) = col1 GROUP BY col0, col1 HAVING ( NULL ) IN ( col2 * 39 ) query I rowsort @@ -22949,7 +22949,7 @@ SELECT + 42 * - 69 FROM tab2 AS cor0 GROUP BY col0 # Datafusion - Expected - 0 # Datafusion - Expected - 6480 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 * + COALESCE ( + - 80, + + col0, col2 + col0 / col0 ) AS col2 FROM tab0 AS cor0 GROUP BY col1 query I rowsort @@ -23133,7 +23133,7 @@ SELECT - col1 FROM tab1 AS cor0 GROUP BY col1 HAVING - col1 / - 94 * + CAST ( NU # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 - + col2 AS col1, ( + col2 ) * - col2 * + + 40 * + 9 AS col0 FROM tab2 GROUP BY col2 HAVING NOT NULL BETWEEN ( col2 * + col0 ) AND NULL query I rowsort @@ -24204,7 +24204,7 @@ SELECT + + col2 - 31 AS col1 FROM tab2 cor0 GROUP BY col2 HAVING NULL IS NOT NUL # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - NULLIF ( + ( CAST ( NULL AS FLOAT8 ) ), - col1 ) * + col0 AS col2 FROM tab1 WHERE NOT - 41 + 34 * col0 = + - col0 GROUP BY col0 query I rowsort @@ -24566,7 +24566,7 @@ SELECT DISTINCT - ( - + 11 ) AS col0 FROM tab1 GROUP BY col2 # Datafusion - Expected - -41 # Datafusion - Expected - -59 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - + col1 / + col1 + col1 + - 98 + + - col1 / + COALESCE ( 39, - 78 * + col0 * ( + col2 ) - + 27, + 50 ) AS col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NULL IS NULL query I rowsort @@ -24733,7 +24733,7 @@ NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 + 74 AS col1, col0 AS col2 FROM tab0 GROUP BY col0 HAVING NOT NULL <> CAST ( + + col2 AS INTEGER ) + - NULLIF ( - + col2, - - col1 + - col2 ) query I rowsort @@ -25344,7 +25344,7 @@ SELECT DISTINCT 62 AS col0 FROM tab2 GROUP BY col1, col1 HAVING NOT ( - COALESCE # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col2 FROM tab0 GROUP BY col1 HAVING NULL < col1 * col2 query I rowsort @@ -26442,7 +26442,7 @@ SELECT ALL + col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, col2 HAVING + 87 IS N # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 65, col2 * - col2 / - col2 + + col2 + - 26 + col0, + - col1 ) AS col0 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL <= + - col0 query I rowsort @@ -26661,7 +26661,7 @@ SELECT ALL col1 * ( + - col0 ) FROM tab0 GROUP BY col1, col0 HAVING + 52 + - col # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL 54 * - 57 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2, col0 HAVING NOT NULL NOT BETWEEN ( - col1 ) AND NULL query I rowsort @@ -27048,7 +27048,7 @@ SELECT + col2 FROM tab0 AS cor0 GROUP BY col2 HAVING 75 IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - col1 AS col2 FROM tab1 GROUP BY col1 HAVING NOT - col2 BETWEEN NULL AND NULL query I rowsort @@ -27452,7 +27452,7 @@ SELECT DISTINCT col2 + - + 69 / + col2 AS col0 FROM tab1 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 + + col1 + - col1 * - col1 + - col2 - - col1 AS col0 FROM tab2 AS cor0 WHERE - col2 + - 42 IS NULL GROUP BY col1, col2, col1 HAVING ( NULL ) NOT BETWEEN col0 AND - col0 / - - col0 * col0 + col2 query I rowsort @@ -27608,7 +27608,7 @@ SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 WHERE NOT ( N # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - - col0 / 19 * 7 + - col0 * + CAST ( - col0 AS FLOAT8 ) - + + CAST ( - CAST ( NULL AS INTEGER ) AS INTEGER ) col1 FROM tab0 cor0 GROUP BY col0 HAVING NULL NOT BETWEEN ( - ( - col1 ) ) AND NULL # Datafusion - Datafusion expected results: @@ -27728,7 +27728,7 @@ SELECT DISTINCT - 4 AS col0, - 20 + - - 97 * - col1 * 53 FROM tab2 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - ( - + CAST ( + 34 AS INTEGER ) ) AS col1 FROM tab2 AS cor0 GROUP BY col2, col0 HAVING NOT NULL NOT BETWEEN + col1 AND NULL query I rowsort @@ -27929,7 +27929,7 @@ SELECT - col2, col2 FROM tab2 cor0 WHERE NOT NULL IS NOT NULL GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 * col0 AS col2 FROM tab0 cor0 GROUP BY col0, col1 HAVING NOT NULL NOT IN ( + - NULLIF ( + - NULLIF ( col2, 11 - - ( - 78 ) + + col2 * col1 * + col0 ), - NULLIF ( + col0, - col0 ) + + col0 * - - col1 + col1 ) ) query I rowsort @@ -28663,7 +28663,7 @@ SELECT ALL col1 * col1 + col1 * 21 FROM tab0 GROUP BY col1 HAVING NOT col1 IS NO # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2, sum\(Int64\(\-46\)\), avg\(Int64\(57\)\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2, sum\(Int64\(\-46\)\), avg\(Int64\(57\)\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT - ( + - 6 ) + - col2 * + SUM ( ALL - 46 ) / - - ( 48 ), CASE WHEN NOT col2 IS NULL THEN NULL WHEN 71 IS NULL THEN - ( col1 ) * - col0 * + - 64 / - AVG ( 57 ) END FROM tab2 AS cor0 GROUP BY col1, col2 HAVING ( + COUNT ( * ) > NULL ) query I rowsort label-4683 @@ -29307,7 +29307,7 @@ SELECT - col2 * + 52 AS col0 FROM tab1 GROUP BY col2 HAVING NOT NULL IS NOT NULL # Datafusion - Expected - 29 # Datafusion - Expected - 31 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + - 30, - col0 - + 41, 26 * - col0 - - 14 * - 43 ) + + col1 AS col0 FROM tab2 GROUP BY col1 query I rowsort @@ -29446,7 +29446,7 @@ SELECT - ( col2 ) - + ( + + col2 ) + - 61 FROM tab0 GROUP BY col2, col0 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2, tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2, tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - CASE - CAST ( NULL AS INTEGER ) WHEN + + 47 THEN + col0 + col1 END * COALESCE ( - 7, 76 * 59, + 47 ) FROM tab1 GROUP BY col2, col0 query I rowsort label-4812 @@ -29467,7 +29467,7 @@ SELECT - + 20 FROM tab2 cor0 GROUP BY col0 HAVING ( NULL ) <> NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT CAST ( 29 AS INTEGER ) * - 61 col2 FROM tab2 AS cor0 GROUP BY col1 HAVING ( NULL ) NOT BETWEEN COALESCE ( - 69, col2, 0 ) AND col2 # Datafusion - Types were automatically converted from: @@ -30117,7 +30117,7 @@ SELECT DISTINCT + - 72, col2 + + col2 + col2 AS col1 FROM tab2 AS cor0 GROUP BY # Datafusion - Expected - -85 # Datafusion - Expected - -85 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - - COALESCE ( - 85, col2 * - + CAST ( + 49 AS INTEGER ), + col1 ) FROM tab2 WHERE NOT NULL IS NOT NULL GROUP BY col0 query I rowsort @@ -30303,7 +30303,7 @@ SELECT ALL - + 23 FROM tab2 cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT CAST ( NULL AS INTEGER ) * + col0 col1 FROM tab0 AS cor0 GROUP BY col0 HAVING NULL > ( col1 * + 0 ) query I rowsort label-4954 @@ -30409,7 +30409,7 @@ SELECT MIN ( - col2 ) + 20 * + 10 AS col1 FROM tab1 GROUP BY col0, col2 HAVING N # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0, tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT - col0 * 1 AS col1 FROM tab2 GROUP BY col0, col2 HAVING NULL NOT BETWEEN col1 * 72 + ( 33 ) AND 17 * col0 query I rowsort label-4974 @@ -30672,7 +30672,7 @@ NULL # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT - CASE + - CAST ( NULL AS INTEGER ) WHEN - col0 * - + 67 + + 17 THEN NULL WHEN CAST ( NULL AS INTEGER ) THEN - CAST ( 37 AS INTEGER ) * - - col1 - + COUNT ( * ) + + + COUNT ( * ) END + - + ( CAST ( + 88 AS FLOAT8 ) ) FROM tab0 GROUP BY col0 query II rowsort @@ -30695,7 +30695,7 @@ SELECT DISTINCT + + 7 + + - col2 + - 57 + - + col2 + 44 FROM tab1 AS cor0 GROUP # Datafusion - Expected - 1 # Datafusion - Expected - -50 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1, tab2\.col1, tab2\.col1, count\(Int64\(1\)\), count\(Int64\(34\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, tab2\.col1, tab2\.col1, count\(Int64\(1\)\), count\(Int64\(34\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COUNT ( * ) col0, + COALESCE ( - 50, - col1, + COUNT ( ALL 34 ) * - col0 ) FROM tab2 GROUP BY col1, col1, col1 query I rowsort @@ -30833,7 +30833,7 @@ SELECT DISTINCT + col1 * ( col2 ) FROM tab1 GROUP BY col2, col1 # Datafusion - Expected - 676 # Datafusion - Expected - 6889 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + col0, 19, - col2 - col2, + col1 ) * col0 FROM tab0 GROUP BY col0 query I rowsort label-5043 @@ -30856,7 +30856,7 @@ SELECT DISTINCT + COUNT ( * ) FROM tab1 GROUP BY col0, col2 HAVING ( + col2 ) IS # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0, tab0\.col2, avg\(Int64\(29\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, tab0\.col2, avg\(Int64\(29\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT CASE - 75 WHEN CAST ( NULL AS INTEGER ) THEN col1 END * - col0 FROM tab0 GROUP BY col0, col2 HAVING NOT + AVG ( 29 ) IN ( - col2 ) query I rowsort label-5047 @@ -31276,7 +31276,7 @@ SELECT ALL ( - ( col2 ) ) + - col2 + - ( CAST ( + 80 AS INTEGER ) ) AS col0 FROM # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2, tab1\.col1, tab1\.col2, min\(Int64\(66\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2, tab1\.col1, tab1\.col2, min\(Int64\(66\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col2 * + MIN ( 66 ) * + 40 AS col0 FROM tab1 GROUP BY col2, col1, col2 HAVING ( NULL ) BETWEEN + 67 * col0 AND NULL query I rowsort label-5121 @@ -31386,7 +31386,7 @@ SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 WHERE NOT NULL IN ( c # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL 40 - - col0 AS col1 FROM tab1 GROUP BY col0 HAVING NOT ( - + col1 * + col0 ) <= ( NULL ) query I rowsort @@ -31443,7 +31443,7 @@ SELECT + 42 FROM tab2 GROUP BY col2, col2 HAVING NOT + 8 > - SUM ( ALL col1 ) # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, tab0\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT 37 * + COUNT ( * ) AS col0 FROM tab0 GROUP BY col1, col2 HAVING NULL BETWEEN ( NULLIF ( col1, col1 / col0 + col1 + - col1 ) * + COUNT ( * ) ) AND ( NULL ) query I rowsort @@ -32338,7 +32338,7 @@ SELECT DISTINCT COUNT ( * ) FROM tab1 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1, count\(Int64\(1\)\), avg\(\(\- \(\- cor0\.col0\)\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1, count\(Int64\(1\)\), avg\(\(\- \(\- cor0\.col0\)\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL col1 * - col1 + col1 + col1 + - 7 * - CASE + 93 WHEN 33 THEN - col0 / COUNT ( * ) * - col1 + + 1 WHEN - CAST ( NULL AS INTEGER ) + + 86 THEN + AVG ( - - col0 ) END * 47 FROM tab2 AS cor0 WHERE NOT NULL > - 75 GROUP BY col1, col1 query II rowsort @@ -32510,7 +32510,7 @@ SELECT ( 87 ) + - + col0 + - CAST ( + + 83 AS INTEGER ) + col0 / col0 AS col1 FR # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0, max\(\(\- tab2\.col0\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, max\(\(\- tab2\.col0\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL - 89 AS col0, MAX ( ALL - col0 ) AS col2 FROM tab2 GROUP BY col0 HAVING NULL = col2 query I rowsort label-5328 @@ -32530,7 +32530,7 @@ SELECT + + col2 / + COUNT ( * ) + 63 + - ( - col2 ) / - col2 AS col0, - col2 * + # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1, tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1, tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT + CAST ( NULL AS FLOAT8 ) + - 66 / + col2 AS col0 FROM tab1 GROUP BY col1, col2 HAVING NOT NULL >= col0 query I rowsort @@ -32541,7 +32541,7 @@ SELECT DISTINCT - 11 FROM tab1 GROUP BY col2, col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 col1 FROM tab0 GROUP BY col2 HAVING NULL NOT BETWEEN ( NULL ) AND col1 query I rowsort @@ -32899,7 +32899,7 @@ SELECT col2 AS col0 FROM tab0 GROUP BY col2, col2 HAVING + - COUNT ( DISTINCT 56 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col2 FROM tab2 WHERE - - 60 - + col1 BETWEEN + col2 / col1 AND + col0 * + ( CAST ( NULL AS INTEGER ) ) GROUP BY col1 HAVING NOT NULL < + col2 query I rowsort label-5395 @@ -33328,7 +33328,7 @@ SELECT ALL + + COUNT ( * ) * 8 FROM tab0 AS cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, avg\(cor0\.col2\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, avg\(cor0\.col2\)" appears in the SELECT clause satisfies this requirement SELECT ( - AVG ( ALL col2 ) ) + ( + col2 ) col0, + col2 * + + col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL IN ( - col0 ) query I rowsort label-5465 @@ -33917,7 +33917,7 @@ SELECT 71 FROM tab1 GROUP BY col0 # Datafusion - Expected - -5421840 # Datafusion - Expected - -58 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0, min\(DISTINCT Int64\(29\)\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, min\(DISTINCT Int64\(29\)\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT MIN ( DISTINCT + 29 ) * + COUNT ( * ) * - - 95 * - ( - col0 ) * + ( - 24 ), - COALESCE ( ( + + 58 ), + - col0 + col2 * + 40 + - 27, + 25 ) AS col1 FROM tab1 GROUP BY col0 query I rowsort @@ -34063,7 +34063,7 @@ SELECT + + 24 FROM tab1 AS cor0 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1, min\(DISTINCT Int64\(49\)\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1, min\(DISTINCT Int64\(49\)\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + + MIN ( DISTINCT 49 ), + - COUNT ( * ), + COUNT ( * ) * + 97 ) * 8 AS col2 FROM tab2 AS cor0 GROUP BY col0, col1 HAVING NULL >= + col2 / + - 43 * - ( - col2 ) query I rowsort label-5582 @@ -34621,7 +34621,7 @@ SELECT DISTINCT - + col2 + - 48 FROM tab2 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col2, + COUNT ( * ) + + + col2 AS col0 FROM tab1 cor0 GROUP BY col2 HAVING NOT - col0 <> NULL query II rowsort @@ -34765,7 +34765,7 @@ SELECT ALL SUM ( DISTINCT - - col0 ) col2 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT - col2 col1 FROM tab2 GROUP BY col2 HAVING NULL IN ( ( - 45 ), - COUNT ( * ) * + + col1, + - col1 * - CAST ( NULL AS INTEGER ) ) query I rowsort label-5702 @@ -35086,7 +35086,7 @@ SELECT ALL - MIN ( ALL + - col0 ) / col0 AS col1 FROM tab1 AS cor0 GROUP BY col0 # Datafusion - Expected - 28 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( col0, - 17 + 18, - ( + - 1 ) + ( + + col1 ) - - + 65 ) FROM tab1 cor0 GROUP BY col0 query I rowsort label-5754 @@ -35109,7 +35109,7 @@ SELECT ALL 79 AS col2 FROM tab0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT col2 * - + CAST ( NULL AS INTEGER ) + + col2 AS col1 FROM tab1 WHERE NOT ( NOT NULL < + col0 + + col0 ) GROUP BY col2 HAVING NOT NULL = + 70 + - + col1 AND 60 - + COUNT ( * ) + col2 + - col1 <> NULL query I rowsort @@ -35370,7 +35370,7 @@ SELECT 33 AS col1 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT - col0 col1 FROM tab0 GROUP BY col0 HAVING NULL IN ( + + ( 81 ), col1, + col1 ) query I rowsort label-5801 @@ -35537,13 +35537,13 @@ SELECT DISTINCT + 13 + - CAST ( - col2 AS INTEGER ) + + col2 * - 21 FROM tab1 AS # Datafusion - Expected - 1246 # Datafusion - Expected - 42427 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - 98 + col2 + + COALESCE ( - - ( - 21 ), + - ( col0 ) ) * ( - col2 ) * + col2 + - col2 FROM tab1 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + 8 + + 52 AS col1 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL >= col2 + col1 query I rowsort label-5832 @@ -35850,7 +35850,7 @@ SELECT DISTINCT - + col0 AS col0 FROM tab0 AS cor0 GROUP BY col0 HAVING ( 26 ) N # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, min\(DISTINCT NULL\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, min\(DISTINCT NULL\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT - - ( + 90 ) AS col1 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT NULL <= - + 21 * ( + 30 / 82 + MIN ( DISTINCT CAST ( NULL AS INTEGER ) ) ) + ( col1 - COUNT ( * ) / 80 ) * + 28 query I rowsort @@ -36080,7 +36080,7 @@ SELECT 9 - - col1 FROM tab2 GROUP BY col1 HAVING - CAST ( NULL AS INTEGER ) IN ( # Datafusion - Expected - -81 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, count\(Int64\(1\)\), sum\(tab0\.col2\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, count\(Int64\(1\)\), sum\(tab0\.col2\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 * - CASE WHEN NULL NOT IN ( 52, - col0, + col0 + ( + + COUNT ( * ) ), - CAST ( NULL AS INTEGER ) ) THEN + - NULLIF ( - 84, + - SUM ( + col2 ) - 35 ) ELSE COUNT ( * ) END FROM tab0 GROUP BY col1 query I rowsort label-5925 @@ -36127,7 +36127,7 @@ SELECT ALL - col2 col1 FROM tab2 GROUP BY col2 HAVING NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0, tab2\.col2, count\(Int64\(1\)\), count\(Int64\(\-40\)\), avg\(DISTINCT tab2\.col2\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, tab2\.col2, count\(Int64\(1\)\), count\(Int64\(\-40\)\), avg\(DISTINCT tab2\.col2\)" appears in the SELECT clause satisfies this requirement SELECT ALL col2 + col2 - - 43 * + - COUNT ( * ) / CASE + CAST ( NULL AS INTEGER ) WHEN - - COALESCE ( - + 59, col1 / col1 * + COUNT ( ALL + - 40 ) * - 52, - - CASE WHEN col1 NOT BETWEEN NULL AND NULL THEN NULL ELSE 33 + + col0 / 65 END * col2 ) * - col2 + col0 THEN - COUNT ( * ) WHEN col0 THEN NULL END FROM tab2 GROUP BY col0, col2 HAVING ( col0 ) BETWEEN ( CAST ( NULL AS INTEGER ) ) AND NULLIF ( - CAST ( NULL AS INTEGER ), 92 + + ( - AVG ( DISTINCT col2 ) ) / 76 ) query I rowsort label-5933 @@ -36498,7 +36498,7 @@ SELECT - - col1 * - + COUNT ( DISTINCT CAST ( NULL AS FLOAT8 ) ) FROM tab1 AS co # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - ( - COALESCE ( 45, + col2, + col1, CAST ( + COUNT ( * ) AS INTEGER ) ) ) FROM tab1 WHERE NULL IS NOT NULL GROUP BY col1 query I rowsort @@ -36744,7 +36744,7 @@ SELECT ( - + COUNT ( * ) ) * + CAST ( NULL AS INTEGER ) + col0 AS col2 FROM tab0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, max\(DISTINCT Int64\(\-95\)\), count\(DISTINCT \(\- NULL\)\), min\(DISTINCT cor0\.col0\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, max\(DISTINCT Int64\(\-95\)\), count\(DISTINCT \(\- NULL\)\), min\(DISTINCT cor0\.col0\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col2 + - - col2 col0 FROM tab0 AS cor0 WHERE 37 IS NULL GROUP BY col2 HAVING NULL IN ( - MAX ( DISTINCT - 95 ), + col0, + COUNT ( DISTINCT - CAST ( NULL AS FLOAT8 ) ), 95 / 83, ( MIN ( DISTINCT col0 ) ) + + 63 ) query II rowsort @@ -37034,7 +37034,7 @@ SELECT - col0 + - col0 * col0 FROM tab1 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, max\(Int64\(69\)\), sum\(Int64\(\-37\)\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, max\(Int64\(69\)\), sum\(Int64\(\-37\)\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT + - col2 AS col1, col2 * - col2 col0 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT ( NULL ) <= - MAX ( ALL + 69 ) * COALESCE ( - SUM ( ALL + - 37 ), - col2 * - + ( - 19 ) / ( col0 ) * + + COUNT ( * ) + + COUNT ( * ) - + col0 * + col2, + COUNT ( * ) + - 46 * col0 ) * + - col2 * + col1 + col2 + + 58 + - col0 + + - col2 * - + col1 * + 17 * - + 74 + - + col0 * - 5 query I rowsort label-6079 @@ -37224,7 +37224,7 @@ SELECT + ( + 59 ) + ( + NULLIF ( 79, + ( + COUNT ( * ) ) ) ) FROM tab2 GROUP BY # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0, tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 + - 78 AS col1 FROM tab0 GROUP BY col0, col0 HAVING NOT NULL > col1 - - col0 query I rowsort @@ -37464,7 +37464,7 @@ SELECT DISTINCT + COUNT ( * ) * + col0 * + - 44 FROM tab1 GROUP BY col0 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + - NULLIF ( - CAST ( NULL AS INTEGER ), + CAST ( 46 AS INTEGER ) + - CAST ( + col0 AS FLOAT8 ) ) FROM tab2 AS cor0 GROUP BY col2 query I rowsort label-6155 @@ -37509,7 +37509,7 @@ SELECT DISTINCT - CAST ( col2 AS INTEGER ) AS col0, - col2 * + - 5 + ( + col2 ) # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - 0 AS col2 FROM tab2 GROUP BY col0 HAVING - col2 - col0 < NULL query II rowsort label-6161 @@ -37537,7 +37537,7 @@ SELECT + COUNT ( ALL - col2 ) * - col0 FROM tab1 AS cor0 GROUP BY col2, col2, co # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, min\(Int64\(27\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, min\(Int64\(27\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col0 * - col0 + MIN ( + 27 ) AS col2 FROM tab0 AS cor0 WHERE - col0 IS NULL GROUP BY col0 HAVING NOT - col2 <= NULL query I rowsort @@ -37594,7 +37594,7 @@ SELECT col0 * + col0 * col0 col1 FROM tab1 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL + - COUNT ( * ) * + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING - 19 + col2 > NULL query I rowsort @@ -37705,7 +37705,7 @@ SELECT ALL + col0 * 4 FROM tab1 WHERE NOT col0 BETWEEN + 24 AND + + col0 GROUP B # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + col1 AS col2 FROM tab2 GROUP BY col1 HAVING NOT - col2 < NULL query I rowsort @@ -38078,7 +38078,7 @@ SELECT ( + col2 ) * col2 * 30 - + col2 * - 4 + - col2 FROM tab0 GROUP BY col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -67 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 67, ( + - col0 ) ) FROM tab0 AS cor0 GROUP BY col2 query I rowsort @@ -38611,7 +38611,7 @@ SELECT ALL - col0 + + - col0 FROM tab0 cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT - 37 - + col2 * + col2 AS col0, 65 AS col1 FROM tab0 GROUP BY col2 HAVING NULL NOT BETWEEN col1 + + COUNT ( * ) AND - 7 # Datafusion - Datafusion expected results: @@ -38699,7 +38699,7 @@ SELECT COUNT ( + ( - col0 ) ) / 53 col1 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1, tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 + + 28 AS col2 FROM tab2 GROUP BY col1, col1 HAVING NOT col2 >= NULL query I rowsort label-6355 @@ -38729,7 +38729,7 @@ SELECT DISTINCT + 97 FROM tab2 GROUP BY col2 HAVING NOT ( + 0 ) IS NULL # Datafusion - Expected - 2952 # Datafusion - Expected - 792 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0, tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( ( 36 ), col0 + + col1, - col0 + + col0 ) * col0 AS col0 FROM tab1 GROUP BY col0, col2 query I rowsort @@ -38821,13 +38821,13 @@ SELECT + 29 AS col1 FROM tab1 GROUP BY col1 HAVING + ( 12 ) - 2 * + 97 BETWEEN C # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + ( - col2 ) AS col0 FROM tab2 AS cor0 WHERE NOT ( - 1 * col2 ) <> ( 37 ) GROUP BY col2 HAVING ( col2 ) IN ( COALESCE ( + ( + COALESCE ( - 64, COUNT ( * ) + ( col0 ) * 12 ) ), + COUNT ( * ), COUNT ( * ) / 97 ) ) # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 HAVING ( NULL ) NOT BETWEEN CAST ( NULL AS FLOAT8 ) AND ( - col1 ) query I rowsort label-6378 @@ -39185,7 +39185,7 @@ SELECT ALL + col2, + col2 FROM tab2 AS cor0 GROUP BY col1, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, count\(Int64\(1\)\), min\(cor0\.col2\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, count\(Int64\(1\)\), min\(cor0\.col2\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COUNT ( * ) + - col0 + + col0 AS col2 FROM tab2 AS cor0 GROUP BY col0 HAVING NULL NOT BETWEEN + col2 * + NULLIF ( - - COUNT ( * ), + col0 ) AND + CASE - col0 WHEN - col2 THEN + MIN ( ALL + col2 ) WHEN COUNT ( * ) * col0 THEN NULL END # Datafusion - Datafusion expected results: @@ -39910,7 +39910,7 @@ SELECT + col2 AS col2 FROM tab0 cor0 GROUP BY col2, col1 HAVING NOT + CAST ( col # Datafusion - Expected - 138 # Datafusion - Expected - 438 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1, min\(NULL\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1, min\(NULL\)" appears in the SELECT clause satisfies this requirement SELECT - - COALESCE ( 23, - + CASE + col1 WHEN - - 20 + + MIN ( ALL + + CAST ( NULL AS INTEGER ) ) THEN + col0 * + col0 ELSE - 39 * + 45 END + 33 + 73 * + col2, col1, + col0 ) * + col1, 73 * col1 col0 FROM tab1 cor0 GROUP BY col2, col1 HAVING NOT NULL IS NOT NULL query I rowsort label-6557 @@ -40261,13 +40261,13 @@ SELECT DISTINCT + col0 AS col2 FROM tab2 GROUP BY col0, col0 HAVING 65 IS NOT NU # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1, count\(Int64\(12\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, count\(Int64\(12\)\)" appears in the SELECT clause satisfies this requirement SELECT + 23 / + col1 AS col2 FROM tab2 GROUP BY col1 HAVING NOT NULLIF ( + ( CAST ( NULL AS INTEGER ) ), CAST ( - COUNT ( 12 ) AS FLOAT8 ) - col2 ) IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, tab0\.col1, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col1, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 AS col0 FROM tab0 GROUP BY col1, col1 HAVING NOT ( NULL ) <> ( - COUNT ( * ) + col0 ) query I rowsort label-6620 @@ -40429,7 +40429,7 @@ SELECT 44 FROM tab2 cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + col2 AS col1 FROM tab2 WHERE NULL IS NOT NULL GROUP BY col2 HAVING NOT NULL <> - NULLIF ( + 3, + col1 ) query II rowsort @@ -40521,7 +40521,7 @@ SELECT 72 + - col0 * - + col0 / COUNT ( * ) AS col1 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1, avg\(\(\- cor0\.col1\)\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1, avg\(\(\- cor0\.col1\)\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT - 97 + AVG ( ( - + col1 ) ) + 33 + CAST ( + 89 AS INTEGER ) / - col1 * - + col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, col1 HAVING NOT - COUNT ( * ) - ( + 5 ) * + col2 = NULL query I rowsort @@ -40550,7 +40550,7 @@ SELECT DISTINCT + - col2 FROM tab1 AS cor0 GROUP BY col0, col2 HAVING NULL <> NU # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0, cor0\.col0, min\(\(\- cor0\.col0\)\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0, cor0\.col0, min\(\(\- cor0\.col0\)\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT MIN ( + - col0 ) + + 29 + - + col0 AS col1 FROM tab0 AS cor0 WHERE NOT 57 BETWEEN NULL AND - - col2 GROUP BY col2, col0, col0 HAVING NULL BETWEEN - col1 AND COUNT ( * ) query I rowsort @@ -40851,7 +40851,7 @@ SELECT ALL - - col1 * + col1 + + - SUM ( DISTINCT - col1 ) AS col0 FROM tab1 AS # Datafusion - Expected - 3081 # Datafusion - Expected - 936 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL ( - - CASE + + 50 WHEN + col2 THEN NULL WHEN ( - 84 ) THEN col2 * + col0 ELSE COUNT ( * ) * 39 END ) * + + col2 FROM tab0 GROUP BY col2 query I rowsort label-6717 @@ -41232,7 +41232,7 @@ SELECT DISTINCT 93 AS col1, 35 AS col2 FROM tab1 AS cor0 GROUP BY col0, col2, co # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + col1 AS col2, col1 col1 FROM tab2 AS cor0 GROUP BY col1 HAVING ( NULL ) = - col2 query I rowsort @@ -41302,7 +41302,7 @@ SELECT DISTINCT - 54 / 27 AS col0, 74 FROM tab0 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + NULLIF ( col0, - - 92 ) AS col2 FROM tab1 GROUP BY col0 HAVING NULL < - col2 query I rowsort @@ -41422,7 +41422,7 @@ SELECT col1 + + + col0 AS col2 FROM tab1 GROUP BY col1, col0 # Datafusion - Expected - 77 # Datafusion - Expected - 77 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0, tab0\.col1, count\(tab0\.col0\), sum\(DISTINCT \(\- Int64\(97\)\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, tab0\.col1, count\(tab0\.col0\), sum\(DISTINCT \(\- Int64\(97\)\)\)" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - + 77, + COUNT ( + col0 ), + + 2 + - + col1 - col2 + - SUM ( DISTINCT - + 97 ) + - - col1 / - 77 * - col1 ) FROM tab0 GROUP BY col0, col1 query I rowsort label-6809 @@ -42059,7 +42059,7 @@ SELECT DISTINCT - col1 * col1 * col1 - - col1 * - 88 * col1 + col1 AS col1 FROM # Datafusion - Expected - -11170 # Datafusion - Expected - -5910 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2, tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - ( - 55 ) * - col2 + COALESCE ( 75, - CASE WHEN NOT + col0 IS NOT NULL THEN NULL WHEN NOT NULL NOT IN ( + 10 + ( + CAST ( + 47 AS INTEGER ) ) ) THEN - col1 * + col2 END / - 62 ) * - col0 FROM tab2 GROUP BY col2, col0 query I rowsort @@ -42181,7 +42181,7 @@ SELECT DISTINCT - + ( - - COUNT ( * ) ) AS col0 FROM tab2 AS cor0 GROUP BY col2 # Datafusion - Expected - 3 # Datafusion - Expected - 4 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0, max\(DISTINCT Int64\(95\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, max\(DISTINCT Int64\(95\)\)" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 92, col2 + + 40 * MAX ( DISTINCT + 95 ) ) / col0 FROM tab1 GROUP BY col0 query I rowsort label-6934 @@ -42335,7 +42335,7 @@ SELECT DISTINCT + col2 - - CAST ( NULL AS INTEGER ) + + 81 - + col2 * + col2 * C # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, max\(\(\- Int64\(40\)\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, max\(\(\- Int64\(40\)\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT MAX ( ALL - + 40 ) col0 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL IN ( col0 + col0, col0 ) query I rowsort @@ -42398,7 +42398,7 @@ SELECT ALL ( - - COUNT ( - 77 ) ) * + col2 AS col1, + COUNT ( * ) / col2 * + col # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1, count\(Int64\(1\)\), sum\(DISTINCT \(\- NULL\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1, count\(Int64\(1\)\), sum\(DISTINCT \(\- NULL\)\)" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( ( 53 ), COUNT ( * ), - NULLIF ( - SUM ( DISTINCT - CAST ( NULL AS INTEGER ) ), CASE - col0 WHEN COUNT ( * ) / - ( - col1 ) THEN - col2 - col0 ELSE - COALESCE ( col0, + 78 + + ( col2 ) * ( col0 ) ) * - col2 END ) ) FROM tab2 AS cor0 WHERE NOT - ( + ( col1 ) ) - + - col2 + col2 + - col2 + + - col2 * 74 + - col0 IS NOT NULL GROUP BY col0, col1 query I rowsort @@ -42439,7 +42439,7 @@ SELECT - - col2 FROM tab0 WHERE NULL >= NULL GROUP BY col2 HAVING ( NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - - 33, + ( + col2 ) * - + col1 * + + col0 * + - 9 * col1 - - + col1 + col2 * NULLIF ( + col2, - + col1 * CAST ( col2 AS INTEGER ) ) ) * - - 6, + 23 + - col1 + - col1 * + col1 AS col2 FROM tab0 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL query II rowsort label-6976 @@ -43074,7 +43074,7 @@ SELECT + col1 AS col2, + col1 FROM tab2 GROUP BY col1, col1 HAVING ( NULL ) NOT # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1, tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT CASE - CAST ( NULL AS INTEGER ) WHEN - 14 * - col0 + - - 3 + + col1 THEN + + 94 * col2 ELSE NULL END FROM tab0 GROUP BY col1, col0 query I rowsort @@ -43450,7 +43450,7 @@ SELECT DISTINCT col1 * col1 AS col1 FROM tab1 AS cor0 GROUP BY col1 HAVING - 65 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 col2 FROM tab1 cor0 GROUP BY col0 HAVING NOT NULL NOT IN ( col2 * + col2 ) query I rowsort @@ -43648,7 +43648,7 @@ SELECT DISTINCT col1 * 40 FROM tab0 WHERE NOT NULL IS NOT NULL GROUP BY col1 # Datafusion - Expected - 96 # Datafusion - Expected - 96 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 96, + - col2 * - 1 ) FROM tab2 GROUP BY col1 query I rowsort label-7177 @@ -43820,7 +43820,7 @@ SELECT DISTINCT - 1 AS col0 FROM tab0 GROUP BY col1, col1 HAVING NOT ( COUNT ( * # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0, tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 AS col2 FROM tab1 GROUP BY col0, col0 HAVING NOT - 81 * - - col2 < NULL query I rowsort label-7205 @@ -43918,7 +43918,7 @@ SELECT DISTINCT 11 + + CAST ( NULL AS INTEGER ) * - COUNT ( * ) FROM tab2 GROUP # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0, max\(tab2\.col1\), count\(Int64\(\-11\)\), sum\(tab2\.col0\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0, max\(tab2\.col1\), count\(Int64\(\-11\)\), sum\(tab2\.col0\)" appears in the SELECT clause satisfies this requirement SELECT ALL + col0 * + COALESCE ( - - MAX ( ALL col1 ), - 55 ) AS col2 FROM tab2 GROUP BY col0 HAVING NOT ( NULL ) IS NULL AND NOT ( NULL ) BETWEEN ( - CAST ( 96 AS FLOAT8 ) ) AND - 45 * CASE COUNT ( - 11 ) / - SUM ( + col0 ) WHEN 1 THEN - col0 ELSE NULL END - col2 query I rowsort label-7222 @@ -44030,7 +44030,7 @@ SELECT col1 FROM tab1 GROUP BY col1 HAVING - - COUNT ( * ) + + col1 + + 13 < + 1 # Datafusion - Expected - -1025 # Datafusion - Expected - -1133 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 59, + 39 * + col2 * - 15 ) + + - col0 + + 91 * + - 10 + - col0 AS col1 FROM tab1 AS cor0 GROUP BY col0 query I rowsort label-7239 @@ -44548,7 +44548,7 @@ SELECT ALL - + col0 * - COUNT ( * ) AS col2 FROM tab2 AS cor0 GROUP BY col0 HAVI # Datafusion - Expected - -79 # Datafusion - Expected - -79 skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, sum\(DISTINCT cor0\.col2\), count\(\(\- cor0\.col0\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, sum\(DISTINCT cor0\.col2\), count\(\(\- cor0\.col0\)\)" appears in the SELECT clause satisfies this requirement SELECT - 79 col0 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT col0 * ( SUM ( DISTINCT + col2 ) ) IN ( - COUNT ( ALL + - col0 ) ) OR NOT NULL IS NOT NULL query I rowsort label-7321 @@ -44717,7 +44717,7 @@ SELECT DISTINCT - col2 * + - SUM ( ALL - CASE - 33 WHEN + 30 THEN 17 ELSE NULL E # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1, tab2\.col2, min\(tab2\.col2\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, tab2\.col2, min\(tab2\.col2\)" appears in the SELECT clause satisfies this requirement SELECT + col2 * COALESCE ( + CAST ( + col1 AS INTEGER ), MIN ( + col2 ) * - - 21 + + - 54 ), - col1 col0 FROM tab2 GROUP BY col1, col2 HAVING ( NULL ) NOT IN ( + col2 + + col0 + - col0 * + col0 + + + col2, - 97, - - col0 - - col2 + - 44 ) query II rowsort label-7349 @@ -44768,7 +44768,7 @@ SELECT - 77 * + + 12 FROM tab2 AS cor0 GROUP BY col0 # Datafusion - Expected - -31 # Datafusion - Expected - -31 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 31, + - col0 / - col1 + + col1, - 64, CAST ( NULL AS INTEGER ) ) AS col1 FROM tab1 AS cor0 GROUP BY col2 query I rowsort @@ -45464,7 +45464,7 @@ SELECT 43 AS col2, COUNT ( * ) * - 91 + + 87 AS col2 FROM tab2 GROUP BY col2 HAV # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2, tab0\.col2, max\(\(\- tab0\.col0\)\), min\(DISTINCT tab0\.col2\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, tab0\.col2, max\(\(\- tab0\.col0\)\), min\(DISTINCT tab0\.col2\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL col2 - col2 * COALESCE ( + 54, - col1 * CAST ( - - 33 AS INTEGER ) * - col0 * - col2 + - - 55 - - 27 + MAX ( - col0 ) + + - CAST ( NULL AS INTEGER ) / - + COALESCE ( col1, col0 + - col2, + NULLIF ( col1, + NULLIF ( 19, 46 / 46 ) ) * ( 63 ) ) + col2, + 51 ) + MIN ( DISTINCT col2 ) AS col1 FROM tab0 GROUP BY col2, col2 HAVING NOT NULL NOT BETWEEN ( col1 + COUNT ( * ) ) AND NULL query I rowsort label-7478 @@ -45567,7 +45567,7 @@ SELECT col2 FROM tab2 GROUP BY col2, col1 HAVING NOT - col2 IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col2 col0 FROM tab2 GROUP BY col2 HAVING NOT NULL > + col0 query I rowsort @@ -45748,7 +45748,7 @@ SELECT + 85, + 29 FROM tab2 AS cor0 GROUP BY col0 HAVING ( NULL ) IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, avg\(\(\- cor0\.col0\)\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, avg\(\(\- cor0\.col0\)\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL - 82 col0 FROM tab0 AS cor0 GROUP BY col2 HAVING ( NULL ) IN ( 35, AVG ( ALL - col0 ), CASE - 83 WHEN - 49 + COUNT ( * ) THEN + COUNT ( * ) WHEN + COUNT ( * ) + col2 * - + col0 / CAST ( + 2 AS FLOAT8 ) THEN NULL END * + 64 * + - COUNT ( * ), - col0 ) query I rowsort @@ -45773,7 +45773,7 @@ SELECT - col2 FROM tab1 GROUP BY col1, col0, col2 HAVING + col2 IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, tab0\.col2, tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, tab0\.col2, tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + col2 * - col2 col0 FROM tab0 GROUP BY col2, col2, col2 HAVING NULL NOT BETWEEN + - col0 AND NULL query I rowsort label-7531 @@ -45821,7 +45821,7 @@ SELECT - col1 FROM tab1 AS cor0 WHERE + col2 IS NOT NULL GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0, tab1\.col1, avg\(Int64\(55\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col1, avg\(Int64\(55\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col1 + + AVG ( + 55 ) AS col2 FROM tab1 GROUP BY col0, col1 HAVING NOT ( col2 * + 67 <> NULL ) query I rowsort @@ -47233,7 +47233,7 @@ SELECT ALL 78 / col1 FROM tab2 GROUP BY col2, col1, col1 HAVING NOT ( NULL IS NU # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + 26 / + + COUNT ( * ) * - ( - + CAST ( NULL AS INTEGER ) ) * + col2 + + CAST ( NULL AS INTEGER ) * COALESCE ( + 19, - col2 + + col0 ) + - col2 FROM tab0 GROUP BY col2 query II rowsort label-7774 @@ -47599,7 +47599,7 @@ SELECT 66 * + 69 * 92 * - 1 FROM tab0 GROUP BY col0 # Datafusion - Expected - -54 # Datafusion - Expected - -54 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 54, + 91 + ( - - col1 ) * + 25 / + col2 * col2 - - + 77 ) FROM tab1 GROUP BY col0 # Datafusion - Datafusion expected results: @@ -47665,7 +47665,7 @@ NULL # Datafusion - Expected - -49252 # Datafusion - Expected - 28 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0 * - - ( ( - + 20 ) ) * + COALESCE ( + 88, + + col2 ) + col0, col0 AS col2 FROM tab1 GROUP BY col0 query I rowsort @@ -48559,7 +48559,7 @@ SELECT DISTINCT 49, + 39 AS col0 FROM tab2 AS cor0 GROUP BY col2 # Datafusion - Expected - -20 # Datafusion - Expected - -20 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, tab0\.col1, count\(Int64\(1\)\), min\(NULL \+ CASE tab0\.col2 WHEN Int64\(81\) \+ tab0\.col1 THEN tab0\.col1 END\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, tab0\.col1, count\(Int64\(1\)\), min\(NULL \+ CASE tab0\.col2 WHEN Int64\(81\) \+ tab0\.col1 THEN tab0\.col1 END\)" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - + 20, COUNT ( * ) + - CASE + col0 WHEN col2 * + NULLIF ( NULLIF ( COALESCE ( - col1, 62 * - 42 ), 41 * col2 ), + CAST ( - col1 AS INTEGER ) * MIN ( CAST ( NULL AS INTEGER ) + CASE col2 WHEN 81 + col1 THEN + col1 END ) ) * - col0 + COUNT ( * ) THEN NULL WHEN + CAST ( - ( + CAST ( COUNT ( * ) AS INTEGER ) ) AS INTEGER ) * - 99 THEN 66 ELSE NULL END + + col1 ) FROM tab0 GROUP BY col2, col1 query I rowsort label-7985 @@ -48938,7 +48938,7 @@ SELECT DISTINCT ( col1 ) + col1 + + - 62 FROM tab0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COUNT ( * ) col0 FROM tab0 GROUP BY col2 HAVING NULL = + + col0 + + 57 query I rowsort @@ -49280,7 +49280,7 @@ SELECT ALL 98 + - 45 AS col0 FROM tab0 AS cor0 GROUP BY col2, col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, tab0\.col2, max\(Int64\(25\)\), count\(Int64\(1\)\), count\(DISTINCT tab0\.col1\), avg\(\(\- tab0\.col0\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col2, max\(Int64\(25\)\), count\(Int64\(1\)\), count\(DISTINCT tab0\.col1\), avg\(\(\- tab0\.col0\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - 33 + + col2 * MAX ( 25 ), - col1 + + col1 AS col0 FROM tab0 GROUP BY col1, col2 HAVING + col1 - CASE + col0 WHEN - col0 * + 10 THEN CASE + CASE WHEN col1 > col1 * + col2 + 78 * + 17 + - + col2 THEN NULL ELSE + COUNT ( * ) END WHEN + - col1 * - col0 THEN - COUNT ( DISTINCT + col1 ) * - COALESCE ( - 43, + COUNT ( * ), + + col1 ) / - + AVG ( + - col0 ) ELSE + - 74 + col2 / - CAST ( NULL AS INTEGER ) END * col2 + + col2 ELSE - 58 * + 40 + col2 END >= ( NULL ) query I rowsort label-8107 @@ -49427,7 +49427,7 @@ SELECT col0 * + COUNT ( col0 ) + - - col0 AS col2 FROM tab0 AS cor0 GROUP BY col # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, max\(DISTINCT cor0\.col1\), count\(Int64\(65\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, max\(DISTINCT cor0\.col1\), count\(Int64\(65\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL - MAX ( DISTINCT + + col1 ) - + col1 * + - col1 + + col1 * + col1 * - COALESCE ( - 89, - + col1 * - + col2, + - NULLIF ( + COUNT ( 65 ), + 21 + + col1 ) * - - col2 + col0 ) FROM tab0 cor0 GROUP BY col1 HAVING NULL IS NOT NULL query I rowsort @@ -49837,7 +49837,7 @@ SELECT ALL 51 + col0 FROM tab0 AS cor0 WHERE col1 * + 31 < ( - col2 ) GROUP BY c # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COUNT ( * ) * + col2 / col2 col1 FROM tab1 AS cor0 GROUP BY col2 HAVING ( - 79 / - col1 + 25 ) >= ( NULL ) query I rowsort @@ -50089,7 +50089,7 @@ SELECT - 64 FROM tab1 AS cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, count\(Int64\(1\)\), min\(tab0\.col1\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, count\(Int64\(1\)\), min\(tab0\.col1\)" appears in the SELECT clause satisfies this requirement SELECT + NULLIF ( - - ( - CAST ( NULL AS INTEGER ) ), + col1 + col0 * - 14 * + CAST ( + COUNT ( * ) AS INTEGER ) ) + + - MIN ( + col1 ) + + col1 FROM tab0 GROUP BY col1 HAVING NOT + 0 IS NOT NULL query I rowsort @@ -50142,7 +50142,7 @@ SELECT col2 / - col2 * col2 col1 FROM tab2 GROUP BY col2, col2 HAVING NOT NULL I # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + NULLIF ( - ( CAST ( NULL AS INTEGER ) ), - + col2 ) + + col1 - ( - col1 ) FROM tab1 AS cor0 GROUP BY col1, col1 query I rowsort @@ -50316,7 +50316,7 @@ SELECT ALL 30 FROM tab0 AS cor0 GROUP BY col0, col0, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL col0 - - col0 AS col2, col0 + ( + col0 ) col1 FROM tab2 AS cor0 GROUP BY col0, col0 HAVING NULL NOT BETWEEN + COUNT ( * ) * col1 AND + ( + - col0 ) query I rowsort label-8289 @@ -50491,7 +50491,7 @@ SELECT DISTINCT - 60 + - ( col0 ) AS col2 FROM tab0 GROUP BY col0, col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1, tab2\.col0, sum\(\(\- tab2\.col0\)\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, tab2\.col0, sum\(\(\- tab2\.col0\)\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL CASE - col0 WHEN 57 * SUM ( - + col0 ) THEN NULL WHEN - - 91 THEN - col1 ELSE NULL END AS col2 FROM tab2 GROUP BY col1, col0 HAVING NOT + 6 * + - col0 + CAST ( + COUNT ( * ) AS FLOAT8 ) * - col2 >= - - CAST ( NULL AS INTEGER ) query I rowsort @@ -50626,7 +50626,7 @@ SELECT + col2 AS col1, 16 * - MAX ( ALL - col2 ) * + + col2 * + - ( - - 16 ) AS # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col2 + - 33 AS col1 FROM tab2 GROUP BY col2 HAVING NOT NULL <> - col1 query I rowsort label-8340 @@ -50900,7 +50900,7 @@ SELECT + col1 FROM tab1 GROUP BY col1, col2 HAVING NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL + 37 col0 FROM tab1 GROUP BY col2 HAVING NULL NOT BETWEEN COUNT ( * ) + - ( - col0 ) + col0 * col0 * + col2 * - - 37 AND NULL query I rowsort @@ -51177,7 +51177,7 @@ SELECT DISTINCT + - MIN ( DISTINCT - col0 ) FROM tab0 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1, count\(Int64\(1\)\), count\(DISTINCT tab0\.col1\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, count\(Int64\(1\)\), count\(DISTINCT tab0\.col1\)" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + - 66, col0 + 1 + - - col1 ) + + CAST ( + COUNT ( * ) AS INTEGER ) + - 64 + + + 20 * - col1 + - - COUNT ( DISTINCT + col1 ) * - col1 / COUNT ( * ) * - col1 / 8 FROM tab0 WHERE NOT - - col0 IS NOT NULL GROUP BY col1 HAVING NULL <> NULL query I rowsort @@ -51262,7 +51262,7 @@ SELECT - col1 + + col1 AS col0 FROM tab0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2, tab1\.col1, min\(NULL\), count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2, tab1\.col1, min\(NULL\), count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT col2 * CAST ( NULLIF ( CAST ( NULL AS INTEGER ), + col0 / - 65 ) / + 24 AS INTEGER ) + - 59 * col1 col1 FROM tab1 GROUP BY col2, col1 HAVING + col1 / - MIN ( CAST ( NULL AS FLOAT8 ) ) > ( + 24 * + COUNT ( * ) ) query I rowsort @@ -51387,7 +51387,7 @@ SELECT col2 * col2 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT NULL >= + col2 # Datafusion - Expected - 16 # Datafusion - Expected - 16 skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + 16 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT ( + 53 ) BETWEEN + col2 * + col1 AND 22 query I rowsort @@ -51614,7 +51614,7 @@ SELECT - col2 * 95 AS col1 FROM tab1 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, count\(Int64\(1\)\), avg\(\(\- Int64\(1\)\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, count\(Int64\(1\)\), avg\(\(\- Int64\(1\)\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + 1 * COALESCE ( - 46, - + COUNT ( * ) ) / 79 + col2 - - col2 / AVG ( ALL - + 1 ) AS col1 FROM tab0 AS cor0 GROUP BY col2 HAVING COUNT ( * ) * - col1 = NULL query I rowsort label-8504 @@ -51719,7 +51719,7 @@ SELECT ALL + col2 * MAX ( DISTINCT - col2 ) AS col1 FROM tab2 GROUP BY col2, col # Datafusion - Expected - 3124 # Datafusion - Expected - 48 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - + CASE + 33 WHEN - - 67 THEN col0 ELSE - CAST ( - col1 AS INTEGER ) END * - col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, col1 query I rowsort label-8519 @@ -51783,7 +51783,7 @@ SELECT DISTINCT COUNT ( * ) - - + col2 + + MAX ( + - 9 ) FROM tab1 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0 AS col1 FROM tab1 cor0 GROUP BY col0 HAVING NULL <> - - CAST ( + + col1 AS INTEGER ) + 42 + - col1 + - 16 query I rowsort @@ -52466,7 +52466,7 @@ SELECT ALL - - col1 FROM tab2 AS cor0 GROUP BY col0, col1, col1 HAVING NOT - col # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, count\(Int64\(1\)\), min\(DISTINCT cor0\.col2\), min\(Int64\(\-52\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, count\(Int64\(1\)\), min\(DISTINCT cor0\.col2\), min\(Int64\(\-52\)\)" appears in the SELECT clause satisfies this requirement SELECT ALL + 59 col2 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT NULL IN ( col2, col2 + - ( - + CASE + 57 WHEN + COUNT ( * ) THEN - MIN ( DISTINCT col2 ) WHEN - col2 * - - 27 THEN NULL ELSE - COUNT ( * ) + + col0 END ), MIN ( - 52 ) ) query I rowsort label-8638 @@ -52602,7 +52602,7 @@ SELECT DISTINCT - ( + 11 ) AS col2 FROM tab2 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0, count\(Int64\(1\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, count\(Int64\(1\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - 54 AS col2 FROM tab0 GROUP BY col0 HAVING NULL BETWEEN ( ( - col2 ) ) * - - COUNT ( * ) AND - - 79 query I rowsort label-8661 @@ -52698,7 +52698,7 @@ SELECT + 69 FROM tab1 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 60 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 60, - + col1, + col2 ) FROM tab1 AS cor0 GROUP BY col2 query I rowsort @@ -56613,7 +56613,7 @@ SELECT DISTINCT 39 + + col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - -26 # Datafusion - Expected - -26 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 26, + cor0.col2 + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -57838,7 +57838,7 @@ SELECT DISTINCT + 59 FROM tab2 cor0 GROUP BY cor0.col0 # Datafusion - Expected - -4720 # Datafusion - Expected - -4880 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 80, col0 ) * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1 query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_13.slt b/data/sqlite/random/groupby/slt_good_13.slt index 2f22332..2267470 100644 --- a/data/sqlite/random/groupby/slt_good_13.slt +++ b/data/sqlite/random/groupby/slt_good_13.slt @@ -1078,7 +1078,7 @@ SELECT - cor0.col1 + 92 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 59 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 59, - cor0.col0 * + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort label-159 @@ -2368,7 +2368,7 @@ SELECT 56 FROM tab2 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -79 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 79, - cor0.col0 ) FROM tab2 cor0 GROUP BY cor0.col1 query I rowsort @@ -3857,7 +3857,7 @@ SELECT + 63 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -55 # Datafusion - Expected - -55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 55, cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -5541,7 +5541,7 @@ SELECT ALL - tab1.col1 + - 90 * - 72 FROM tab1 GROUP BY col1 # Datafusion - Expected - -48 # Datafusion - Expected - -48 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 48, cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -6014,7 +6014,7 @@ SELECT ALL 79 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 5256 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 73, + cor0.col1, cor0.col2 ) * + 72 col0 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort label-903 @@ -7195,7 +7195,7 @@ SELECT ( col2 ) * cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1 # Datafusion - Expected - -864 # Datafusion - Expected - -864 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 27, cor0.col0 + - col2 ) * + 32 FROM tab0 AS cor0 GROUP BY col1 query I rowsort @@ -7931,7 +7931,7 @@ SELECT ALL + 5 FROM tab0 AS cor0 GROUP BY col0 # Datafusion - Expected - 178 # Datafusion - Expected - 97 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 97, cor0.col2 ) + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -9294,7 +9294,7 @@ SELECT 30 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 47 # Datafusion - Expected - 47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 47, - cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -10835,7 +10835,7 @@ SELECT DISTINCT ( 83 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 60 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 60, tab0.col0 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -11623,7 +11623,7 @@ SELECT DISTINCT col0 / cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 81 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 81, cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -13388,7 +13388,7 @@ SELECT DISTINCT + 35 FROM tab2 cor0 GROUP BY cor0.col1 # Datafusion - Expected - -86 # Datafusion - Expected - -9 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 6, cor0.col2 ) + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort label-2020 @@ -13418,7 +13418,7 @@ SELECT ALL - NULLIF ( - cor0.col0, cor0.col0 * col1 ) FROM tab1 AS cor0 GROUP BY # Datafusion - Expected - 870 # Datafusion - Expected - 870 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + 15 * COALESCE ( + 58, tab2.col0 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -13534,7 +13534,7 @@ SELECT DISTINCT + 8 * - tab1.col2 * tab1.col2 - + 39 / 10 FROM tab1 GROUP BY tab # Datafusion - Expected - 5 # Datafusion - Expected - 5 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 5, + tab1.col1 ) AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -20477,7 +20477,7 @@ SELECT ALL COALESCE ( + 72, - cor0.col2 ) + + cor0.col0 AS col2 FROM tab1 cor0 G # Datafusion - Expected - 0 # Datafusion - Expected - 567 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT cor0.col1 * + CAST ( + COALESCE ( + 7, cor0.col2 ) AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -20491,7 +20491,7 @@ SELECT - cor0.col1 + COALESCE ( 3, col0 ) * + col0 AS col0 FROM tab2 AS cor0 GRO # Datafusion - Datafusion expected results: # Datafusion - Expected - 6 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 6, cor0.col1, + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -20520,7 +20520,7 @@ SELECT DISTINCT 62 * COALESCE ( - 12 * - col2, - cor0.col1, 84 * + cor0.col1 ) F # Datafusion - Expected - 6461 # Datafusion - Expected - 728 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL cor0.col2 * - COALESCE ( - 91, cor0.col1 * cor0.col1, + 73 ) FROM tab1 AS cor0 GROUP BY cor0.col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function @@ -20529,7 +20529,7 @@ SELECT ALL cor0.col2 * - COALESCE ( - 91, cor0.col1 * cor0.col1, + 73 ) FROM tab # Datafusion - Expected - -4275 # Datafusion - Expected - -450 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - cor0.col1 * COALESCE ( + 75, cor0.col1, - cor0.col2, col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -20545,7 +20545,7 @@ SELECT COALESCE ( cor0.col1, cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0 # Datafusion - Expected - -13 # Datafusion - Expected - -13 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 25, cor0.col0 ) + 12 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -20567,7 +20567,7 @@ SELECT ALL + NULLIF ( cor0.col0 + - cor0.col2, - COALESCE ( cor0.col2, - cor0.co # Datafusion - Expected - 0 # Datafusion - Expected - 6966 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + 43 * cor0.col1 + cor0.col1 * CAST ( COALESCE ( 43, - col2 ) AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -20583,14 +20583,14 @@ SELECT ALL COALESCE ( + 73, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 309042 # Datafusion - Expected - 319518 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 97, cor0.col0, + cor0.col0 ) * cor0.col1 * 54 FROM tab2 AS cor0 GROUP BY col1, cor0.col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: # Datafusion - Expected - -41 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor1\.col0, cor1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col0, cor1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 41, + cor0.col1 ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col1 query I rowsort @@ -20617,7 +20617,7 @@ SELECT - cor0.col2 + - col0 * + NULLIF ( COALESCE ( cor0.col2, - 37, col2 ) + co # Datafusion - Datafusion expected results: # Datafusion - Expected - -24 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - cor0.col0 * COALESCE ( + 24, - cor0.col0 + + cor0.col2 ) / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0 query I rowsort @@ -20653,7 +20653,7 @@ SELECT + col1 * + cor0.col2 + COALESCE ( cor0.col1 + cor0.col1, 40, + cor0.col2 # Datafusion - Expected - 3956 # Datafusion - Expected - 645 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( NULLIF ( + cor0.col0, - cor0.col0 ) * 43, 52, cor0.col1 + cor0.col2 * cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -20697,7 +20697,7 @@ SELECT ALL COALESCE ( 75, cor0.col0 + cor0.col0 * - 85 ) AS col2 FROM tab2 AS co # Datafusion - Expected - 31 # Datafusion - Expected - 5 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 40, cor0.col0, + cor0.col1, cor0.col0 ) + + col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function @@ -20705,7 +20705,7 @@ SELECT ALL - COALESCE ( 40, cor0.col0, + cor0.col1, cor0.col0 ) + + col2 FROM ta # Datafusion - Expected - 0 # Datafusion - Expected - 1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 42, cor0.col0 ) / + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -20721,7 +20721,7 @@ SELECT ALL COALESCE ( 67 + + cor0.col1, cor0.col1 * cor0.col1 ) AS col0 FROM tab # Datafusion - Expected - 19 # Datafusion - Expected - 19 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 19, cor0.col2 ) col0 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY tab2.col2 query I rowsort label-3119 @@ -20758,14 +20758,14 @@ SELECT ALL col2 * - COALESCE ( 91 * cor0.col1, + cor0.col2, + cor0.col1 * cor0.c # Datafusion - Expected - -172 # Datafusion - Expected - -95 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 80, + cor0.col2, + col0 ) - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: # Datafusion - Expected - 16 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 16, cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -20779,7 +20779,7 @@ SELECT + COALESCE ( 46 + + cor0.col1, NULLIF ( 22, cor0.col1 ), + cor0.col1 ) AS # Datafusion - Datafusion expected results: # Datafusion - Expected - -79 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 79, - cor0.col0, cor0.col1 ) col0 FROM tab2 cor0 GROUP BY cor0.col1 query I rowsort @@ -20823,7 +20823,7 @@ SELECT DISTINCT COALESCE ( cor0.col0, + 5 ) + cor0.col1 FROM tab2 cor0 GROUP BY # Datafusion - Expected - 147 # Datafusion - Expected - 90 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + 64, + col2 ) + + tab0.col0 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -20845,7 +20845,7 @@ SELECT + COALESCE ( + 12 + cor0.col1, ( 51 ) * cor0.col1 ) AS col1 FROM tab2 AS # Datafusion - Expected - 12 # Datafusion - Expected - 12 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + 12, cor0.col1, cor0.col0, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -20859,7 +20859,7 @@ SELECT ALL COALESCE ( 53, cor0.col2 * + ( 19 ) ) AS col1 FROM tab1 AS cor0 GROUP # Datafusion - Datafusion expected results: # Datafusion - Expected - 99 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 99, - tab2.col2 ) AS col2 FROM tab2 GROUP BY col0 query I rowsort label-3138 @@ -20875,7 +20875,7 @@ SELECT ALL + COALESCE ( + 80, cor0.col0 + - 42 ) / + cor0.col0 AS col2 FROM tab2 # Datafusion - Expected - 1 # Datafusion - Expected - 3 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 83, + cor0.col1 ) / - col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_2.slt b/data/sqlite/random/groupby/slt_good_2.slt index 08dd460..1a067a2 100644 --- a/data/sqlite/random/groupby/slt_good_2.slt +++ b/data/sqlite/random/groupby/slt_good_2.slt @@ -708,7 +708,7 @@ SELECT 3 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 129 # Datafusion - Expected - 169 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 86, + cor0.col1 * cor0.col1 + cor0.col0 ) + + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -874,7 +874,7 @@ SELECT cor0.col1 + - cor0.col1 * - 2 AS col2 FROM tab2 AS cor0 GROUP BY col1 # Datafusion - Expected - -17 # Datafusion - Expected - -17 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 17, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -1353,7 +1353,7 @@ SELECT DISTINCT cor0.col2 col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP B # Datafusion - Expected - 7 # Datafusion - Expected - 7 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT NULLIF ( + 7, + cor0.col1 * cor0.col1 + + COALESCE ( 95, cor0.col0 * - ( - cor0.col1 * - cor0.col2 ) + col2, - cor0.col1 + cor0.col0 ) * cor0.col1 ) FROM tab2 AS cor0 GROUP BY col0, cor0.col1 query I rowsort @@ -1467,7 +1467,7 @@ SELECT DISTINCT - col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0 # Datafusion - Expected - -79 # Datafusion - Expected - -87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - cor0.col2, + 16, - cor0.col1 ) col1 FROM tab2 cor0 GROUP BY col2 query I rowsort @@ -1984,7 +1984,7 @@ SELECT - 68 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 22 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 22, cor0.col1 * + col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -3263,7 +3263,7 @@ SELECT cor0.col1 col0 FROM tab1 cor0 GROUP BY col1 # Datafusion - Expected - 1482 # Datafusion - Expected - 156 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col1 * COALESCE ( 26, col1, + ( + 42 ) + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -4095,7 +4095,7 @@ SELECT - col1 * - cor0.col0 - cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GR # Datafusion - Expected - 80 # Datafusion - Expected - 98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col1 + COALESCE ( + 39, + cor0.col2 * + cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY col1 query I rowsort @@ -4767,7 +4767,7 @@ SELECT DISTINCT - ( 6 ) FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - -77 # Datafusion - Expected - -77 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 77, col2 ) col2 FROM tab1 cor0 GROUP BY cor0.col1 query I rowsort @@ -4940,7 +4940,7 @@ SELECT 49 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 33 # Datafusion - Expected - 33 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 33, cor0.col0 + + cor0.col1, cor0.col1 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -5721,7 +5721,7 @@ SELECT DISTINCT - 17 FROM tab0 GROUP BY tab0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 51 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 51, cor0.col1 ) FROM tab0 AS cor0 GROUP BY col0 query I rowsort @@ -6026,7 +6026,7 @@ SELECT ALL 9 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 30 # Datafusion - Expected - 30 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 30, col1 / CAST ( 11 AS INTEGER ), cor0.col0 / - cor0.col2 + + cor0.col2, cor0.col2 + cor0.col2 / col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1 query I rowsort @@ -6521,7 +6521,7 @@ SELECT ALL - cor0.col0 * 32 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -60 # Datafusion - Expected - -60 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 60, cor0.col0 ) + cor0.col1 * - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2 query I rowsort @@ -7705,7 +7705,7 @@ SELECT cor0.col1 + + col1 col0 FROM tab0 AS cor0 GROUP BY col1 # Datafusion - Expected - 90 # Datafusion - Expected - 90 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + - COALESCE ( - 90, tab2.col2 ) FROM tab2 GROUP BY col1 query I rowsort label-1158 @@ -8152,7 +8152,7 @@ SELECT ALL 15 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 73 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 73, - cor0.col2 * cor0.col0, 69 ) FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -9453,7 +9453,7 @@ SELECT DISTINCT cor0.col1 * 64 FROM tab2 AS cor0 GROUP BY col1 # Datafusion - Expected - -68 # Datafusion - Expected - 13 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 + - COALESCE ( + 68, - cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col1 query I rowsort @@ -9586,7 +9586,7 @@ SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, col1, cor0.col2 # Datafusion - Expected - 53 # Datafusion - Expected - 53 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 53, cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -14222,7 +14222,7 @@ SELECT DISTINCT - 11 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 82 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 82, - cor0.col2, COALESCE ( - 87, 88 * cor0.col0 + cor0.col1 ), + cor0.col1 + + col2 * + CASE 66 WHEN cor0.col0 * col2 - - 76 THEN NULL WHEN - cor0.col1 * cor0.col0 THEN col0 WHEN cor0.col0 THEN - cor0.col1 END ) FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -14265,7 +14265,7 @@ SELECT ALL + 65 col1 FROM tab2 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 0 # Datafusion - Expected - 6480 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 80, cor0.col0 * - cor0.col0 ) * col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1 query I rowsort @@ -14374,7 +14374,7 @@ SELECT DISTINCT + 44 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -2414 # Datafusion - Expected - -272 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT cor0.col2 * COALESCE ( - 34, + cor0.col0, cor0.col2 ) FROM tab1 AS cor0 GROUP BY col2 query I rowsort @@ -14879,7 +14879,7 @@ SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NOT col1 IS NOT NULL ) AND ( NULL ) IS NOT NULL query I rowsort label-2237 @@ -15075,7 +15075,7 @@ SELECT ( 71 ) + + 53 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT cor0.col1 / COALESCE ( + 99, - cor0.col1 * NULLIF ( + 77, - cor0.col0 * cor0.col1 + NULLIF ( 69, - cor0.col2 + + 78 ) * cor0.col1 ), cor0.col0 - cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort label-2266 @@ -15678,7 +15678,7 @@ SELECT 54 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -3 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - 29 - + COALESCE ( - 26, - col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col2 query I rowsort @@ -16107,7 +16107,7 @@ SELECT 9 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -20 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 20, cor0.col2 + - 10 * cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0 query I rowsort @@ -17036,7 +17036,7 @@ SELECT + cor0.col2 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0 # Datafusion - Expected - 18 # Datafusion - Expected - 18 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 18, col2 * - cor0.col2, + col1 + + cor0.col0 * cor0.col2 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -17155,7 +17155,7 @@ SELECT DISTINCT cor0.col1 + + cor0.col0 / cor0.col0 FROM tab0 AS cor0 GROUP BY c # Datafusion - Expected - 51 # Datafusion - Expected - 51 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 51, cor0.col1, cor0.col0 - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -20897,7 +20897,7 @@ SELECT - 97 FROM tab0 AS cor0 GROUP BY col1 # Datafusion - Expected - -99 # Datafusion - Expected - -99 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + CAST ( - COALESCE ( 99, - col2, - tab2.col1 ) AS INTEGER ) AS col2 FROM tab2 GROUP BY col0 query I rowsort @@ -22365,7 +22365,7 @@ SELECT 76 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0 # Datafusion - Expected - 600 # Datafusion - Expected - 950 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL cor0.col2 * + COALESCE ( 25, + cor0.col1 / + col2, + 99 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0 query I rowsort @@ -22615,7 +22615,7 @@ SELECT DISTINCT + 29 col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor # Datafusion - Expected - 26 # Datafusion - Expected - 26 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 26, + cor0.col0 * cor0.col2, cor0.col0 + - cor0.col0 / + cor0.col1 ) FROM tab2 AS cor0 GROUP BY col0 query I rowsort @@ -22631,7 +22631,7 @@ SELECT + - 39 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 49 # Datafusion - Expected - 49 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 49, cor0.col0 * cor0.col2 - + 33 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -22779,7 +22779,7 @@ SELECT DISTINCT 67 FROM tab1 GROUP BY tab1.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 67 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 67, tab1.col0, + ( - 26 ) ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -23598,7 +23598,7 @@ SELECT + 88 * - cor0.col2 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 2100 # Datafusion - Expected - 6150 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 75, cor0.col2 ) * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0 query I rowsort label-3546 @@ -24927,7 +24927,7 @@ SELECT DISTINCT ( col2 ) FROM tab2 AS cor0 GROUP BY col2, col2 # Datafusion - Expected - 42 # Datafusion - Expected - 42 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - - COALESCE ( + 42, - col2 ) AS col2 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -25652,7 +25652,7 @@ SELECT DISTINCT - cor0.col0 * cor0.col0 + 75 FROM tab2 AS cor0 GROUP BY cor0.col # Datafusion - Expected - 65 # Datafusion - Expected - 65 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 65, cor0.col1 - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -26063,7 +26063,7 @@ SELECT ALL + 69 / 4 FROM tab1 GROUP BY col0 # Datafusion - Expected - 26 # Datafusion - Expected - 26 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 26, cor0.col2, cor0.col2 ) FROM tab0 AS cor0 GROUP BY col1 query I rowsort @@ -27613,7 +27613,7 @@ SELECT ALL - cor0.col1 * + 86 + 81 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -40 # Datafusion - Expected - -40 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 40, col1 * - tab2.col2 ) FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -27763,7 +27763,7 @@ SELECT + 97 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0 # Datafusion - Expected - 15 # Datafusion - Expected - 15 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 15, col0 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1 query I rowsort @@ -28419,7 +28419,7 @@ SELECT cor0.col1 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 92 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 92, cor0.col0 + cor0.col2, cor0.col0 * cor0.col0 + + cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -30512,7 +30512,7 @@ SELECT 85 * 56 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 8122 # Datafusion - Expected - 8304 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL CASE cor0.col0 WHEN + cor0.col0 * 2 THEN NULL ELSE - COALESCE ( + 68, cor0.col1 + 78, cor0.col0 * col2 + cor0.col0 ) + - cor0.col0 END + - cor0.col0 * - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -31109,7 +31109,7 @@ SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col0 # Datafusion - Expected - 95 # Datafusion - Expected - 95 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 95, + cor0.col2, col2 + + cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col1 query I rowsort @@ -31431,7 +31431,7 @@ SELECT DISTINCT - cor0.col2 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor # Datafusion - Expected - -18 # Datafusion - Expected - -18 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 18, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -31735,7 +31735,7 @@ SELECT DISTINCT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0 # Datafusion - Expected - -2835 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - cor0.col1 * COALESCE ( + 35, cor0.col2 * - cor0.col0 ) FROM tab0, tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -34788,7 +34788,7 @@ SELECT ALL cor0.col2 + + cor0.col2 * - 91 FROM tab1 AS cor0 GROUP BY cor0.col2, # Datafusion - Expected - 504 # Datafusion - Expected - 798 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - cor0.col2 + + COALESCE ( 22, cor0.col0, - cor0.col1 + cor0.col2 * col2, + cor0.col1 + - 10 ) * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1 query I rowsort @@ -35382,7 +35382,7 @@ SELECT + cor0.col0 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0 # Datafusion - Expected - 4 # Datafusion - Expected - 4 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 4, + cor0.col1 * 26, col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -36362,7 +36362,7 @@ SELECT 36 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - 82 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 82, cor0.col1 - cor0.col2 * - CASE + cor0.col1 * + cor0.col1 WHEN cor0.col1 + cor0.col2 THEN cor0.col2 WHEN cor0.col2 * - col2 + - cor0.col1 THEN col0 END ) FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -37064,7 +37064,7 @@ SELECT DISTINCT - 18 AS col0 FROM tab1 GROUP BY tab1.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 5 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 5, - cor0.col1 / + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -41583,7 +41583,7 @@ SELECT ALL + 64 FROM tab1 cor0 GROUP BY cor0.col2 # Datafusion - Expected - 25 # Datafusion - Expected - 25 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 25, - cor0.col0 * cor0.col1, cor0.col2 + - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -42220,7 +42220,7 @@ SELECT + 74 + 25 col2 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 2964 # Datafusion - Expected - 312 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 52, + col2 ) * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -44101,7 +44101,7 @@ SELECT DISTINCT - + tab2.col2 AS col2 FROM tab2 GROUP BY col2 # Datafusion - Expected - 13 # Datafusion - Expected - 13 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 13, + tab1.col1, tab1.col0 ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -44144,7 +44144,7 @@ SELECT - 43 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -62 # Datafusion - Expected - -62 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + ( - COALESCE ( + 62, col1 + + cor0.col2, + cor0.col2 ) ) FROM tab0 AS cor0 GROUP BY col0 query I rowsort label-6636 @@ -44585,7 +44585,7 @@ SELECT DISTINCT + cor0.col2 * - cor0.col2 FROM tab1, tab2 cor0 GROUP BY cor0.col # Datafusion - Expected - 258 # Datafusion - Expected - 498 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( COALESCE ( 6, + cor0.col0 ), - cor0.col2 ) * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0 query I rowsort @@ -47019,7 +47019,7 @@ SELECT + cor0.col0 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, c # Datafusion - Datafusion expected results: # Datafusion - Expected - 47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 47, + cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -47671,7 +47671,7 @@ SELECT ALL + 51 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col2 could not be resolved from available columns: cor1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 0, + cor1.col2 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0 query I rowsort @@ -49060,7 +49060,7 @@ SELECT 38 col2 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 25 # Datafusion - Expected - 25 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 25, 70, + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -49785,7 +49785,7 @@ SELECT - 76 AS col0 FROM tab1 cor0 GROUP BY cor0.col1 # Datafusion - Expected - 23 # Datafusion - Expected - 23 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 23, col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -50444,7 +50444,7 @@ SELECT ALL - - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 41 # Datafusion - Expected - 42 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + + 40 + tab0.col2 / + COALESCE ( + 34, col0 + tab0.col2 ) col0 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -50906,7 +50906,7 @@ SELECT DISTINCT tab0.col2 * tab0.col2 + + 78 AS col0 FROM tab0 GROUP BY tab0.col # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - CASE - COALESCE ( + tab2.col2, tab2.col1, tab2.col0 * + tab2.col1 + + tab2.col0 ) WHEN CAST ( NULL AS INTEGER ) THEN - tab2.col2 ELSE NULL END AS col2 FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -51928,7 +51928,7 @@ SELECT ALL + + tab2.col0 * 31 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - 2 # Datafusion - Expected - 57 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( - ( 22 ), tab0.col2 * ( COALESCE ( tab0.col1, 24 * - tab0.col0, tab0.col0 ) * - tab0.col2 ) ) + tab0.col2 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -52731,7 +52731,7 @@ SELECT ALL 73 * - ( tab2.col1 ) FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - 62 # Datafusion - Expected - 62 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT + + COALESCE ( + 62, col2, 94, - 39 * tab2.col0 ) FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -53309,7 +53309,7 @@ SELECT DISTINCT - - 55 / - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - -3160 # Datafusion - Expected - -3480 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT cor0.col2 * COALESCE ( - 40, cor0.col1 * - ( cor0.col2 ) ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -54288,7 +54288,7 @@ SELECT DISTINCT - 76 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT + + COALESCE ( - 51, col2 * - col0 ) / + 84 AS col0 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -54762,7 +54762,7 @@ SELECT ALL - 96 col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - -72 # Datafusion - Expected - -72 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 72, - tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -57195,7 +57195,7 @@ SELECT DISTINCT 20 AS col0 FROM tab1 cor0 GROUP BY cor0.col0 # Datafusion - Expected - -32 # Datafusion - Expected - -32 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 32, + tab0.col0, - ( tab0.col0 ) * - tab0.col2 ) AS col1 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -57641,7 +57641,7 @@ SELECT ALL + 17 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - -6 # Datafusion - Expected - -6 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 6, - tab2.col0 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -58118,7 +58118,7 @@ SELECT + - 78 + - 95 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -27 # Datafusion - Expected - -27 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT - + COALESCE ( + 27, col1 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -58803,7 +58803,7 @@ SELECT DISTINCT - col1 AS col0 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -2964 # Datafusion - Expected - -312 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - tab1.col1 * COALESCE ( 52, - tab1.col1, + tab1.col2 * + 64 ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -58921,7 +58921,7 @@ SELECT DISTINCT - 46 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0 # Datafusion - Expected - 6000 # Datafusion - Expected - 6000 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 80, - tab0.col0 - + tab0.col1 ) * 75 col1 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -58937,7 +58937,7 @@ SELECT + - 19 AS col1 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - 301 # Datafusion - Expected - 581 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + + COALESCE ( + tab0.col0, 33, + tab0.col2 / - tab0.col1 ) * + 7 AS col2 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -58974,7 +58974,7 @@ SELECT ALL COALESCE ( + 7, - tab2.col2 ) FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 76, + col1, + ( 16 ) - - tab2.col0 ) + + CAST ( NULL AS FLOAT8 ) AS col1 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -59394,7 +59394,7 @@ SELECT - - 86 AS col1 FROM tab2 GROUP BY tab2.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 41 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + COALESCE ( 41, tab0.col1 ), - tab0.col1 * + tab0.col0 + tab0.col0 ) AS col2 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -59918,7 +59918,7 @@ SELECT ALL + tab1.col1 * - 38 AS col0 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - -49 # Datafusion - Expected - -49 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + + COALESCE ( - 49, tab0.col2, tab0.col0 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -63123,7 +63123,7 @@ SELECT - tab1.col0 AS col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 61, tab0.col1 ) * + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col0 query I rowsort @@ -63336,7 +63336,7 @@ SELECT DISTINCT 56 * col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 85 # Datafusion - Expected - 85 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 85, cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -63352,7 +63352,7 @@ SELECT + - 63 col2 FROM tab0 GROUP BY col0 # Datafusion - Expected - -176 # Datafusion - Expected - -990 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 22, cor0.col0 * ( - cor0.col1 ), + cor0.col1 + + cor0.col2 * cor0.col1 ) * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -63619,7 +63619,7 @@ SELECT cor0.col1 * 58 + + 87 FROM tab0 AS cor0 GROUP BY cor0.col0, col1 # Datafusion - Expected - 36 # Datafusion - Expected - 36 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 36, cor0.col1 + - COALESCE ( + cor0.col0, + cor0.col1 / - cor0.col0 ), cor0.col1 / col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -63734,7 +63734,7 @@ SELECT DISTINCT 87 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -14 # Datafusion - Expected - -14 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 14, - tab2.col0 ) FROM tab2, tab0 AS cor0 GROUP BY tab2.col2 query I rowsort @@ -64073,7 +64073,7 @@ SELECT 45 FROM tab0 GROUP BY tab0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 83 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col1 could not be resolved from available columns: cor0\.col2, cor1\.col0, cor1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor1\.col0, cor1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 83, + cor1.col1 ) FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col0, cor1.col2 query I rowsort @@ -64527,7 +64527,7 @@ SELECT + - 97 AS col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -73 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + - COALESCE ( 73, tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col2 query I rowsort label-9720 @@ -65537,7 +65537,7 @@ SELECT - - 74 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 80 # Datafusion - Expected - 80 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 80, + tab0.col2 * col2 + tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -66104,7 +66104,7 @@ SELECT + - 74 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + CASE 16 WHEN + cor0.col2 THEN NULL WHEN 67 THEN + ( + cor0.col1 ) END AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_3.slt b/data/sqlite/random/groupby/slt_good_3.slt index 1e51ac6..47b75a3 100644 --- a/data/sqlite/random/groupby/slt_good_3.slt +++ b/data/sqlite/random/groupby/slt_good_3.slt @@ -115,7 +115,7 @@ SELECT tab2.col2 * - tab2.col2 FROM tab2 GROUP BY col2 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT + ( COALESCE ( + 29, + tab1.col2 ) ) / - tab1.col1 AS col0 FROM tab1 GROUP BY col1 query I rowsort @@ -1482,7 +1482,7 @@ SELECT - 89 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 172 # Datafusion - Expected - 332 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 4, cor0.col0 * col0, ( - cor0.col2 ) ) * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 query I rowsort @@ -2915,7 +2915,7 @@ SELECT ALL - + ( 46 ) AS col0 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 45 # Datafusion - Expected - 59 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT NULLIF ( - col2, tab0.col2 * - COALESCE ( + 59, col1, col2 ) ) + COALESCE ( 83, tab0.col2 + - ( tab0.col2 ) * + tab0.col2 ) AS col1 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -3600,7 +3600,7 @@ SELECT ALL + 75 AS col1 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 1900 # Datafusion - Expected - 1900 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + 20 * COALESCE ( 95, - tab1.col2, - tab1.col1 ) FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -3730,7 +3730,7 @@ SELECT DISTINCT ( cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 5575 # Datafusion - Expected - 850 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 10, cor0.col1, - cor0.col2 + + 31 ) * 25 + cor0.col2 * + ( 75 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2 query I rowsort @@ -4120,7 +4120,7 @@ SELECT DISTINCT - + col2 AS col0 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 0 # Datafusion - Expected - 2592 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 * COALESCE ( 32, - col2 ) AS col2 FROM tab0 GROUP BY col1 query I rowsort @@ -4748,7 +4748,7 @@ SELECT DISTINCT + 36 / - NULLIF ( cor0.col0, + col0 * 36 + - 75 ) FROM tab0 AS c # Datafusion - Datafusion expected results: # Datafusion - Expected - 98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 98, + col2, 62 + cor0.col2 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -4868,7 +4868,7 @@ SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 5986 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT 73 * COALESCE ( 82, cor0.col0 - - CASE cor0.col1 WHEN - col2 / + CASE cor0.col2 WHEN + 66 * - cor0.col2 THEN NULL WHEN COALESCE ( + cor0.col1, + cor0.col1 + cor0.col1 * - cor0.col0, - cor0.col2 * col2 ) THEN cor0.col1 END THEN - cor0.col0 + + cor0.col1 ELSE + cor0.col0 END * - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -4923,7 +4923,7 @@ SELECT DISTINCT 19 AS col0 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 98 # Datafusion - Expected - 98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 98, - col0 + - cor0.col2 / + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1 query I rowsort @@ -5051,7 +5051,7 @@ SELECT + 61 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0 # Datafusion - Expected - 31 # Datafusion - Expected - 31 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 31, cor0.col2, ( 36 ), cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1 query I rowsort @@ -5807,7 +5807,7 @@ SELECT ALL - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0 # Datafusion - Expected - -270 # Datafusion - Expected - -270 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 90, + tab0.col1 * 71 + + tab0.col1 / tab0.col0, - tab0.col0 * + tab0.col2 ) * 3 AS col0 FROM tab0 GROUP BY col2 query I rowsort @@ -6236,7 +6236,7 @@ SELECT ALL 78 + - 74 AS col2 FROM tab2 GROUP BY tab2.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -59 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 59, tab2.col0 ) AS col1 FROM tab2 GROUP BY tab2.col2 query I rowsort label-936 @@ -6622,7 +6622,7 @@ SELECT 59 AS col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 154 # Datafusion - Expected - 97 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + + COALESCE ( + 71, - tab0.col2 - CAST ( NULL AS INTEGER ) / col2, tab0.col0 ) + + tab0.col0 col0 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -6730,7 +6730,7 @@ SELECT ALL + - 7 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - -73 # Datafusion - Expected - -73 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - + COALESCE ( + 73, tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col2 query I rowsort label-1009 @@ -7232,7 +7232,7 @@ SELECT ALL + 17 - - tab2.col2 FROM tab2 GROUP BY col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 49 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 49, col1, tab1.col0 + tab1.col1 ) FROM tab1 GROUP BY col2 query I rowsort @@ -7335,7 +7335,7 @@ SELECT + 5 FROM tab0 cor0 GROUP BY cor0.col2 # Datafusion - Expected - 78 # Datafusion - Expected - 78 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 78, + tab1.col2 + - tab1.col1 ) AS col1 FROM tab1 GROUP BY tab1.col2 query I rowsort label-1100 @@ -9700,7 +9700,7 @@ SELECT col0 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0 # Datafusion - Expected - 79 # Datafusion - Expected - 92 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT cor0.col1 + COALESCE ( 35, cor0.col0 - cor0.col2, + cor0.col0 - - CASE cor0.col0 + + cor0.col1 / cor0.col1 WHEN + cor0.col2 * cor0.col2 THEN + cor0.col0 + cor0.col2 WHEN cor0.col2 THEN NULL END, cor0.col2 * cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -10500,7 +10500,7 @@ SELECT 14 + 18 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 2241 # Datafusion - Expected - 702 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 27, tab0.col2 ) * tab0.col0 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -11710,7 +11710,7 @@ SELECT DISTINCT 91 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 70 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 70, cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -13218,7 +13218,7 @@ SELECT + tab0.col1 * 52 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 2242 # Datafusion - Expected - 2318 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT + + COALESCE ( 38, - tab2.col0 + - tab2.col2 ) * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -13307,7 +13307,7 @@ SELECT + 79 FROM tab1 cor0 GROUP BY cor0.col1 # Datafusion - Expected - 826 # Datafusion - Expected - 854 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col1 * COALESCE ( + 14, cor0.col2 / + cor0.col0 + cor0.col2, - cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1 query I rowsort @@ -13443,7 +13443,7 @@ SELECT + tab0.col0 * col0 FROM tab0 GROUP BY col0 # Datafusion - Expected - -432 # Datafusion - Expected - -684 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - - tab0.col2 * COALESCE ( - 18, + tab0.col0 * CASE 98 WHEN - tab0.col0 THEN NULL WHEN - tab0.col2 - tab0.col2 * tab0.col2 THEN NULL WHEN + tab0.col2 THEN tab0.col1 * tab0.col0 ELSE NULL END, tab0.col1 ) FROM tab0 GROUP BY col2 query I rowsort @@ -14387,7 +14387,7 @@ SELECT 14 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0 # Datafusion - Expected - -97 # Datafusion - Expected - -97 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 97, + cor0.col1 + NULLIF ( + cor0.col0 + - cor0.col0, cor0.col0 ) ) FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -14500,7 +14500,7 @@ NULL # Datafusion - Expected - 1311 # Datafusion - Expected - 138 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + + tab1.col1 * COALESCE ( 23, tab1.col0 * 50 ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -15205,7 +15205,7 @@ SELECT - + 51 + 87 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -1633 # Datafusion - Expected - -184 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - ( 23 ), + cor0.col1 * 73, + cor0.col2 ) * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -15233,7 +15233,7 @@ SELECT ALL + 30 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1 # Datafusion - Expected - 1484 # Datafusion - Expected - 4346 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 53, + cor0.col1, col1, 72 ) * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -15246,7 +15246,7 @@ SELECT ALL - + 17 AS col1 FROM tab0 GROUP BY tab0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - -72 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( - 72, cor0.col1, - cor0.col1 + cor0.col2 * cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col0 query I rowsort @@ -15269,7 +15269,7 @@ SELECT + tab0.col2 * 52 AS col2 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 79, - cor0.col2 / col0, NULLIF ( col2, cor0.col2 ) ) / 92 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -15542,7 +15542,7 @@ SELECT - + ( + col2 ) AS col0 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 1305 # Datafusion - Expected - 870 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + tab2.col2 * COALESCE ( 15, tab2.col2 + + ( tab2.col1 ) / + tab2.col0 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -16409,7 +16409,7 @@ SELECT 21 * + 64 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 95 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 95, - cor0.col2 * 84, - 58 * col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -16488,7 +16488,7 @@ SELECT ALL + cor0.col1 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, co # Datafusion - Expected - 3186 # Datafusion - Expected - 3294 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT cor0.col1 * - COALESCE ( - 54, - cor0.col0, cor0.col0 / CASE cor0.col2 WHEN - cor0.col2 THEN 60 * - cor0.col0 ELSE NULL END ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1 query I rowsort @@ -16628,7 +16628,7 @@ SELECT 96 * - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - -2889 # Datafusion - Expected - -894 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT 16 - + tab0.col0 * COALESCE ( + 35, tab0.col2 * + col2 ) FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -16811,7 +16811,7 @@ SELECT DISTINCT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1 # Datafusion - Expected - 14 # Datafusion - Expected - 14 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - - COALESCE ( 14, + tab2.col1 ) FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -16952,7 +16952,7 @@ SELECT 10 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0 # Datafusion - Expected - -67 # Datafusion - Expected - -67 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 67, + tab1.col1, + tab1.col0, tab1.col0 ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -17320,7 +17320,7 @@ SELECT 43 AS col1 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 29 # Datafusion - Expected - 29 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 29, + cor0.col0 + 3 ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -19466,7 +19466,7 @@ SELECT DISTINCT + col2 + 14 * tab2.col2 AS col0 FROM tab2 GROUP BY col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - - COALESCE ( - 55, + tab1.col2 ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -19748,7 +19748,7 @@ SELECT - tab2.col2 * + 76 + + tab2.col2 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 2457 # Datafusion - Expected - 2457 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 91, - cor0.col2 + cor0.col1 / + cor0.col0, cor0.col2 * cor0.col0 ) * - 27 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -20291,7 +20291,7 @@ SELECT 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 5 # Datafusion - Expected - 5 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT + + COALESCE ( + 5, tab0.col2 ) FROM tab0 GROUP BY col0 query I rowsort @@ -20625,7 +20625,7 @@ SELECT DISTINCT + + 40 AS col1 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - -2 # Datafusion - Expected - -2 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( + 2, cor0.col2, cor0.col2 * cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col1 query I rowsort label-3107 @@ -21090,7 +21090,7 @@ SELECT DISTINCT - 64 + 40 AS col1 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - -72 # Datafusion - Expected - -72 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 72, col2 + 98 ) AS col1 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -24299,7 +24299,7 @@ SELECT DISTINCT - + 66 AS col0 FROM tab1 GROUP BY tab1.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 64 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 64, tab0.col0 * + tab0.col0 - NULLIF ( tab0.col1 + tab0.col1 * tab0.col0, tab0.col1 + + col1 * tab0.col2 ) ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -24684,7 +24684,7 @@ SELECT ALL - cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.co # Datafusion - Expected - 9001 # Datafusion - Expected - 9099 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 83, - cor0.col0 - cor0.col1 ) + - cor0.col0 * - 98 col2 FROM tab2 cor0 GROUP BY cor0.col0 query I rowsort @@ -25715,7 +25715,7 @@ SELECT + 81 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 92 # Datafusion - Expected - 92 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 92, cor0.col0, + NULLIF ( + 30, 58 + + cor0.col0 ) * 77 ) FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -26000,7 +26000,7 @@ SELECT - cor0.col2 * + 30 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1 # Datafusion - Expected - -27 # Datafusion - Expected - -27 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 27, col1 * 71, cor0.col0 / cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -26070,7 +26070,7 @@ SELECT ALL + cor0.col2 + 34 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor # Datafusion - Expected - 5643 # Datafusion - Expected - 594 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT tab1.col1 * COALESCE ( 99, + tab1.col2 * tab1.col1 ) FROM tab1 GROUP BY tab1.col1 query I rowsort label-3927 @@ -26487,7 +26487,7 @@ SELECT cor0.col0 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0. # Datafusion - Expected - -47 # Datafusion - Expected - -47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 47, - cor0.col1, ( cor0.col2 ) ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -27139,7 +27139,7 @@ SELECT ALL cor0.col1 * 63 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 99, tab0.col1 + tab0.col0 ) / CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -27217,7 +27217,7 @@ SELECT cor0.col2 - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 65 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 65, + tab0.col1, + col2 / - 35 ) FROM tab0 GROUP BY col2 query I rowsort @@ -27700,7 +27700,7 @@ SELECT ALL - - 39 AS col1 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 21 # Datafusion - Expected - 38 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 64, col1 ) + - tab0.col0 col1 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -28179,7 +28179,7 @@ SELECT ALL 95 + - tab2.col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 24 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 24, cor0.col0 + + cor0.col0 / + cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2 query I rowsort @@ -28695,7 +28695,7 @@ SELECT ALL 19 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2 # Datafusion - Expected - -49 # Datafusion - Expected - -49 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 49, cor0.col0 + - CAST ( NULL AS INTEGER ) / cor0.col2, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function @@ -28704,7 +28704,7 @@ SELECT + COALESCE ( - 49, cor0.col0 + - CAST ( NULL AS INTEGER ) / cor0.col2, co # Datafusion - Expected - 1652 # Datafusion - Expected - 1708 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - ( col1 ) + + cor0.col1 * COALESCE ( 29, cor0.col1 / cor0.col1, CASE + col2 WHEN + cor0.col1 + + col0 THEN - cor0.col0 + - cor0.col1 WHEN cor0.col0 - - cor0.col2 THEN + cor0.col0 / cor0.col1 + - cor0.col0 ELSE - cor0.col2 END * cor0.col2 ) FROM tab2 AS cor0 GROUP BY col1 query I rowsort @@ -29462,7 +29462,7 @@ SELECT + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NOT NULL OR # Datafusion - Expected - 35 # Datafusion - Expected - 35 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 35, - cor0.col0 - + cor0.col0 * cor0.col0, + cor0.col1 + cor0.col0 * - cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -29498,7 +29498,7 @@ SELECT ALL + cor0.col1 * 64 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1 # Datafusion - Expected - -56 # Datafusion - Expected - 21 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 36, tab2.col2 ) + - ( tab2.col0 ) AS col0 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -29841,14 +29841,14 @@ SELECT + - 41 FROM tab0 GROUP BY col0 # Datafusion - Expected - 65 # Datafusion - Expected - 65 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 65, + tab1.col1 ) FROM tab1 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: # Datafusion - Expected - 4 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 4, cor0.col2, cor0.col1 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1 query I rowsort @@ -30046,7 +30046,7 @@ NULL # Datafusion - Expected - -40 # Datafusion - Expected - 20 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + cor0.col0 + - COALESCE ( 62, col1 * - cor0.col0, + cor0.col1 * + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0, col2 query I rowsort @@ -30150,7 +30150,7 @@ SELECT ALL - - 99 AS col1 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 164 # Datafusion - Expected - 83 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL tab0.col1 + COALESCE ( 83, col1, tab0.col1 * + tab0.col2 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -30474,7 +30474,7 @@ SELECT - 32 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 63 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 63, - tab0.col2 - tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col2 query I rowsort label-4594 @@ -30815,7 +30815,7 @@ SELECT DISTINCT 46 FROM tab1 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -43 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 43, col2 * + 58, + 29 * - cor0.col2 ) FROM tab2 AS cor0 GROUP BY col0 query I rowsort label-4646 @@ -30885,7 +30885,7 @@ SELECT 80 FROM tab0 AS cor0 GROUP BY col0 # Datafusion - Expected - 89 # Datafusion - Expected - 89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 89, cor0.col2, - cor0.col1 * + cor0.col2 + - cor0.col2 * - col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function @@ -30894,7 +30894,7 @@ SELECT COALESCE ( + 89, cor0.col2, - cor0.col1 * + cor0.col2 + - cor0.col2 * - c # Datafusion - Expected - 44 # Datafusion - Expected - 44 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 44, cor0.col0 + - cor0.col0 * cor0.col0, cor0.col0 * cor0.col1 + cor0.col0, cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -31057,7 +31057,7 @@ SELECT - tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 95 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 6, cor0.col1 ) + 89 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0 query I rowsort @@ -31213,7 +31213,7 @@ SELECT + cor0.col2 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col # Datafusion - Expected - 3950 # Datafusion - Expected - 4350 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 50, tab2.col2 + tab2.col2 / + tab2.col0 ) * - tab2.col2 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -32242,7 +32242,7 @@ SELECT 78 FROM tab2 GROUP BY tab2.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 95 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col2 could not be resolved from available columns: cor1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 95, - cor1.col2, 35 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1 query I rowsort @@ -32593,7 +32593,7 @@ SELECT + 31 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - -4257 # Datafusion - Expected - -8217 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 99, tab0.col2 * tab0.col2, - tab0.col2 * col0 ) * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0 query I rowsort label-4912 @@ -33140,7 +33140,7 @@ NULL # Datafusion - Expected - 55 # Datafusion - Expected - 56 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + COALESCE ( 30, tab1.col1, + tab1.col0 * COALESCE ( tab1.col0, ( + tab1.col1 ) + - tab1.col0 ) ) / tab1.col0 + + 56 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -33878,7 +33878,7 @@ SELECT ALL 96 col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 52 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 52, + tab1.col2 ) FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -34002,7 +34002,7 @@ SELECT DISTINCT + 18 * + col1 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - 77 # Datafusion - Expected - 77 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 77, cor1.col1 * 6 ) col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col1 query I rowsort @@ -35297,7 +35297,7 @@ SELECT DISTINCT + 13 AS col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - -1 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - cor0.col0 / COALESCE ( 42, cor0.col1 + cor0.col2, CASE 55 WHEN cor0.col1 * col2 THEN NULL WHEN cor0.col2 * cor0.col0 + cor0.col1 * cor0.col1 THEN + col0 ELSE NULL END * - cor0.col1, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort label-5322 @@ -36197,7 +36197,7 @@ SELECT ALL - 4 AS col1 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - -7 # Datafusion - Expected - -9 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL tab2.col1 + COALESCE ( - 68, col0 * ( 43 * + tab2.col2 ) ) AS col0 FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -37733,7 +37733,7 @@ SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 84 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 84, + cor0.col0 * - cor0.col2 + 62 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -38147,7 +38147,7 @@ SELECT ALL + tab2.col2 * - 65 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 34 # Datafusion - Expected - 34 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 34, 75 * - col0 ) AS col0 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -38669,7 +38669,7 @@ SELECT 25 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 28, col1, cor0.col2 / + cor0.col0, cor0.col0 + + col1 * cor0.col1 ) / 17 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -39908,7 +39908,7 @@ SELECT ALL + - 30 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 84 # Datafusion - Expected - 84 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 84, - tab2.col0 ) AS col1 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -41000,7 +41000,7 @@ SELECT DISTINCT - + 17 FROM tab0 GROUP BY tab0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 38 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - - COALESCE ( + 38, - tab1.col2 ) FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -42515,7 +42515,7 @@ SELECT ALL - + 41 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 78 # Datafusion - Expected - 78 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 78, tab1.col2 ) FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -42557,7 +42557,7 @@ SELECT + + 53 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 76 # Datafusion - Expected - 76 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 76, + cor0.col0 / + cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col2, col0 query I rowsort @@ -42935,7 +42935,7 @@ SELECT ALL - 82 * col1 AS col1 FROM tab1 GROUP BY col1 # Datafusion - Expected - 57 # Datafusion - Expected - 6 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( cor0.col1, - 88, + cor0.col1, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -42971,7 +42971,7 @@ SELECT - 20 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 112 # Datafusion - Expected - 112 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 50, tab2.col1 * tab2.col0 - - tab2.col1 ) + 62 AS col0 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -43936,7 +43936,7 @@ SELECT - - col2 * tab1.col2 FROM tab1 GROUP BY col2 # Datafusion - Expected - 8645 # Datafusion - Expected - 8740 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 95, + col0 + + tab2.col2 * col2, + tab2.col1 + + tab2.col0 ) * - tab2.col0 FROM tab2 GROUP BY col0 query I rowsort @@ -44025,7 +44025,7 @@ SELECT DISTINCT + 63 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -63 # Datafusion - Expected - -63 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT - + COALESCE ( 63, tab2.col1 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -44355,7 +44355,7 @@ SELECT + 38 - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 3 # Datafusion - Expected - 3 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 89, + cor0.col2 - + cor0.col0 ) / 25 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0 query I rowsort @@ -48808,7 +48808,7 @@ SELECT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col0 # Datafusion - Expected - 82 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 82, tab2.col1 + - NULLIF ( - tab2.col0, tab2.col2 ) / tab2.col2, tab2.col2 + + 98 ) AS col1 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -48861,7 +48861,7 @@ SELECT ALL 70 + + 6 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -826 # Datafusion - Expected - -854 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - col1 * + COALESCE ( 14, - col0 / tab2.col2 ) FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -49382,7 +49382,7 @@ SELECT + tab1.col2 + - col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 64 # Datafusion - Expected - 64 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + 64, col0 ) AS col2 FROM tab2 AS cor0 GROUP BY col1 query I rowsort @@ -50440,7 +50440,7 @@ SELECT DISTINCT 91 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -19 # Datafusion - Expected - 1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL tab2.col1 - COALESCE ( 60, + tab2.col0, CASE + 87 WHEN tab2.col2 THEN - col2 END * - 64, + tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -50893,7 +50893,7 @@ SELECT DISTINCT - 77 AS col2 FROM tab1 AS cor0 GROUP BY col2 # Datafusion - Expected - -276 # Datafusion - Expected - -276 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL 3 * - COALESCE ( + 92, + cor0.col2 - + ( + col1 + - cor0.col1 ) * 58 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -51349,7 +51349,7 @@ SELECT + col0 * COALESCE ( - cor0.col1 * + col0, cor0.col1 ) FROM tab0 AS cor0 G # Datafusion - Expected - -26 # Datafusion - Expected - -26 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ( + COALESCE ( - 26, tab2.col0 - ( 73 ) ) ) AS col1 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -51460,7 +51460,7 @@ SELECT - 37 AS col0 FROM tab2 cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 55, col1, cor0.col1 + cor0.col2 * cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort label-7762 @@ -51732,7 +51732,7 @@ SELECT + cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -4187 # Datafusion - Expected - -4611 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - + tab2.col2 * - COALESCE ( - 53, tab2.col1 / - tab2.col1 + - tab2.col0 / tab2.col1, - tab2.col0 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -51905,7 +51905,7 @@ SELECT + tab2.col2 * 57 FROM tab2 GROUP BY tab2.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 87, cor0.col0 * + COALESCE ( cor0.col0 * cor0.col2, col1 * - cor0.col2, 91 * - cor0.col1 ), cor0.col1 * cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1 query I rowsort label-7829 @@ -52245,7 +52245,7 @@ SELECT DISTINCT - 77 FROM tab1 AS cor0 GROUP BY col1 # Datafusion - Expected - 6999 # Datafusion - Expected - 762 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 30, + cor0.col2 * - CASE - cor0.col0 WHEN cor0.col0 THEN + cor0.col0 END, + ( + cor0.col1 ) * - cor0.col1 - col0 ) + + 99 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2 query I rowsort @@ -52453,7 +52453,7 @@ NULL # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL CASE + 19 WHEN 5 THEN - tab2.col0 * - tab2.col2 ELSE NULL END AS col0 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -55871,7 +55871,7 @@ SELECT ALL 35 * + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 1428 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 51, + cor0.col2 ) * 28 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -56156,7 +56156,7 @@ SELECT - 21 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 7426 # Datafusion - Expected - 8178 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT - - COALESCE ( + 94, tab2.col0, - col2 ) * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 query I rowsort label-8471 @@ -57231,7 +57231,7 @@ SELECT ALL + 11 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - 6097 # Datafusion - Expected - 6164 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 67, tab2.col2 - + tab2.col2 ) * tab2.col0 col1 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -57497,7 +57497,7 @@ SELECT ALL + tab0.col1 * 16 + + 32 AS col2 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 71 # Datafusion - Expected - 71 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 71, - col2 ) FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -59347,7 +59347,7 @@ SELECT DISTINCT - COALESCE ( 87, + 84 + - tab2.col2 ) FROM tab2 GROUP BY tab2.co # Datafusion - Expected - -1 # Datafusion - Expected - -10 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 84, + tab1.col0 * - tab1.col0 - tab1.col1 * tab1.col1 ) / - col2 AS col0 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -59814,7 +59814,7 @@ SELECT DISTINCT + col2 FROM tab1 GROUP BY col2 # Datafusion - Expected - 25 # Datafusion - Expected - 25 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 69, cor0.col2, cor0.col0, + cor0.col1 ) + 94 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0 query I rowsort @@ -60786,7 +60786,7 @@ SELECT ALL 56 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0 # Datafusion - Expected - -9 # Datafusion - Expected - -9 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 9, - tab1.col0 / + tab1.col0 ) FROM tab1 GROUP BY col2 query I rowsort @@ -61588,7 +61588,7 @@ SELECT DISTINCT COALESCE ( 13, col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 51 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 51, col0 - col1 ) AS col2 FROM tab2 GROUP BY col1 query I rowsort @@ -61769,7 +61769,7 @@ SELECT ALL + + 39 AS col1 FROM tab2 GROUP BY tab2.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 47, - tab1.col1 * tab1.col2 + tab1.col2 ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -63379,7 +63379,7 @@ SELECT DISTINCT - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col1 # Datafusion - Expected - 15 # Datafusion - Expected - 15 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 15, - cor0.col2 + + cor0.col0 * cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -63849,7 +63849,7 @@ SELECT - tab2.col2 * - col2 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - -81 # Datafusion - Expected - -81 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 81, - tab2.col1 * + tab2.col2, - col0 / tab2.col2 ) FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -64933,7 +64933,7 @@ SELECT DISTINCT - + tab0.col2 / 80 AS col1 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - -25 # Datafusion - Expected - -25 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( - 25, + cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -65190,7 +65190,7 @@ SELECT ALL - + 66 FROM tab2 GROUP BY col1 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - + COALESCE ( 28, 90 + tab2.col1 / tab2.col1 ) / tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -66103,7 +66103,7 @@ SELECT 84 * - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT + 99 * + NULLIF ( tab0.col2 + CAST ( NULL AS INTEGER ), - COALESCE ( + 57, tab0.col1 + 50, 15 - tab0.col0 ) ) col2 FROM tab0 GROUP BY tab0.col2 query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_4.slt b/data/sqlite/random/groupby/slt_good_4.slt index 99fa278..1d13ff2 100644 --- a/data/sqlite/random/groupby/slt_good_4.slt +++ b/data/sqlite/random/groupby/slt_good_4.slt @@ -554,7 +554,7 @@ SELECT - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 77 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + + COALESCE ( + 77, + tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -1020,7 +1020,7 @@ SELECT + tab0.col1 * - 67 FROM tab0 GROUP BY col1 # Datafusion - Expected - 228 # Datafusion - Expected - 230 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT tab2.col1 + COALESCE ( 82 + 87, - tab2.col2 * - tab2.col2, 74, + tab2.col2 + + tab2.col0 * tab2.col2 ) AS col1 FROM tab2 GROUP BY col1 query I rowsort @@ -1827,7 +1827,7 @@ SELECT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1 # Datafusion - Expected - 95 # Datafusion - Expected - 95 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT - - COALESCE ( + 40, tab1.col2 * + tab1.col1 ) + - CASE 38 WHEN tab1.col0 THEN NULL ELSE - 55 END FROM tab1 GROUP BY col0 query I rowsort @@ -2076,7 +2076,7 @@ SELECT DISTINCT cor0.col2 + - 81 FROM tab0 cor0 GROUP BY cor0.col2 # Datafusion - Expected - 55 # Datafusion - Expected - 55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 55, + cor0.col2 + COALESCE ( - cor0.col0, cor0.col2 ) ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -3152,7 +3152,7 @@ SELECT - cor0.col2 * 0 AS col1 FROM tab1 cor0 GROUP BY cor0.col2 # Datafusion - Expected - 64 # Datafusion - Expected - 9 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT - tab0.col2 + COALESCE ( 88, - tab0.col1, tab0.col0 * + 13, + tab0.col2 ) AS col0 FROM tab0 GROUP BY col2 query I rowsort @@ -3639,7 +3639,7 @@ SELECT ALL col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 11 # Datafusion - Expected - 11 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 11, cor0.col0 * 83, cor0.col1 + cor0.col0 ) FROM tab0 AS cor0 GROUP BY col2 query I rowsort @@ -3908,7 +3908,7 @@ SELECT DISTINCT 15 - 32 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 92 # Datafusion - Expected - 92 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 92, cor0.col2, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -8721,7 +8721,7 @@ SELECT ALL + tab1.col1 / tab1.col1 + 19 FROM tab1 GROUP BY tab1.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + + COALESCE ( + 8, tab0.col0, COALESCE ( tab0.col0, tab0.col1, - tab0.col2 * tab0.col2 ) * - tab0.col1 + tab0.col2, 34 ) / 29 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -8977,7 +8977,7 @@ SELECT DISTINCT 36 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 0 # Datafusion - Expected - 81 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( tab0.col1, 80, - tab0.col0 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -10060,7 +10060,7 @@ SELECT ALL - 30 col2 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - -89 # Datafusion - Expected - -89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - NULLIF ( + COALESCE ( + 89, + tab1.col0, - tab1.col1 ), 76 ) FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -11117,7 +11117,7 @@ SELECT ALL ( - cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -89 # Datafusion - Expected - -89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 89, - col2 * col1 - ( - col1 ) ) AS col1 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -11516,7 +11516,7 @@ SELECT ALL - 97 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 4 # Datafusion - Expected - 4 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 4, - cor0.col0, cor1.col0 / + cor1.col2 - cor0.col1 / cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1 query I rowsort @@ -11811,7 +11811,7 @@ SELECT ALL tab1.col2 / col2 AS col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT CASE + tab2.col1 WHEN + CAST ( NULL AS INTEGER ) THEN - COALESCE ( + 5, tab2.col0 ) END FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -12615,7 +12615,7 @@ SELECT 40 + 55 AS col2 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 36 # Datafusion - Expected - 36 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 36, cor0.col1 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -12796,7 +12796,7 @@ SELECT DISTINCT cor0.col2 + - col2 FROM tab2 cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -94 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 94, tab1.col0 / - tab1.col0 ) FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -13097,7 +13097,7 @@ SELECT - 18 * cor0.col1 FROM tab1 AS cor0 GROUP BY col1 # Datafusion - Expected - 48 # Datafusion - Expected - 76 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT + tab0.col2 + - COALESCE ( 1, + tab0.col0 * - tab0.col1, col2 * tab0.col0 + + tab0.col0 / tab0.col1 ) * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -13292,7 +13292,7 @@ SELECT DISTINCT + 89 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, c # Datafusion - Expected - 36 # Datafusion - Expected - 7 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT - tab2.col2 + COALESCE ( + 94, - tab2.col0 - tab2.col2, + tab2.col1, - col2 ) AS col1 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -13379,7 +13379,7 @@ SELECT - - 20 AS col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 62 # Datafusion - Expected - 62 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 62, tab1.col1 * + tab1.col1 ) AS col0 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -13887,7 +13887,7 @@ SELECT DISTINCT + tab1.col0 * 28 AS col2 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 143 # Datafusion - Expected - 66 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col0 + COALESCE ( 51, tab2.col2 * tab2.col1, - 35 * - tab2.col0 + tab2.col1 ) FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -14008,7 +14008,7 @@ SELECT DISTINCT - 98 col1 FROM tab2 GROUP BY col1 # Datafusion - Expected - 27 # Datafusion - Expected - 27 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - - COALESCE ( 27, tab0.col0 ) AS col2 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -14374,7 +14374,7 @@ SELECT 93 / + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0 # Datafusion - Expected - -1792 # Datafusion - Expected - -5248 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col0 + cor0.col0 * COALESCE ( - 65, cor0.col1 * + ( - cor0.col1 * cor0.col2 ) + cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col0 query I rowsort @@ -15641,7 +15641,7 @@ SELECT ALL 74 * + cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0 HAVING NOT col2 BETWEEN ( NULL ) AND NULL query I rowsort @@ -16113,7 +16113,7 @@ SELECT DISTINCT 23 + cor0.col0 / 27 col2 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 141 # Datafusion - Expected - 181 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 98, - col2, - cor0.col0 ) + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0 query I rowsort @@ -16154,7 +16154,7 @@ SELECT DISTINCT 60 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0 # Datafusion - Expected - 28 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT ( COALESCE ( 14, col0 / + cor0.col2 ) ) / cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -16505,7 +16505,7 @@ SELECT - 4 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -3483 # Datafusion - Expected - -6723 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + + COALESCE ( - 81, tab0.col1 ) * tab0.col0 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -16714,7 +16714,7 @@ NULL # Datafusion - Expected - -18 # Datafusion - Expected - -18 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 18, cor0.col1 * + cor0.col0, - cor0.col1 * cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -17763,7 +17763,7 @@ SELECT cor0.col1 * 32 + - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, c # Datafusion - Expected - 7663 # Datafusion - Expected - 8439 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 97, + tab2.col0 * - tab2.col1 + + tab2.col0 ) * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -17842,7 +17842,7 @@ SELECT ALL - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0 # Datafusion - Expected - -7048 # Datafusion - Expected - -808 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0 * - tab1.col0 + + COALESCE ( 12, col2 * + tab1.col0 ) * - 27 AS col1 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -18661,7 +18661,7 @@ SELECT ALL 25 / cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 2911 # Datafusion - Expected - 332 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 37, cor0.col0 / 63 + + cor0.col0 ) / col2 + cor0.col2 * 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -18696,7 +18696,7 @@ SELECT DISTINCT 4 col2 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - -22 # Datafusion - Expected - -22 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 22, tab0.col1 ) FROM tab0 GROUP BY col0 query I rowsort @@ -18862,7 +18862,7 @@ SELECT ALL + cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 14 # Datafusion - Expected - 14 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 14, tab2.col2 * + tab2.col0, - 45 ) FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -19063,7 +19063,7 @@ SELECT - cor0.col2 * + cor0.col2 - - ( + cor0.col2 ) AS col1 FROM tab1 cor0 GROU # Datafusion - Expected - 55 # Datafusion - Expected - 55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 55, - cor0.col2 ) col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function @@ -19072,7 +19072,7 @@ SELECT ALL + COALESCE ( 55, - cor0.col2 ) col2 FROM tab0 AS cor0 CROSS JOIN tab1 # Datafusion - Expected - -71 # Datafusion - Expected - -71 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 71, tab2.col0 ) FROM tab2 GROUP BY tab2.col1 # Datafusion - Types were automatically converted from: @@ -19101,7 +19101,7 @@ SELECT - ( 37 ) / cor0.col0 - 66 * 58 AS col0 FROM tab1 AS cor0 GROUP BY cor0.co # Datafusion - Expected - -2632 # Datafusion - Expected - -7708 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + + tab1.col0 * + COALESCE ( - 94, tab1.col1 * + tab1.col2 ) col1 FROM tab1 GROUP BY tab1.col0 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function @@ -19109,7 +19109,7 @@ SELECT + + tab1.col0 * + COALESCE ( - 94, tab1.col1 * + tab1.col2 ) col1 FROM ta # Datafusion - Expected - -50 # Datafusion - Expected - 31 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 + + COALESCE ( 31, tab0.col0, tab0.col0 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -19153,7 +19153,7 @@ SELECT - + 22 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 59 # Datafusion - Expected - 59 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 59, tab2.col2 / + tab2.col1 ) FROM tab2 GROUP BY col0 query I rowsort @@ -19323,7 +19323,7 @@ SELECT ALL 98 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -6615 # Datafusion - Expected - -7287 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 84, cor0.col2, 78 / cor0.col0 + + col0 ) * + cor0.col2 + 21 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -19578,7 +19578,7 @@ SELECT cor0.col1 + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -69 # Datafusion - Expected - -69 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 69, - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -19599,7 +19599,7 @@ SELECT ALL ( - cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 58 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 58, cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -20637,7 +20637,7 @@ SELECT + 59 * 28 AS col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - -81 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( tab0.col1, - 16, + col0 ) FROM tab0 GROUP BY tab0.col1 query I rowsort label-3131 @@ -20797,7 +20797,7 @@ SELECT DISTINCT 84 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY co # Datafusion - Expected - 3116 # Datafusion - Expected - 836 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT cor0.col0 * - COALESCE ( - 38, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0 query I rowsort @@ -20863,7 +20863,7 @@ SELECT DISTINCT - 98 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 24 # Datafusion - Expected - 24 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 24, - tab2.col1, + tab2.col0 * 28 + + tab2.col1 * tab2.col0 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -21315,7 +21315,7 @@ SELECT ALL 54 - + tab2.col1 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT CASE - cor0.col0 WHEN CAST ( NULL AS INTEGER ) THEN + cor0.col2 / - cor0.col1 END col2 FROM tab1 AS cor0 GROUP BY col1 query I rowsort @@ -21416,7 +21416,7 @@ SELECT + 6 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - -6 # Datafusion - Expected - 7 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT cor0.col1 + COALESCE ( - 50, cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY col1 query I rowsort @@ -21649,7 +21649,7 @@ SELECT tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 1849 # Datafusion - Expected - 3569 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT + - COALESCE ( + 43, tab0.col1 ) * - tab0.col0 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -21888,7 +21888,7 @@ SELECT DISTINCT - 68 - + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -26 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( - 26, - cor0.col2 * cor0.col0, + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -22746,7 +22746,7 @@ SELECT DISTINCT 75 AS col2 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 93 # Datafusion - Expected - 93 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 93, - cor0.col2, cor0.col0 * + 12 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -23316,7 +23316,7 @@ SELECT ALL - col1 + col1 AS col0 FROM tab1 GROUP BY tab1.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 120 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 83, col1 + - tab0.col2 ) + 37 AS col0 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -23711,7 +23711,7 @@ SELECT DISTINCT - cor0.col2 / cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col # Datafusion - Expected - -48 # Datafusion - Expected - -48 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + + COALESCE ( - 48, - tab1.col0 * 90 + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -24246,7 +24246,7 @@ SELECT DISTINCT + tab1.col2 * col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - -68 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 68, + cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2 query I rowsort @@ -25467,7 +25467,7 @@ SELECT ALL + + 26 AS col2 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 56 # Datafusion - Expected - 56 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 56, + tab0.col1 * - tab0.col0 ) AS col0 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -26652,7 +26652,7 @@ SELECT ALL - 95 FROM tab2 AS cor0 GROUP BY cor0.col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) > - col2 query I rowsort @@ -27136,7 +27136,7 @@ SELECT + 29 + - 36 AS col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - -92 # Datafusion - Expected - -92 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 92, cor0.col2, + 19 * cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -27221,7 +27221,7 @@ SELECT DISTINCT - 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -19 # Datafusion - Expected - -19 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 19, + cor0.col0 - col2, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -29002,7 +29002,7 @@ SELECT + 40 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 0, cor0.col1 - ( + 72 ) ) FROM tab0 cor0 GROUP BY cor0.col2 query I rowsort @@ -29207,7 +29207,7 @@ NULL # Datafusion - Expected - -89 # Datafusion - Expected - -89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + ( - COALESCE ( 89, cor0.col1, - 97 ) ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2 query I rowsort @@ -29235,7 +29235,7 @@ SELECT ALL - 35 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -43 # Datafusion - Expected - -43 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( + 43, - cor0.col1 + + cor0.col2, + cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col0, col0 query I rowsort @@ -29565,7 +29565,7 @@ SELECT - tab1.col0 AS col2 FROM tab1 WHERE + tab1.col0 IN ( - tab1.col0 - tab1.c # Datafusion - Expected - 78 # Datafusion - Expected - 78 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 78, + col1, tab1.col0 + NULLIF ( + tab1.col2 + + tab1.col2, + tab1.col0 ) ) AS col1 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -29604,7 +29604,7 @@ SELECT DISTINCT cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.co # Datafusion - Expected - 50 # Datafusion - Expected - 50 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 50, - tab0.col0 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -29880,7 +29880,7 @@ SELECT 38 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0 # Datafusion - Expected - 96 # Datafusion - Expected - 96 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 96, + cor0.col1 * 72 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -30649,7 +30649,7 @@ SELECT ALL 46 * - 51 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -50 # Datafusion - Expected - -50 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 50, cor0.col0, - cor0.col2 * + ( cor0.col0 * cor0.col1 ) + - 86 ) FROM tab2 AS cor0 GROUP BY cor0.col1, col2 query I rowsort @@ -31711,7 +31711,7 @@ SELECT 66 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( + 13, - tab0.col1 + + ( col2 + - tab0.col1 ) ) - - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -31899,7 +31899,7 @@ SELECT DISTINCT 62 AS col0 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - 1486 # Datafusion - Expected - 211 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( - 25, - tab1.col2 ) * tab1.col1 + 61 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -32666,7 +32666,7 @@ SELECT + + 76 FROM tab2 GROUP BY col0 # Datafusion - Expected - 1710 # Datafusion - Expected - 3555 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 45, cor0.col1, - cor0.col2 * CASE cor0.col2 WHEN - cor0.col2 + + cor0.col2 THEN cor0.col0 WHEN cor0.col0 + + cor0.col1 THEN cor0.col2 + + cor0.col2 END ) * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2 query I rowsort @@ -32912,7 +32912,7 @@ SELECT ALL + + tab0.col0 * - tab0.col0 AS col1 FROM tab0 GROUP BY col0 # Datafusion - Expected - 20 # Datafusion - Expected - 20 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 20, cor0.col2, + ( - COALESCE ( cor0.col1, + cor0.col1, + cor0.col0 ) ) + + 56, + cor0.col0 + col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -32976,7 +32976,7 @@ SELECT DISTINCT 91 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + CASE 74 WHEN cor0.col0 THEN NULL WHEN - CAST ( NULL AS FLOAT8 ) * + COALESCE ( 45, + cor0.col2 / - col2 + cor0.col1 ) THEN col0 END FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort label-5017 @@ -33242,7 +33242,7 @@ SELECT DISTINCT cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -67 # Datafusion - Expected - -67 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 67, - cor0.col2 * - cor0.col0 ) FROM tab2 cor0 GROUP BY col0 query I rowsort @@ -34797,7 +34797,7 @@ SELECT DISTINCT col2 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, # Datafusion - Expected - 46 # Datafusion - Expected - 46 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 46, - tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -36466,7 +36466,7 @@ NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - 88 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 88, + tab0.col2 / - tab0.col1 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -36832,7 +36832,7 @@ SELECT ALL + cor0.col0 * cor0.col0 AS col0 FROM tab0 cor0 GROUP BY col0, cor0.co # Datafusion - Expected - -79 # Datafusion - Expected - -79 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 79, - tab0.col1, + 8 ) col2 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -37318,7 +37318,7 @@ SELECT DISTINCT + 72 + + col2 FROM tab2 GROUP BY col2 # Datafusion - Expected - 43 # Datafusion - Expected - 43 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + + COALESCE ( 43, tab1.col2 / tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -37464,7 +37464,7 @@ SELECT ALL + 22 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 136 # Datafusion - Expected - 73 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL cor0.col2 + COALESCE ( 65, cor0.col1, + 36 + cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -37868,7 +37868,7 @@ SELECT + 88 * - 0 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 82 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 82, - col1 ) FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -38374,7 +38374,7 @@ SELECT DISTINCT - 52 * 3 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 59 # Datafusion - Expected - 59 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 59, + cor0.col2, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -38914,7 +38914,7 @@ SELECT + 44 AS col2 FROM tab2 GROUP BY tab2.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 26 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 26, cor0.col0 * cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -39198,7 +39198,7 @@ SELECT ALL tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - -47 # Datafusion - Expected - -47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT - + COALESCE ( + 47, - tab1.col0 / 28 ) AS col0 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -39471,7 +39471,7 @@ SELECT - NULLIF ( 41, col2 ) FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 96 # Datafusion - Expected - 96 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 96, cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -40030,7 +40030,7 @@ SELECT ALL + CAST ( tab1.col1 AS INTEGER ) FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 73 # Datafusion - Expected - 73 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( - 73, tab2.col2 ) FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -40125,7 +40125,7 @@ SELECT DISTINCT ( + 53 ) FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 8 # Datafusion - Expected - 8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 8, tab1.col1 ) FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -40770,7 +40770,7 @@ SELECT + - 75 AS col1 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 56 # Datafusion - Expected - 56 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 56, - tab2.col2, tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col2 query I rowsort label-6198 @@ -41527,7 +41527,7 @@ NULL # Datafusion - Expected - 82 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 82, tab0.col2, - tab0.col2 ) AS col1 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -41952,7 +41952,7 @@ NULL # Datafusion - Expected - 17 # Datafusion - Expected - 17 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 17, col2 ) col2 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -43145,7 +43145,7 @@ SELECT - tab2.col2 + - 0 AS col1 FROM tab2 GROUP BY col2 # Datafusion - Expected - -43 # Datafusion - Expected - -43 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 43, tab0.col0 * + tab0.col0 + ( + tab0.col1 ) * tab0.col1, CASE tab0.col0 WHEN tab0.col0 THEN tab0.col0 * + tab0.col2 WHEN tab0.col0 * tab0.col1 THEN NULL WHEN + col1 + col1 THEN - tab0.col0 / - tab0.col1 + + tab0.col1 ELSE col1 END ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -44191,7 +44191,7 @@ SELECT ALL + 92 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - -70 # Datafusion - Expected - -70 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 70, tab1.col2 * + tab1.col0 + tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -44574,7 +44574,7 @@ SELECT + 23 AS col0 FROM tab2 GROUP BY tab2.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - CASE + 23 WHEN 54 THEN col2 + cor0.col2 * col1 END AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -45727,7 +45727,7 @@ SELECT ALL ( + 62 ) col1 FROM tab0 cor0 GROUP BY col0 # Datafusion - Expected - 76 # Datafusion - Expected - 76 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 76, - cor0.col0 + cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col1 query I rowsort label-6947 @@ -45986,7 +45986,7 @@ SELECT ( 43 ) + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - -76 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 76, + cor0.col1 * + cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -46120,7 +46120,7 @@ SELECT ALL + 55 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - -7 # Datafusion - Expected - -7 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 7, tab0.col0, tab0.col0 + + col0 ) col1 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -46257,7 +46257,7 @@ SELECT ALL - 21 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - -81 # Datafusion - Expected - -81 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( - ( 81 ), + tab1.col0 ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -47394,7 +47394,7 @@ NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - 56 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 56, + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort label-7197 @@ -47780,7 +47780,7 @@ SELECT DISTINCT 71 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 8 # Datafusion - Expected - 8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 59, - cor0.col0 * ( cor0.col1 ) + + cor0.col2, + ( - 40 ) / + 43, cor0.col2 * + cor0.col2 ) / 7 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0 query I rowsort @@ -48463,7 +48463,7 @@ SELECT DISTINCT 88 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor # Datafusion - Datafusion expected results: # Datafusion - Expected - -66 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 66, + tab0.col0 / COALESCE ( tab0.col1 * tab0.col1, + tab0.col2 - + tab0.col1 ), + 29 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -49445,7 +49445,7 @@ SELECT ALL + ( - 81 ) FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 9 # Datafusion - Expected - 9 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + + COALESCE ( 9, tab1.col1 * tab1.col0 ) FROM tab1 GROUP BY tab1.col0 query I rowsort label-7509 @@ -49712,7 +49712,7 @@ SELECT DISTINCT + + 46 AS col2 FROM tab2 GROUP BY col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 10 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 10, cor0.col1 + - cor0.col0 * col1, + cor0.col0 * - cor0.col0 + cor0.col1 * + cor0.col2, + cor0.col2 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -49734,7 +49734,7 @@ SELECT + + tab1.col1 + 92 col2 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - -74 # Datafusion - Expected - -74 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( - 74, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -49979,7 +49979,7 @@ SELECT DISTINCT + - 45 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 28 # Datafusion - Expected - 28 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - - COALESCE ( 28, tab0.col0, - CASE 4 WHEN tab0.col0 + - tab0.col0 * + tab0.col1 THEN + col1 END * + tab0.col1 ) FROM tab0 GROUP BY col2 query I rowsort @@ -50067,7 +50067,7 @@ SELECT DISTINCT - + 5 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - -13 # Datafusion - Expected - -94 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - tab0.col1 + - COALESCE ( 13, tab0.col1 * tab0.col0 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -50455,7 +50455,7 @@ SELECT - tab0.col1 + - 38 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -12 # Datafusion - Expected - -12 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 12, tab1.col1 * tab1.col2 ) AS col0 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -51289,7 +51289,7 @@ SELECT DISTINCT cor0.col0 / 68 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, # Datafusion - Datafusion expected results: # Datafusion - Expected - 8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 8, tab2.col0 + - CAST ( NULL AS INTEGER ) ) FROM tab2 GROUP BY col2 query I rowsort @@ -51988,7 +51988,7 @@ SELECT DISTINCT + tab2.col0 / tab2.col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - -54 # Datafusion - Expected - 6 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT - + COALESCE ( + 76, tab1.col2 * - CASE + tab1.col0 WHEN - tab1.col2 + ( + 36 ) THEN + tab1.col0 WHEN + tab1.col0 * - 45 THEN tab1.col0 ELSE NULL END - tab1.col2 ) + + tab1.col0 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -52211,7 +52211,7 @@ SELECT DISTINCT - - 89 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 10 # Datafusion - Expected - 10 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 10, 43 * - tab2.col0 + col0, tab2.col1 ) AS col2 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -52296,7 +52296,7 @@ SELECT + cor0.col0 + - 73 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 384 # Datafusion - Expected - 608 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 16, col2 / ( tab0.col1 * tab0.col2 ) ) * + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -52683,7 +52683,7 @@ SELECT 83 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -30 # Datafusion - Expected - -30 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 30, - tab1.col1, 66 ) AS col1 FROM tab1 GROUP BY col0 query I rowsort @@ -52965,7 +52965,7 @@ SELECT 79 + 97 FROM tab0 GROUP BY tab0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + tab0.col2 / COALESCE ( tab0.col2 * + tab0.col2, + 10, - tab0.col1, tab0.col2 * - 99 ) AS col0 FROM tab0 GROUP BY tab0.col2 query I rowsort label-8042 @@ -53404,7 +53404,7 @@ SELECT DISTINCT tab0.col2 * - tab0.col2 - 87 FROM tab0 GROUP BY tab0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - - CASE + tab1.col0 WHEN CAST ( NULL AS INTEGER ) THEN + tab1.col1 END FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -53886,7 +53886,7 @@ SELECT - + tab1.col1 * 15 - 46 AS col0 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - -94 # Datafusion - Expected - -94 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 94, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -54463,7 +54463,7 @@ SELECT DISTINCT 50 FROM tab0 GROUP BY col2 # Datafusion - Expected - 63 # Datafusion - Expected - 63 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 63, cor1.col2 ) AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col0, cor0.col2 query I rowsort @@ -54648,7 +54648,7 @@ SELECT ALL + - tab0.col0 * tab0.col0 AS col1 FROM tab0 GROUP BY col0 # Datafusion - Expected - 21 # Datafusion - Expected - 21 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 21, tab1.col2 + col2, - tab1.col0 * tab1.col1 ) FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -54800,7 +54800,7 @@ SELECT ALL - - tab1.col2 / 83 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 8 # Datafusion - Expected - 8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 8, cor0.col1 * - cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -55596,7 +55596,7 @@ SELECT ( + cor0.col1 ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP B # Datafusion - Expected - 15 # Datafusion - Expected - 15 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 15, + col0 / cor0.col0, + cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col2 query I rowsort @@ -55824,7 +55824,7 @@ SELECT DISTINCT - 29 AS col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - 1917 # Datafusion - Expected - 216 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT + + COALESCE ( 27, tab1.col1 ) * tab1.col2 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -55911,7 +55911,7 @@ SELECT ALL + 68 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 2205 # Datafusion - Expected - 2205 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 63, cor0.col2 + + cor0.col2 ) * - 35 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -56174,7 +56174,7 @@ SELECT DISTINCT cor0.col1 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.co # Datafusion - Expected - -17 # Datafusion - Expected - -17 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 17, + col2 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col1 query I rowsort @@ -56295,7 +56295,7 @@ SELECT ALL - 63 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 79 # Datafusion - Expected - 87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( col2, tab2.col2 + COALESCE ( + 68, + col2 * ( + tab2.col1 * tab2.col1 ) ) * col2 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -56572,7 +56572,7 @@ SELECT DISTINCT - 39 / + 68 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2 # Datafusion - Expected - -86 # Datafusion - Expected - -86 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 86, tab0.col1, COALESCE ( 3, + tab0.col0 ) - tab0.col0 * + COALESCE ( tab0.col0, tab0.col0 + tab0.col0 ) ) FROM tab0 GROUP BY col1 query I rowsort @@ -56669,7 +56669,7 @@ SELECT ALL - 84 + tab2.col2 * - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 82, - tab0.col2, tab0.col0 ) AS col2 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -57154,7 +57154,7 @@ SELECT 76 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0 # Datafusion - Expected - -70 # Datafusion - Expected - -70 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 70, tab2.col2, - tab2.col0 ) FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -57909,7 +57909,7 @@ SELECT DISTINCT - tab1.col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - -10 # Datafusion - Expected - 71 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL cor0.col1 + - COALESCE ( + 10, cor0.col2 + - 61 / - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -58619,7 +58619,7 @@ SELECT + - 83 + - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 89, tab2.col0, + tab2.col0 + + CASE - tab2.col2 WHEN + 71 THEN 31 ELSE + tab2.col0 + - tab2.col2 * COALESCE ( tab2.col0, tab2.col1 ) END ) AS col1 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -59500,7 +59500,7 @@ SELECT + 29 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -31 # Datafusion - Expected - -31 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 31, tab0.col1, 39 * + col1 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -59804,7 +59804,7 @@ SELECT ALL - ( - 73 ) + - 94 FROM tab1, tab2 cor0 GROUP BY tab1.col1 # Datafusion - Expected - 7347 # Datafusion - Expected - 8091 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 93, tab2.col0 ) * - tab2.col2 FROM tab2 GROUP BY col2 query I rowsort @@ -59871,7 +59871,7 @@ SELECT ALL CAST ( - 99 AS INTEGER ) + + tab1.col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - -39 # Datafusion - Expected - -65 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + 45 / COALESCE ( 7, + cor0.col1, ( 65 ) ) - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -60260,7 +60260,7 @@ NULL # Datafusion - Expected - 31 # Datafusion - Expected - 31 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 31, cor0.col2 / + cor0.col2, - col1 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1 query I rowsort @@ -61813,7 +61813,7 @@ SELECT ALL + - tab1.col2 + - 1 AS col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - -99 # Datafusion - Expected - -99 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 99, - tab0.col2 + + tab0.col1 ) FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -65065,7 +65065,7 @@ SELECT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( + c # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL IN ( + col0 ) query I rowsort @@ -65672,7 +65672,7 @@ SELECT DISTINCT + tab2.col1 + ( tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 40 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 40, - cor0.col1 + - cor0.col0 * + cor0.col0, - cor0.col1 + + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_5.slt b/data/sqlite/random/groupby/slt_good_5.slt index 24886ff..4bba21a 100644 --- a/data/sqlite/random/groupby/slt_good_5.slt +++ b/data/sqlite/random/groupby/slt_good_5.slt @@ -323,7 +323,7 @@ SELECT 27 + 91 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 79 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 79, - tab1.col1 * tab1.col1, tab1.col1 * tab1.col2 ) col0 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -497,7 +497,7 @@ SELECT + tab2.col1 * tab2.col1 + - tab2.col1 FROM tab2 GROUP BY col1 HAVING NOT # Datafusion - Expected - 6 # Datafusion - Expected - 87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 + + COALESCE ( 6, cor0.col0 ) FROM tab0 AS cor0 GROUP BY col1, cor0.col1 query I rowsort @@ -822,7 +822,7 @@ SELECT DISTINCT - tab2.col1 / - ( + 73 ) AS col0 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - 71 # Datafusion - Expected - 8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( tab1.col2, 3, tab1.col1 ) FROM tab1 GROUP BY col2 query I rowsort @@ -2315,7 +2315,7 @@ SELECT 97 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col2 # Datafusion - Expected - 0 # Datafusion - Expected - 1863 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT tab0.col1 * + COALESCE ( 23, + 14, col2 * - tab0.col0 ) FROM tab0 GROUP BY tab0.col1 query I rowsort label-346 @@ -3374,7 +3374,7 @@ SELECT DISTINCT cor1.col2 + - cor1.col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 G # Datafusion - Expected - 0 # Datafusion - Expected - 1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - cor0.col0 / - COALESCE ( + 78, + cor0.col2 * + cor0.col1 + NULLIF ( 73, cor0.col0 ), col1 + + CASE + cor0.col2 WHEN - cor0.col2 THEN col0 WHEN cor0.col1 THEN cor0.col2 ELSE 86 END ) FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort label-508 @@ -4366,7 +4366,7 @@ SELECT - cor0.col2 * - col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1 # Datafusion - Expected - 5976 # Datafusion - Expected - 5976 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 72, + tab0.col1 * tab0.col2 ) * + 83 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -5817,7 +5817,7 @@ SELECT - + col2 AS col2 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - -27 # Datafusion - Expected - -27 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT - - COALESCE ( - 51, - tab1.col2, + tab1.col1 ) + 24 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -6460,7 +6460,7 @@ SELECT ALL + 52 * - col1 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 62 # Datafusion - Expected - 62 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 62, tab0.col2 + col0, col2 ) col2 FROM tab0 GROUP BY col0 query I rowsort @@ -6803,7 +6803,7 @@ SELECT col0 + 2 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 0, cor0.col1 + col1 * cor0.col2, - 59 * cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -7020,7 +7020,7 @@ SELECT + 32 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 3864 # Datafusion - Expected - 630 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + cor0.col0 * COALESCE ( 43, - cor0.col1 * cor0.col1 - cor0.col2 ) + - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2 query I rowsort @@ -7239,7 +7239,7 @@ SELECT DISTINCT - col0 AS col2 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - -32 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 32, + cor0.col1, - tab0.col1 + cor0.col0 ) AS col0 FROM tab0, tab2 cor0 GROUP BY cor0.col1 query I rowsort @@ -8011,7 +8011,7 @@ SELECT DISTINCT + 27 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 1311 # Datafusion - Expected - 138 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT cor0.col1 * + COALESCE ( + 23, + col1 * col0, + cor0.col1 + + cor0.col2 * cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -8238,7 +8238,7 @@ SELECT ALL + cor0.col2 * col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -46 # Datafusion - Expected - -46 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 46, tab2.col1 * - tab2.col2 - + CASE - tab2.col2 WHEN tab2.col0 THEN NULL WHEN tab2.col0 + + 85 THEN NULL ELSE + tab2.col0 * tab2.col0 END, + col2 * tab2.col0, - tab2.col1 + tab2.col1, tab2.col1 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -8576,7 +8576,7 @@ SELECT ALL + cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP B # Datafusion - Expected - 146 # Datafusion - Expected - 154 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + cor0.col2 + - COALESCE ( - 67, + cor0.col0, CASE 97 WHEN + cor0.col2 + cor0.col2 THEN NULL WHEN 21 * + 56 THEN - cor0.col0 / cor0.col0 END, - cor0.col1, - col2 + + cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -8667,7 +8667,7 @@ SELECT ALL + 19 FROM tab2 cor0 GROUP BY cor0.col1 # Datafusion - Expected - 55 # Datafusion - Expected - 55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL ( COALESCE ( + 55, - cor0.col1 - + cor0.col2 * cor0.col1, + cor0.col0 + - cor0.col2 ) ) FROM tab2 AS cor0 GROUP BY cor0.col0, col1 query I rowsort @@ -9767,14 +9767,14 @@ SELECT DISTINCT - 54 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - NULLIF ( + 20, + tab1.col2 ) / COALESCE ( + 29, + tab1.col2 * - tab1.col0, - 76 ) AS col1 FROM tab1 GROUP BY tab1.col2 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: # Datafusion - Expected - -27 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 27, - tab1.col2 + 19 ) AS col2 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -10193,7 +10193,7 @@ SELECT DISTINCT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY col1, col2 # Datafusion - Expected - 28 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( tab1.col0, 14, - tab1.col0 - - tab1.col2 ) FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -11029,7 +11029,7 @@ SELECT ALL 41 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -19 # Datafusion - Expected - -19 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 19, cor0.col2 * cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -11052,7 +11052,7 @@ SELECT 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0 # Datafusion - Expected - 89 # Datafusion - Expected - 89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 89, cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -11207,7 +11207,7 @@ SELECT col0 - 77 * - tab1.col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 67 # Datafusion - Expected - 67 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 67, - tab1.col1 + - tab1.col0 ) FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -11227,7 +11227,7 @@ SELECT DISTINCT 73 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 95 # Datafusion - Expected - 95 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 95, - col2 - - tab0.col1 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -11935,7 +11935,7 @@ SELECT DISTINCT cor0.col1 * + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col # Datafusion - Expected - 72 # Datafusion - Expected - 72 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 72, + tab1.col1 ) FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -12908,7 +12908,7 @@ SELECT DISTINCT - + 28 FROM tab1 GROUP BY tab1.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 19 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 19, + tab2.col1 ) AS col2 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -13172,7 +13172,7 @@ SELECT + + 16 AS col1 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -3053 # Datafusion - Expected - -5893 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + - tab0.col0 * COALESCE ( 71, col2 ) FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -13687,7 +13687,7 @@ SELECT - 22 AS col0 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + CASE col1 WHEN - CAST ( NULL AS INTEGER ) THEN + cor0.col2 WHEN 60 THEN NULL ELSE NULL END FROM tab2 AS cor0 GROUP BY col1 query I rowsort label-2060 @@ -14692,7 +14692,7 @@ SELECT cor0.col2 * + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -22 # Datafusion - Expected - -22 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 22, cor0.col1 + cor0.col2, + cor0.col2 + + cor0.col1, - cor0.col2 * 1 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2 query I rowsort @@ -15705,7 +15705,7 @@ SELECT DISTINCT + tab0.col0 - col0 AS col1 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 69 # Datafusion - Expected - 69 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 69, cor0.col2 + cor0.col0, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -16236,7 +16236,7 @@ SELECT ALL tab2.col2 * + 4 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - -57 # Datafusion - Expected - -57 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( + 57, + 60 / + tab2.col0 ) FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -16390,7 +16390,7 @@ NULL # Datafusion - Expected - -63 # Datafusion - Expected - -63 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - + COALESCE ( 63, col0 * col2 + 97, - 0 * - tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -17219,7 +17219,7 @@ SELECT - cor0.col1 * cor0.col1 + - cor0.col1 * - cor0.col1 AS col2 FROM tab1 cor # Datafusion - Datafusion expected results: # Datafusion - Expected - -57 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 57, + tab2.col2 ) FROM tab2 GROUP BY tab2.col1 query I rowsort label-2590 @@ -17373,7 +17373,7 @@ SELECT - + 35 + 21 col2 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - -89 # Datafusion - Expected - -89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 89, 74 / cor0.col0, + cor0.col0 + col2, - cor0.col1 ) FROM tab0 cor0 GROUP BY col0 query I rowsort @@ -18179,7 +18179,7 @@ SELECT col1 / 7 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1 # Datafusion - Expected - 1 # Datafusion - Expected - 1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 80, tab2.col1 ) / + ( 52 ) col1 FROM tab2 GROUP BY col0 query I rowsort @@ -18520,7 +18520,7 @@ SELECT col2 FROM tab2 WHERE ( NULL ) IS NOT NULL GROUP BY tab2.col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL <> col2 query I rowsort @@ -18561,7 +18561,7 @@ SELECT ALL + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 0, + tab1.col2, col1 * - tab1.col1 - + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col1 query I rowsort label-2791 @@ -18674,7 +18674,7 @@ SELECT ALL + cor0.col1 + - cor0.col1 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP # Datafusion - Expected - -8 # Datafusion - Expected - -8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 8, - cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0 query I rowsort @@ -19061,7 +19061,7 @@ SELECT ALL + tab0.col0 + + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - -90 # Datafusion - Expected - -91 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - col0 + + COALESCE ( 92, - tab2.col2 / + tab2.col2 + tab2.col2 * + tab2.col2 ) / tab2.col0 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -19272,7 +19272,7 @@ SELECT 67 + cor0.col0 * - 90 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2 # Datafusion - Expected - -70 # Datafusion - Expected - -70 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 70, cor0.col1, cor0.col1 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -20347,7 +20347,7 @@ SELECT DISTINCT + 51 col2 FROM tab1 GROUP BY col0 # Datafusion - Expected - 79 # Datafusion - Expected - 87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( cor0.col2, ( + 73 ), - col2 * - cor0.col0 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col2 query I rowsort @@ -21000,7 +21000,7 @@ SELECT ALL + + 40 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 91 # Datafusion - Expected - 91 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 91, - cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort label-3162 @@ -21632,7 +21632,7 @@ SELECT DISTINCT + + NULLIF ( 38, 2 ) FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - 129 # Datafusion - Expected - 48 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT tab0.col1 + + COALESCE ( + 48, tab0.col0 ) AS col1 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -21871,7 +21871,7 @@ SELECT - 81 col2 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 5428 # Datafusion - Expected - 5482 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT cor0.col0 + 72 * COALESCE ( 75, - cor0.col0 * + 18, CASE + cor0.col0 WHEN cor0.col2 / 29 THEN NULL WHEN cor0.col2 THEN - cor0.col2 * 52 END * cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col1, cor0.col0 query I rowsort @@ -22668,7 +22668,7 @@ SELECT ALL + - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 79 # Datafusion - Expected - 87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + + COALESCE ( + tab2.col2, + tab2.col2, - 11, + tab2.col0 * 88 - tab2.col2 ) AS col0 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -23765,7 +23765,7 @@ SELECT - + 3 col1 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 78 # Datafusion - Expected - 78 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( - 78, - tab1.col1 ) FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -24198,7 +24198,7 @@ SELECT ALL col2 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 46 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( - 41, cor0.col0 * - cor0.col1, ( - cor0.col0 ) - cor0.col2 ) + + 87 AS col0 FROM tab2 cor0 GROUP BY cor0.col1 query I rowsort @@ -24864,7 +24864,7 @@ SELECT ALL 0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col # Datafusion - Datafusion expected results: # Datafusion - Expected - -49 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( - 49, tab0.col1 / col2 ) FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -29527,7 +29527,7 @@ SELECT ALL cor0.col0 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, c # Datafusion - Expected - 1520 # Datafusion - Expected - 194 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 * - 26 + COALESCE ( 38, + col0 * + NULLIF ( - cor0.col1 / + col0, cor0.col0 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1 query I rowsort @@ -29745,7 +29745,7 @@ SELECT + ( tab1.col2 ) FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - -79 # Datafusion - Expected - -87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( tab2.col2, 7, tab2.col1 ) FROM tab2 GROUP BY tab2.col2 query I rowsort label-4487 @@ -29782,7 +29782,7 @@ SELECT DISTINCT 14 * tab0.col0 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - -110 # Datafusion - Expected - -164 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 82, + col2 * COALESCE ( 77, tab1.col1 ) ) + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -29838,7 +29838,7 @@ SELECT ALL + - tab2.col2 * tab2.col2 + + 53 AS col1 FROM tab2 GROUP BY col2 # Datafusion - Expected - -73 # Datafusion - Expected - -73 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 73, cor0.col1 + cor0.col2 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1 query I rowsort @@ -29980,7 +29980,7 @@ SELECT + ( 11 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 93 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + + COALESCE ( 93, tab0.col1 ) AS col0 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -30380,7 +30380,7 @@ SELECT DISTINCT - cor0.col1 * - 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - -9 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 9, col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1 query I rowsort @@ -30575,7 +30575,7 @@ SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2 # Datafusion - Expected - 78 # Datafusion - Expected - 78 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 78, 35 * + tab1.col0 ) FROM tab1 GROUP BY col1 query I rowsort @@ -30980,7 +30980,7 @@ SELECT ( + tab1.col1 ) - tab1.col1 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 22 # Datafusion - Expected - 22 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( + 65, tab1.col2 ) + 87 AS col2 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -31481,7 +31481,7 @@ SELECT DISTINCT + 8 / tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 1 # Datafusion - Expected - 1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - + COALESCE ( COALESCE ( - 1, col0 * col1 ), - 62 + - tab1.col0, CASE tab1.col1 WHEN + tab1.col0 + col2 THEN tab1.col0 WHEN 53 THEN - tab1.col2 * 20 ELSE tab1.col1 - - tab1.col0 * - tab1.col2 END + + tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -32415,7 +32415,7 @@ SELECT ( - cor0.col2 ) col1 FROM tab1 cor0 GROUP BY col0, cor0.col2 # Datafusion - Expected - 87 # Datafusion - Expected - 87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 87, cor0.col1 / - 34, - cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -32458,7 +32458,7 @@ SELECT cor0.col1 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0. # Datafusion - Expected - 25 # Datafusion - Expected - 25 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 25, col2, + cor0.col1 + ( - cor0.col0 ) / + cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -32523,7 +32523,7 @@ SELECT + 0 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -70 # Datafusion - Expected - -78 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - tab2.col2 + + COALESCE ( COALESCE ( 9, tab2.col2 ), ( - tab2.col2 ) * + tab2.col2 + - tab2.col0 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -33244,7 +33244,7 @@ SELECT 95 FROM tab1 AS cor0 GROUP BY col1 # Datafusion - Expected - 0 # Datafusion - Expected - 1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 8, - cor0.col1 * cor0.col2 + cor0.col1 * + cor0.col2, - cor0.col2 + cor0.col1, 74, + cor0.col1 ) / cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -34153,7 +34153,7 @@ SELECT DISTINCT - tab2.col0 * 27 FROM tab2 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 30 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 30, + col1, + col2 / tab2.col2 + - tab2.col2 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -34595,7 +34595,7 @@ SELECT - 22 * 33 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1 # Datafusion - Expected - 2256 # Datafusion - Expected - 318 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 38, - col1 + + tab1.col2 ) * tab1.col1 + 90 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -34618,7 +34618,7 @@ SELECT + 59 FROM tab2 cor0 GROUP BY cor0.col2 # Datafusion - Expected - -2478 # Datafusion - Expected - -2562 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 42, cor0.col0 + 72 * cor0.col0, + col1 + cor0.col0 ) * - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -37649,7 +37649,7 @@ SELECT ALL 36 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2 # Datafusion - Expected - 2668 # Datafusion - Expected - 435 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + - tab2.col0 + tab2.col0 * + COALESCE ( + 30, tab2.col2 + CAST ( + tab2.col0 AS INTEGER ) * col1, + tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -37684,7 +37684,7 @@ SELECT 64 FROM tab1 AS cor0 GROUP BY col1 # Datafusion - Expected - 204 # Datafusion - Expected - 204 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 51, - cor0.col2, cor0.col2, + cor0.col1 ) * + 4 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -40379,7 +40379,7 @@ SELECT DISTINCT + tab0.col2 / + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT + tab1.col2 col1 FROM tab1 GROUP BY col2 HAVING NOT ( + col1 ) < NULL query I rowsort @@ -40577,7 +40577,7 @@ SELECT + - ( tab0.col1 ) FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -25 # Datafusion - Expected - -25 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( + 25, + col2 * tab1.col0 ) FROM tab1 GROUP BY col1 query I rowsort @@ -40991,7 +40991,7 @@ SELECT DISTINCT cor0.col1 * cor0.col0 + + 97 * col0 FROM tab2 AS cor0 GROUP BY c # Datafusion - Expected - 5846 # Datafusion - Expected - 6438 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + - COALESCE ( - 74, + tab2.col0 ) * tab2.col2 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -41684,7 +41684,7 @@ SELECT ALL 59 AS col1 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - -9 # Datafusion - Expected - -9 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 8, - cor0.col2 ) + - col1 / ( + cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY col1 query I rowsort label-6291 @@ -41802,7 +41802,7 @@ SELECT - 70 - 11 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.co # Datafusion - Expected - 19 # Datafusion - Expected - 19 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 19, cor0.col0 - + cor0.col0 * cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -42236,7 +42236,7 @@ SELECT ALL + - 65 * + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 58 # Datafusion - Expected - 58 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 58, tab2.col1, col1 * tab2.col2 ) AS col1 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -43480,7 +43480,7 @@ SELECT DISTINCT 36 / col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2 # Datafusion - Expected - 59 # Datafusion - Expected - 61 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - + COALESCE ( - 45, tab2.col0 ) / - tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -45928,7 +45928,7 @@ SELECT ( 47 ) AS col1 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 70 # Datafusion - Expected - 70 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + + COALESCE ( + 80, - tab0.col1 + col2 ) - + 10 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -46256,7 +46256,7 @@ SELECT DISTINCT 58 + - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2 # Datafusion - Expected - 66 # Datafusion - Expected - 66 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 66, tab0.col2 ) AS col1 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -47081,7 +47081,7 @@ SELECT 11 FROM tab0 cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -27 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 40, tab0.col2 + + 50 ) + + 13 FROM tab0 GROUP BY col0 query I rowsort @@ -47116,7 +47116,7 @@ SELECT DISTINCT + 0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1 # Datafusion - Expected - -91 # Datafusion - Expected - -91 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 91, tab1.col0 * + tab1.col2, COALESCE ( tab1.col0, - tab1.col1, tab1.col0 * tab1.col2, col0 ) + - col0 ) AS col1 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -48128,7 +48128,7 @@ SELECT NULLIF ( 56, + tab2.col0 ) FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - 13 # Datafusion - Expected - 13 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 13, tab2.col0 * 65, - tab2.col1 * tab2.col0 + tab2.col2 ) FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -48554,7 +48554,7 @@ SELECT ALL cor1.col2 - cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS co # Datafusion - Expected - 56 # Datafusion - Expected - 93 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL tab1.col2 + COALESCE ( 48, - tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -48782,7 +48782,7 @@ SELECT ( 72 ) FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 41 # Datafusion - Expected - 41 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 41, cor0.col2 / + cor0.col1, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1 query I rowsort @@ -50003,7 +50003,7 @@ SELECT DISTINCT + 97 FROM tab0 GROUP BY tab0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -45 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 45, + tab2.col2, ( + tab2.col0 ) + tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -50187,7 +50187,7 @@ SELECT + + 68 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - -78 # Datafusion - Expected - -78 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 78, cor0.col2 * - 51, + cor0.col0 / cor0.col2 ) col0 FROM tab1 AS cor0 GROUP BY col2 query I rowsort @@ -50244,7 +50244,7 @@ SELECT + 44 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 70 # Datafusion - Expected - 70 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 70, tab1.col1 + tab1.col2 / col0 ) FROM tab1 GROUP BY col1 query I rowsort label-7585 @@ -50331,7 +50331,7 @@ SELECT DISTINCT - 0 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 1 # Datafusion - Expected - 2 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 1, + cor0.col1, - col0, cor0.col1 * cor0.col0 + cor0.col2 ) + 24 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -50441,7 +50441,7 @@ SELECT - tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - -12 # Datafusion - Expected - -12 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( - 12, tab1.col1 + tab1.col1, - 63 ) FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -50648,7 +50648,7 @@ SELECT DISTINCT - + col0 AS col1 FROM tab0 GROUP BY tab0.col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT + col0 < NULL query I rowsort @@ -51284,7 +51284,7 @@ SELECT DISTINCT + tab1.col0 * 44 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 43 # Datafusion - Expected - 43 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 43, - cor0.col2 * cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0 query I rowsort @@ -52084,7 +52084,7 @@ SELECT 54 * 71 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.c # Datafusion - Expected - 48 # Datafusion - Expected - 48 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col1 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 48, + cor1.col1 / cor1.col1 ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1 query I rowsort @@ -52214,7 +52214,7 @@ SELECT DISTINCT - + 9 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - 61 # Datafusion - Expected - 61 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 61, - 18 + - cor0.col2 ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0 query I rowsort @@ -52663,7 +52663,7 @@ SELECT DISTINCT - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1 # Datafusion - Expected - 2923 # Datafusion - Expected - 3219 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 37, + tab2.col0 ) * + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 query I rowsort label-7949 @@ -53031,7 +53031,7 @@ SELECT DISTINCT + 11 FROM tab2 AS cor0 GROUP BY col1 # Datafusion - Expected - 159 # Datafusion - Expected - 159 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT 72 - COALESCE ( - 87, - col1 + cor0.col2 * cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -54155,7 +54155,7 @@ SELECT - 2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 15 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 15, - cor0.col1 * cor0.col1 + - col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -54921,7 +54921,7 @@ SELECT ( 87 ) col1 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 62 # Datafusion - Expected - 62 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 62, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -55287,7 +55287,7 @@ SELECT + 66 AS col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - 2698 # Datafusion - Expected - 304 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT - tab1.col2 * - COALESCE ( + 38, col1 ) col1 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -55721,7 +55721,7 @@ SELECT ALL - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0 # Datafusion - Expected - 135 # Datafusion - Expected - 72 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT cor0.col2 + + COALESCE ( 64, cor0.col0, cor0.col0 * ( + 18 ) ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -55756,7 +55756,7 @@ SELECT - 57 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 0, - tab2.col0 / + 24 - - tab2.col0 ) FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -55899,7 +55899,7 @@ SELECT DISTINCT + 27 * + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -98 # Datafusion - Expected - -98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 98, + col0, tab0.col2 + 35 ) AS col1 FROM tab0 GROUP BY col0 query I rowsort @@ -56948,7 +56948,7 @@ SELECT DISTINCT - 67 + tab0.col2 / + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 39 # Datafusion - Expected - 39 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT - - COALESCE ( 39, + tab2.col2 / + tab2.col1 + - tab2.col0, - tab2.col0 ) FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -57296,7 +57296,7 @@ SELECT ALL 39 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 21 # Datafusion - Expected - 21 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 21, - tab0.col1 * - tab0.col0, - 74 * col1 + - col0 ) AS col2 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -58373,7 +58373,7 @@ SELECT DISTINCT - 43 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - -81 # Datafusion - Expected - -95 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - tab0.col2 + - COALESCE ( 57, tab0.col0, + tab0.col2 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -59029,7 +59029,7 @@ SELECT 77 - + 79 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2 # Datafusion - Expected - -58 # Datafusion - Expected - -58 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 58, + col2 * cor0.col0 + cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col2 query I rowsort @@ -59211,7 +59211,7 @@ SELECT ALL - cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY c # Datafusion - Expected - 51 # Datafusion - Expected - 51 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 51, cor0.col2, - cor0.col0 * cor0.col1 + cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -59290,7 +59290,7 @@ SELECT ALL ( 93 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 95 # Datafusion - Expected - 95 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 95, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -59465,7 +59465,7 @@ SELECT + + 19 col1 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 80 # Datafusion - Expected - 80 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( COALESCE ( 80, + cor0.col1 - + cor0.col2, cor0.col1 + cor0.col0 * COALESCE ( + cor0.col1 + col1, cor0.col0, COALESCE ( 6, cor0.col2 * + 53 ) + 67 ) ), + cor0.col1 * + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -59608,7 +59608,7 @@ SELECT DISTINCT + 19 col1 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -45 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 45, + cor0.col0 + ( + cor0.col2 ) ) FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -60214,7 +60214,7 @@ SELECT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1 # Datafusion - Expected - -48 # Datafusion - Expected - -48 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 48, + cor0.col2 / cor0.col0, + 84 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -60580,7 +60580,7 @@ SELECT DISTINCT + col2 * 38 + col2 AS col2 FROM tab0 cor0 GROUP BY col2, cor0.co # Datafusion - Datafusion expected results: # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + 11 / - COALESCE ( - 57, cor0.col0, + NULLIF ( - cor0.col0, cor0.col1 / cor0.col0 + cor0.col2 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2 query I rowsort @@ -61091,7 +61091,7 @@ SELECT ALL - 6 AS col0 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 11 # Datafusion - Expected - 11 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 11, - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0 query I rowsort @@ -61126,7 +61126,7 @@ NULL # Datafusion - Expected - -31 # Datafusion - Expected - -31 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 31, col0 + cor0.col2, + 66 * - col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -61327,7 +61327,7 @@ SELECT 83 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 221364 # Datafusion - Expected - 427284 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + tab0.col0 * COALESCE ( - 78 * + 66, tab0.col1, tab0.col2 ) FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -61364,7 +61364,7 @@ SELECT col1 * + ( 96 ) FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 9 # Datafusion - Expected - 9 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + 9, cor0.col2 * cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort label-9261 @@ -62217,7 +62217,7 @@ SELECT 10 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 151 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + 95 + + COALESCE ( 56, - tab1.col1, + tab1.col1, - 28 + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -62802,7 +62802,7 @@ SELECT ALL + 42 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 8 # Datafusion - Expected - 8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + 8, tab0.col2 * tab0.col0, CAST ( - 43 AS INTEGER ) + + tab0.col1 ) FROM tab0 GROUP BY col0 # Datafusion - Types were automatically converted from: @@ -63465,7 +63465,7 @@ SELECT ALL - - NULLIF ( - tab0.col2, 2 ) + - tab0.col2 FROM tab0 GROUP BY tab0.c # Datafusion - Datafusion expected results: # Datafusion - Expected - 9 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 9, tab2.col0, + tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -63767,7 +63767,7 @@ SELECT ALL 32 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0 # Datafusion - Expected - 148 # Datafusion - Expected - 156 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT cor0.col2 + COALESCE ( + 69, cor0.col1 - COALESCE ( + cor0.col0 + - cor0.col0, + cor0.col0, cor0.col2 - cor0.col1, + col1 ), - cor0.col0, - cor0.col0 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -63855,7 +63855,7 @@ SELECT ALL - cor0.col1 * - 78 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1 # Datafusion - Expected - 0 # Datafusion - Expected - 4536 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - cor0.col1 * - COALESCE ( + 56, cor0.col2 / + NULLIF ( + 89, - cor0.col0 ) ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -64044,7 +64044,7 @@ SELECT + + 37 + 50 * + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT - CAST ( NULL AS INTEGER ) + + COALESCE ( tab1.col2, + 55 + 53, + tab1.col1, - tab1.col1 + 44 ) FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -64159,7 +64159,7 @@ SELECT - 3 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 4 # Datafusion - Expected - 4 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 4, + cor0.col0, + cor0.col2 + cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1 query I rowsort label-9686 @@ -64258,7 +64258,7 @@ SELECT DISTINCT 65 FROM tab1 GROUP BY tab1.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - -15 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 15, col2 ) AS col0 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -64274,7 +64274,7 @@ NULL # Datafusion - Expected - 47 # Datafusion - Expected - 47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 47, cor0.col0 + + cor0.col1 ) AS col1 FROM tab1 cor0 GROUP BY col2 query I rowsort @@ -64309,7 +64309,7 @@ SELECT 35 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0 # Datafusion - Expected - -72 # Datafusion - Expected - -72 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 72, cor0.col1 * col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -65470,7 +65470,7 @@ SELECT + 80 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 47 # Datafusion - Expected - 47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 47, tab0.col2, + COALESCE ( - ( + tab0.col2 ), tab0.col2, + CASE col1 WHEN tab0.col0 THEN + col0 + + tab0.col1 * tab0.col1 WHEN + tab0.col0 THEN NULL WHEN + col0 THEN NULL END ), - col2 ) FROM tab0 GROUP BY tab0.col2 query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_6.slt b/data/sqlite/random/groupby/slt_good_6.slt index 8db914b..c051ab1 100644 --- a/data/sqlite/random/groupby/slt_good_6.slt +++ b/data/sqlite/random/groupby/slt_good_6.slt @@ -487,7 +487,7 @@ SELECT ALL - 85 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - + COALESCE ( 37, + tab2.col1, - 38 * - tab2.col2 + - 41 * tab2.col0 ) / 45 FROM tab2 GROUP BY col0 query I rowsort @@ -1428,7 +1428,7 @@ SELECT + 33 FROM tab0 AS cor0 GROUP BY col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - -30 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 30, - col1 * cor0.col2 + - 56 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0 query I rowsort @@ -3943,7 +3943,7 @@ SELECT + cor0.col1 / + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 82 # Datafusion - Expected - 82 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 82, - cor0.col0 * col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -5927,7 +5927,7 @@ SELECT DISTINCT cor0.col1 / + 7 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, co # Datafusion - Expected - -8 # Datafusion - Expected - -8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( - 8, + col2, + col0 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0 query I rowsort @@ -6792,7 +6792,7 @@ SELECT + 94 AS col0 FROM tab1 cor0 GROUP BY col1 # Datafusion - Expected - -62 # Datafusion - Expected - -62 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 62, cor0.col1, - 51, - 15 * + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -6855,7 +6855,7 @@ SELECT DISTINCT col1 AS col1 FROM tab2 AS cor0 GROUP BY col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 35 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 35, + col2, NULLIF ( cor0.col0, - cor0.col0 ) + cor0.col1 * + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort label-1031 @@ -7261,7 +7261,7 @@ SELECT ALL col2 * + 94 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 35 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 35, - tab0.col2, + tab0.col1 ) FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -7483,7 +7483,7 @@ SELECT 4 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0 # Datafusion - Expected - 29 # Datafusion - Expected - 29 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 30, col1 ) + cor0.col0 / - cor0.col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0 query I rowsort @@ -8066,7 +8066,7 @@ SELECT + ( 94 ) * - tab1.col2 FROM tab1 GROUP BY col2 # Datafusion - Expected - -25 # Datafusion - Expected - -25 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + - COALESCE ( + 25, tab2.col2 + + tab2.col1, tab2.col1 * tab2.col0 ) AS col0 FROM tab2 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function @@ -8075,7 +8075,7 @@ SELECT ALL + - COALESCE ( + 25, tab2.col2 + + tab2.col1, tab2.col1 * tab2.col0 ) # Datafusion - Expected - 3 # Datafusion - Expected - 3 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + CASE - 35 WHEN + tab2.col0 + - tab2.col0 THEN NULL WHEN - 76 THEN - tab2.col2 ELSE + 3 END FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -10621,7 +10621,7 @@ SELECT DISTINCT - tab0.col2 - 48 FROM tab0 GROUP BY tab0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 54 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col1 / COALESCE ( + 80, cor0.col1 * cor0.col0 ) + 54 FROM tab1 cor0 GROUP BY cor0.col1 query I rowsort @@ -10929,7 +10929,7 @@ SELECT DISTINCT + 89 + + tab0.col2 AS col0 FROM tab0 GROUP BY col2 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL CASE + 71 WHEN + 85 THEN col0 * cor0.col1 ELSE NULL END + 43 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -11504,7 +11504,7 @@ SELECT ALL + 21 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -19 # Datafusion - Expected - 41 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 41, cor0.col2, cor0.col1 ) + cor0.col0 FROM tab1 cor0 GROUP BY col0 query I rowsort @@ -13267,7 +13267,7 @@ SELECT DISTINCT - 11 / col0 AS col1 FROM tab2 AS cor0 GROUP BY col0 # Datafusion - Expected - -178 # Datafusion - Expected - -179 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - tab2.col0 + COALESCE ( - 87, - tab2.col2 + - tab2.col1 * + COALESCE ( + tab2.col1, tab2.col0 ) ) FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -17965,7 +17965,7 @@ SELECT - cor0.col0 + - col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + cor0.col2 * - cor0.col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL <= - col0 query I rowsort label-2705 @@ -25081,7 +25081,7 @@ SELECT DISTINCT cor0.col0 / cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.co # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL NOT IN ( - cor0.col0 * - col2 ) query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_7.slt b/data/sqlite/random/groupby/slt_good_7.slt index 9182df3..23789f5 100644 --- a/data/sqlite/random/groupby/slt_good_7.slt +++ b/data/sqlite/random/groupby/slt_good_7.slt @@ -14156,7 +14156,7 @@ SELECT + + 65 col1 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 54 # Datafusion - Expected - 54 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 54, + cor0.col1 * + NULLIF ( + cor0.col1, cor0.col0 ), - cor0.col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col2 query I rowsort @@ -15076,7 +15076,7 @@ SELECT cor0.col1 + col1 col2 FROM tab0 cor0 GROUP BY col1 # Datafusion - Expected - 69 # Datafusion - Expected - 69 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 69, tab0.col0 + tab0.col1 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -15780,7 +15780,7 @@ SELECT ( + col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 AS col2 FROM tab2 GROUP BY col1 HAVING NOT NULL <= col2 query I rowsort @@ -15806,7 +15806,7 @@ SELECT ALL - tab1.col2 * 99 AS col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - -75 # Datafusion - Expected - -75 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 75, + col1, + ( tab0.col1 ) ) AS col1 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -16438,7 +16438,7 @@ SELECT - 62 / 70 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col0 # Datafusion - Expected - 2184 # Datafusion - Expected - 6396 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT tab1.col0 * COALESCE ( + 78, col1 - - tab1.col1, tab1.col0 / tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -16610,7 +16610,7 @@ SELECT DISTINCT 7 FROM tab1 GROUP BY tab1.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 6 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 85, + col0 + ( - cor0.col0 ), + cor0.col0 / - cor0.col2 + - 45 ) + - 79 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -16714,7 +16714,7 @@ SELECT DISTINCT + 72 FROM tab2 GROUP BY tab2.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 67, + cor0.col2 / cor0.col0 ) / cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -16752,7 +16752,7 @@ SELECT 80 + - cor0.col0 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 13 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 13, + tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -17544,7 +17544,7 @@ SELECT ALL + 30 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 32 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 32, + tab1.col1 / - tab1.col1 ) FROM tab1 GROUP BY col0 query I rowsort @@ -17627,7 +17627,7 @@ SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0 # Datafusion - Expected - 2436 # Datafusion - Expected - 7134 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + tab1.col0 * + COALESCE ( + 87, - tab1.col1 * tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -18221,7 +18221,7 @@ SELECT - tab2.col0 * + col0 FROM tab2 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 10 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 10, + cor0.col1, - cor0.col1 / - COALESCE ( + cor0.col0 * + cor0.col2, - 31 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -18543,7 +18543,7 @@ SELECT - + 88 col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 2899 # Datafusion - Expected - 2999 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 50, tab2.col2 ) * + tab2.col1 - + COALESCE ( 51, + tab2.col2 / - 50 ) AS col1 FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -19087,7 +19087,7 @@ SELECT ALL + 15 + - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 14 # Datafusion - Expected - 14 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 14, - cor0.col1, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -19282,7 +19282,7 @@ SELECT + 94 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 158 # Datafusion - Expected - 160 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT + tab2.col1 + - COALESCE ( - 99, tab2.col1 * - tab2.col2 ) col1 FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -19431,7 +19431,7 @@ SELECT 20 AS col0 FROM tab1 GROUP BY col1 # Datafusion - Expected - -33 # Datafusion - Expected - -33 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 33, + tab2.col2 ) FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -19452,7 +19452,7 @@ SELECT - ( col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 32 # Datafusion - Expected - 32 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 32, tab1.col1 + + 87, + CASE tab1.col1 WHEN ( + col1 ) THEN tab1.col2 WHEN - tab1.col1 THEN 38 ELSE NULL END + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -19538,7 +19538,7 @@ SELECT + 85 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -45 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 45, + tab1.col2 ) FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -19668,7 +19668,7 @@ SELECT ALL - + tab0.col1 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -96 # Datafusion - Expected - -96 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 96, 25 / - tab0.col1, - col2 / tab0.col1 ) FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -20168,7 +20168,7 @@ SELECT + tab2.col1 + - 81 / - tab2.col1 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - 71 # Datafusion - Expected - 8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + col2 * + COALESCE ( 1, + cor0.col1 + ( col0 ) * cor0.col1 ) col0 FROM tab1 cor0 GROUP BY cor0.col2 query I rowsort @@ -20222,7 +20222,7 @@ SELECT - 8 - - tab1.col1 FROM tab1 GROUP BY tab1.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 79 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 79, cor0.col1 + - CASE 20 WHEN + cor0.col2 THEN NULL ELSE + cor0.col0 + ( 94 + cor0.col1 / cor0.col1 ) END * cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY col2 query I rowsort @@ -20875,7 +20875,7 @@ NULL # Datafusion - Expected - 15 # Datafusion - Expected - 15 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 15, + 45 + + cor0.col0 / 98 ) AS col0 FROM tab0 cor0 GROUP BY col1 query I rowsort @@ -21230,7 +21230,7 @@ SELECT DISTINCT 5 * 51 FROM tab0 cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - -55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 55, cor0.col1 + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort label-3196 @@ -21947,7 +21947,7 @@ SELECT - tab1.col2 * + 20 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 162 # Datafusion - Expected - 85 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT tab2.col0 + + COALESCE ( 70, + tab2.col2 * 26 ) FROM tab2 GROUP BY col0 query I rowsort label-3305 @@ -22091,7 +22091,7 @@ SELECT ALL 6 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + CASE + 78 WHEN - 9 THEN + cor0.col0 END FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -22276,7 +22276,7 @@ SELECT 37 AS col0 FROM tab2 GROUP BY tab2.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 25 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 25, + tab2.col1 - + tab2.col1, tab2.col1 / - 33 ) FROM tab2 GROUP BY col0 query I rowsort @@ -22362,7 +22362,7 @@ SELECT ALL - 33 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 4615 # Datafusion - Expected - 520 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 65, tab1.col1 * + tab1.col1 + + tab1.col2 * tab1.col0 ) * tab1.col2 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -23441,7 +23441,7 @@ SELECT - 21 + + 20 AS col2 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 81 # Datafusion - Expected - 81 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + + COALESCE ( + ( + 81 ), tab2.col0 * + tab2.col1 + + tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -24059,7 +24059,7 @@ SELECT 56 FROM tab0 GROUP BY col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - -18 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 18, - cor0.col2 * + NULLIF ( + 36, + cor0.col1 + - cor0.col0 ) ) AS col1 FROM tab1 cor0 GROUP BY col1, cor0.col1 query I rowsort @@ -24353,7 +24353,7 @@ NULL # Datafusion - Expected - 34 # Datafusion - Expected - 34 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 34, cor0.col2 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -26500,7 +26500,7 @@ SELECT ALL - 30 / cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.c # Datafusion - Expected - 54 # Datafusion - Expected - 54 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 2, cor0.col0, cor0.col0 * - ( cor0.col2 * cor0.col1 ) ) * 27 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -26544,7 +26544,7 @@ SELECT - cor0.col1 * + 72 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col # Datafusion - Datafusion expected results: # Datafusion - Expected - -27 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 7, + cor0.col1 + - ( - col1 ), + 85 * cor0.col1 - CASE + 62 + - cor0.col1 WHEN - 83 - 85 THEN NULL ELSE cor0.col2 * + cor0.col1 END ) - 20 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort label-4000 @@ -27152,7 +27152,7 @@ SELECT DISTINCT - cor0.col1 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1 # Datafusion - Expected - 34 # Datafusion - Expected - 34 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - - COALESCE ( 34, + tab0.col0 ) FROM tab0 GROUP BY tab0.col2 query I rowsort label-4090 @@ -27433,7 +27433,7 @@ SELECT + ( 84 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2 # Datafusion - Expected - -6478 # Datafusion - Expected - -7134 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL cor0.col2 * + COALESCE ( - 82, cor0.col2 / + col1 + col2, - cor0.col2, col0 * 76 + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2 query I rowsort @@ -28548,7 +28548,7 @@ SELECT ALL - 84 AS col1 FROM tab2 cor0 GROUP BY cor0.col2 # Datafusion - Expected - 18 # Datafusion - Expected - 18 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 18, + cor0.col0 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col2 query I rowsort @@ -28564,7 +28564,7 @@ SELECT ALL 25 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -70 # Datafusion - Expected - -70 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - + COALESCE ( 70, tab0.col1 * - tab0.col2 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -28592,7 +28592,7 @@ SELECT cor0.col0 * 2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 18 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 18, tab0.col1 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -29095,7 +29095,7 @@ SELECT ALL 40 AS col2 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - 47 # Datafusion - Expected - 47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 47, tab1.col0 - 36, tab1.col2 ) AS col0 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -29137,7 +29137,7 @@ SELECT DISTINCT 19 FROM tab0 AS cor0 GROUP BY col0, col1 # Datafusion - Expected - 2850 # Datafusion - Expected - 300 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + cor0.col1 * + COALESCE ( + 50, - cor0.col0, cor0.col0, cor0.col0 ) FROM tab1 AS cor0 GROUP BY col1 query I rowsort @@ -31514,7 +31514,7 @@ SELECT + 65 * 44 col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1 # Datafusion - Expected - 94 # Datafusion - Expected - 94 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 94, + cor0.col2 + cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY col1 query I rowsort label-4751 @@ -31931,7 +31931,7 @@ SELECT - 56 AS col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 49 # Datafusion - Expected - 49 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 49, - cor0.col0 * CASE - 76 WHEN cor0.col2 THEN - col0 * cor0.col2 END ) FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -32596,7 +32596,7 @@ SELECT - cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY co # Datafusion - Expected - -41 # Datafusion - Expected - 16 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 42, cor0.col2 * + col2, + cor0.col2 + + cor0.col0 ) + - ( col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -33727,7 +33727,7 @@ SELECT DISTINCT - 23 * 32 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -30 # Datafusion - Expected - -30 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 30, + tab1.col0 * tab1.col2 ) AS col2 FROM tab1 GROUP BY col0 query I rowsort @@ -34740,7 +34740,7 @@ SELECT DISTINCT + 23 / - 95 - tab1.col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 10 # Datafusion - Expected - 10 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 10, tab0.col1 * tab0.col1 ) FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -34826,7 +34826,7 @@ SELECT ALL cor0.col2 - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( - 47, - tab1.col1 * tab1.col2 ) / 56 FROM tab1 GROUP BY tab1.col0 query I rowsort @@ -34881,7 +34881,7 @@ SELECT + cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -55 # Datafusion - Expected - -55 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 55, + tab1.col1 + + tab1.col1 * col1, 76 * tab1.col0 + tab1.col1 ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -35304,7 +35304,7 @@ SELECT ALL col1 / 99 FROM tab2 GROUP BY tab2.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 29 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 29, - cor0.col2 ) FROM tab2 AS cor0 GROUP BY col0, col1 query I rowsort @@ -35473,7 +35473,7 @@ SELECT DISTINCT + 38 - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 62 # Datafusion - Expected - 62 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 62, tab0.col1 ) FROM tab0 GROUP BY tab0.col2 query I rowsort label-5346 @@ -35560,7 +35560,7 @@ SELECT cor0.col2 * - 67 FROM tab1 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 6928 # Datafusion - Expected - 715 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 39, 36 - tab0.col0 * 81, + tab0.col1 + tab0.col2 ) + tab0.col0 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -35838,7 +35838,7 @@ SELECT + 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 96 # Datafusion - Expected - 96 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 96, col0 * - ( 98 * col1 ) ) AS col0 FROM tab2 cor0 GROUP BY cor0.col0 query I rowsort @@ -36007,7 +36007,7 @@ SELECT - - 98 AS col1 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - 92 # Datafusion - Expected - 92 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( 92, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY col0 query I rowsort @@ -37007,7 +37007,7 @@ SELECT ALL col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, col # Datafusion - Expected - 5236 # Datafusion - Expected - 5236 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT 68 * COALESCE ( + 77, cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0 query I rowsort label-5578 @@ -37047,7 +37047,7 @@ SELECT col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 115 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 25, tab1.col1, + tab1.col0 - + tab1.col2 ) - - 90 AS col2 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -37311,7 +37311,7 @@ SELECT - ( - 52 ) + tab0.col2 * + 16 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - -6819 # Datafusion - Expected - -96 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 96, col0 * 29 ) - + 83 * tab0.col1 col1 FROM tab0 GROUP BY col1 query I rowsort @@ -37369,7 +37369,7 @@ SELECT DISTINCT 97 + cor0.col2 / + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor # Datafusion - Expected - -4180 # Datafusion - Expected - -4180 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - + COALESCE ( 44, - tab1.col0, - tab1.col1 / - 44 ) * + 95 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -37855,7 +37855,7 @@ SELECT 65 FROM tab1 AS cor0 GROUP BY cor0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 7 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 7, tab2.col2 * - col0 ) AS col0 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -38257,7 +38257,7 @@ SELECT DISTINCT 48 FROM tab0 GROUP BY col0 # Datafusion - Expected - 2576 # Datafusion - Expected - 2576 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + 28 * COALESCE ( + 92, + cor0.col0 * 74, + cor0.col2 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2 query I rowsort @@ -39463,7 +39463,7 @@ SELECT DISTINCT 86 FROM tab2 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -52 # Datafusion - Expected - -52 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + 24, - cor0.col0 * + 21 ) + - 76 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2 query I rowsort @@ -40503,7 +40503,7 @@ SELECT - 31 FROM tab2 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -63 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 63, cor0.col2 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1 # Datafusion - Types were automatically converted from: @@ -40977,7 +40977,7 @@ SELECT tab2.col1 * 23 col2 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - 13 # Datafusion - Expected - 39 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col2 - COALESCE ( 32, - col1 * + cor0.col0, 92 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2 query I rowsort @@ -41196,7 +41196,7 @@ SELECT DISTINCT tab1.col1 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 HAVIN # Datafusion - Expected - -78 # Datafusion - Expected - -78 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 78, col2, - cor0.col1 + + cor0.col1 * cor0.col0 ) col0 FROM tab1 cor0 GROUP BY cor0.col2 query I rowsort @@ -42461,7 +42461,7 @@ SELECT DISTINCT - ( - cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY col0 # Datafusion - Expected - 5175 # Datafusion - Expected - 5175 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT 75 * COALESCE ( 69, - cor0.col2 * cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY col0 query I rowsort @@ -43086,7 +43086,7 @@ SELECT + cor0.col1 / + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 46 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 46, cor0.col0, col0 ) FROM tab2 AS cor0 GROUP BY col2 query I rowsort @@ -45871,7 +45871,7 @@ SELECT DISTINCT + 56 * 33 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor # Datafusion - Expected - -27 # Datafusion - Expected - -27 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( - 27, + 19 - tab2.col2, col2 + + tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -46609,7 +46609,7 @@ SELECT 83 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, # Datafusion - Expected - 157 # Datafusion - Expected - 157 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 89, - tab0.col0 * tab0.col1 ) + 68 col0 FROM tab0 GROUP BY col1 query I rowsort @@ -46678,7 +46678,7 @@ SELECT + 63 + - tab0.col0 * - tab0.col0 FROM tab0 GROUP BY col0 # Datafusion - Expected - 1320 # Datafusion - Expected - 1320 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 55, tab1.col1 * tab1.col2 ) * + 24 FROM tab1 GROUP BY tab1.col2 query I rowsort @@ -47436,7 +47436,7 @@ SELECT - - 36 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT CASE 95 WHEN 81 THEN tab0.col0 ELSE NULL END * 55 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -48047,7 +48047,7 @@ SELECT - 47 + - 86 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2 # Datafusion - Expected - 57 # Datafusion - Expected - 94 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL cor0.col2 - COALESCE ( - 49, + cor0.col1 * - cor0.col1, cor0.col0 + 53 ) FROM tab1 cor0 GROUP BY cor0.col2 query I rowsort @@ -48738,7 +48738,7 @@ SELECT DISTINCT + 46 + tab1.col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -2 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 2, tab1.col1 ) AS col2 FROM tab1 GROUP BY tab1.col0 # Datafusion - Types were automatically converted from: @@ -49244,7 +49244,7 @@ SELECT - - 13 AS col2 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 128 # Datafusion - Expected - 128 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 67, cor0.col2 + + cor0.col0 / cor0.col1, + cor0.col0 + cor0.col0 ) + ( 61 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1 query I rowsort @@ -49360,7 +49360,7 @@ SELECT cor0.col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY col0 # Datafusion - Expected - 0 # Datafusion - Expected - 5994 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + + tab0.col1 * COALESCE ( 74, - tab0.col2, 4 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -49410,7 +49410,7 @@ SELECT ALL + col2 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2 # Datafusion - Expected - -30 # Datafusion - Expected - -30 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( COALESCE ( + 30, cor0.col0 ), - cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -49624,7 +49624,7 @@ SELECT DISTINCT - 18 AS col2 FROM tab2 AS cor0 GROUP BY col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 66 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 66, cor0.col2, cor0.col1, cor0.col0 * - 39 ) AS col2 FROM tab0 AS cor0 GROUP BY col0 query I rowsort @@ -50804,7 +50804,7 @@ SELECT DISTINCT - 15 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY # Datafusion - Expected - -38 # Datafusion - Expected - -38 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( 38, cor0.col1, col0 + NULLIF ( cor0.col1, + cor0.col2 ) * 74 ) FROM tab2 cor0 GROUP BY cor0.col1 query I rowsort @@ -52067,7 +52067,7 @@ SELECT col1 * 12 AS col0 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - -1836 # Datafusion - Expected - -98736 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - col1 * + ( - COALESCE ( - 51, col2 ) * cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -52182,7 +52182,7 @@ SELECT - 0 FROM tab0 GROUP BY col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 0, cor0.col0 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -53146,7 +53146,7 @@ SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.c # Datafusion - Expected - -8270 # Datafusion - Expected - -8453 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - tab2.col0 * tab2.col0 + - COALESCE ( - 11, - tab2.col0, ( NULLIF ( tab2.col0, - tab2.col1 * 65 ) ) ) AS col1 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -54228,7 +54228,7 @@ SELECT + 80 AS col1 FROM tab2 GROUP BY tab2.col0 # Datafusion - Expected - -98 # Datafusion - Expected - -98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 98, col1 + + cor0.col2, + 6 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -54562,7 +54562,7 @@ SELECT ALL + cor0.col0 / + 4 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0. # Datafusion - Datafusion expected results: # Datafusion - Expected - -75 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 75, + tab1.col1, - tab1.col1 - - ( tab1.col1 ) * + tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -54873,7 +54873,7 @@ SELECT ALL - - 7 col2 FROM tab1 GROUP BY tab1.col2 # Datafusion - Expected - 9 # Datafusion - Expected - 9 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 9, - tab2.col0 * col2, + tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -55232,7 +55232,7 @@ SELECT + cor0.col2 + cor0.col0 * + 56 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -73 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - 99 - COALESCE ( - 26, - cor0.col0 / cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0 query I rowsort @@ -55832,7 +55832,7 @@ SELECT + cor0.col0 / - col0 FROM tab2 AS cor0 GROUP BY col0 # Datafusion - Expected - 5 # Datafusion - Expected - 5 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + + COALESCE ( 5, + tab1.col2, - 2 * + tab1.col2 ) AS col1 FROM tab1 GROUP BY col0 query I rowsort @@ -56282,7 +56282,7 @@ SELECT DISTINCT - 53 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, c # Datafusion - Expected - 255 # Datafusion - Expected - 3009 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT 54 * cor0.col1 + COALESCE ( - 69, - 35 + cor0.col2 ) FROM tab1 AS cor0 GROUP BY col1 query I rowsort @@ -56305,7 +56305,7 @@ SELECT 33 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -4018 # Datafusion - Expected - -4018 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + 98 * - COALESCE ( + 41, - cor0.col2, + cor0.col0 * - col0 - col1 / + CASE col2 WHEN cor0.col2 THEN - cor0.col1 / ( 15 / - cor0.col2 ) + - 57 WHEN - cor0.col1 THEN NULL ELSE NULL END, cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -56885,7 +56885,7 @@ SELECT 18 col2 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 17 # Datafusion - Expected - 98 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( + 17, - tab0.col0 ) + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -57616,7 +57616,7 @@ SELECT - 5 * + 75 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2 # Datafusion - Expected - -149 # Datafusion - Expected - -68 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - tab0.col1 + COALESCE ( - COALESCE ( 68, + tab0.col0 * tab0.col1 ), + COALESCE ( + tab0.col1, - 3 ) * CASE - tab0.col1 * tab0.col1 + tab0.col1 WHEN tab0.col2 - tab0.col2 THEN tab0.col1 * + 31 END, + 86 ) AS col1 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -58173,7 +58173,7 @@ SELECT ( + col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 53 # Datafusion - Expected - 53 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 53, cor0.col0, - 24 * NULLIF ( col0, + cor0.col1 * - cor0.col1 ), 61 ) FROM tab1 cor0 GROUP BY col1 query I rowsort @@ -59404,7 +59404,7 @@ SELECT - cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor # Datafusion - Expected - -16 # Datafusion - Expected - 44 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + col0 - COALESCE ( 38, cor0.col0 * - col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -60467,7 +60467,7 @@ SELECT ALL - ( cor0.col0 ) * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0 # Datafusion - Expected - -208740 # Datafusion - Expected - -23520 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT 84 * - COALESCE ( cor0.col2 * + 35, 72, cor0.col2 * cor0.col0, 46 + - cor0.col1 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -60628,7 +60628,7 @@ NULL # Datafusion - Expected - 3 # Datafusion - Expected - 3 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL COALESCE ( + 3, + cor0.col2, - cor0.col2 + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -60893,7 +60893,7 @@ SELECT DISTINCT - tab0.col0 * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - -2349 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + tab0.col1 * COALESCE ( - 29, - tab0.col0 * - col2 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -61252,7 +61252,7 @@ SELECT + + 84 * - tab0.col2 + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 2673 # Datafusion - Expected - 2673 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 27, cor0.col1, + ( + 27 ), cor0.col0 * + cor0.col1 + - cor0.col1 ) * 99 FROM tab0 AS cor0 GROUP BY cor0.col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function @@ -61261,7 +61261,7 @@ SELECT COALESCE ( 27, cor0.col1, + ( + 27 ), cor0.col0 * + cor0.col1 + - cor0.co # Datafusion - Expected - 35 # Datafusion - Expected - 35 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 35, cor0.col2 * + 34, cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2 query I rowsort @@ -62040,7 +62040,7 @@ SELECT - cor0.col1 + + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 4 # Datafusion - Expected - 4 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 4, cor0.col2 / - cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY col0 query I rowsort @@ -62218,7 +62218,7 @@ SELECT + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 52 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 54, cor0.col2 * cor0.col2 ) + - 2 col2 FROM tab0 AS cor0 GROUP BY col0 query I rowsort @@ -62385,7 +62385,7 @@ SELECT - 97 FROM tab2 GROUP BY tab2.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT cor0.col1 / COALESCE ( 65, - cor0.col0, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -62564,7 +62564,7 @@ SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - -37 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 37, col1, 52, + cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -64232,7 +64232,7 @@ SELECT DISTINCT + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0 # Datafusion - Expected - 67 # Datafusion - Expected - 67 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 67, + tab0.col2, tab0.col0 - + tab0.col0 * CASE tab0.col0 * tab0.col1 WHEN tab0.col1 THEN NULL ELSE + tab0.col0 END ) AS col0 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -65342,7 +65342,7 @@ SELECT 72 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -57 # Datafusion - Expected - -57 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 82, + cor0.col1 ) + 25 AS col1 FROM tab0 AS cor0 GROUP BY col2 query I rowsort @@ -66067,7 +66067,7 @@ NULL # Datafusion - Expected - -7851 # Datafusion - Expected - 87 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 87, + tab0.col1, tab0.col0 ) - 98 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -66106,7 +66106,7 @@ SELECT DISTINCT - 68 + + 56 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 37 # Datafusion - Expected - 37 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 37, - col2 ) FROM tab1 cor0 GROUP BY col1 query I rowsort label-9978 diff --git a/data/sqlite/random/groupby/slt_good_8.slt b/data/sqlite/random/groupby/slt_good_8.slt index 52a5683..b80d492 100644 --- a/data/sqlite/random/groupby/slt_good_8.slt +++ b/data/sqlite/random/groupby/slt_good_8.slt @@ -818,7 +818,7 @@ SELECT ALL cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1 # Datafusion - Expected - -1757 # Datafusion - Expected - -1774 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 24, + cor0.col1 + + cor0.col1, + cor0.col2 * + col1, - cor0.col2 * - 79 ) * 75 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -1222,7 +1222,7 @@ SELECT DISTINCT + 26 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -18 # Datafusion - Expected - -18 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT - + COALESCE ( 18, - tab1.col1 * tab1.col2 + tab1.col2, - tab1.col2 ) FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -1288,7 +1288,7 @@ SELECT tab0.col1 + col1 AS col1 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - -38 # Datafusion - Expected - -79 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - cor0.col2, 71, + cor0.col1, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -1717,7 +1717,7 @@ SELECT ALL 94 + 22 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0 # Datafusion - Expected - -7 # Datafusion - Expected - -7 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 43, cor0.col2 ) / 6 FROM tab2 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -2039,7 +2039,7 @@ SELECT ALL 69 / - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -37 # Datafusion - Expected - -39 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT + - tab2.col1 - - COALESCE ( 22, + tab2.col0 / - tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col1 query I rowsort @@ -2965,7 +2965,7 @@ SELECT DISTINCT - 23 AS col2 FROM tab2 GROUP BY tab2.col2 # Datafusion - Expected - -1 # Datafusion - Expected - -1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL + - COALESCE ( 1, + tab0.col1 + tab0.col0, - tab0.col2 ) FROM tab0 GROUP BY tab0.col0 query I rowsort @@ -3084,7 +3084,7 @@ SELECT - - 21 FROM tab0 GROUP BY tab0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 3336 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 31, - cor0.col1 * col1 + cor0.col2, - 14 * cor0.col1 ) + 37 * + 91 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -3864,7 +3864,7 @@ SELECT 49 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 8 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col0 could not be resolved from available columns: cor1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( 8, cor1.col0 * + 25 ) FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2 query I rowsort @@ -4934,7 +4934,7 @@ SELECT ALL 38 FROM tab2 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - 85 # Datafusion - Expected - 85 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 16, - col0 ) + + 69 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -4985,7 +4985,7 @@ SELECT - 0 AS col2 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - CASE 2 WHEN tab2.col2 THEN NULL WHEN 28 THEN tab2.col1 + - tab2.col0 END AS col0 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -5518,7 +5518,7 @@ SELECT cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0 # Datafusion - Expected - NULL # Datafusion - Expected - NULL skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT CASE - cor0.col0 WHEN CAST ( NULL AS INTEGER ) THEN cor0.col2 END AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -6296,14 +6296,14 @@ SELECT 95 AS col1 FROM tab2 GROUP BY tab2.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - -4 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 4, cor0.col2, - cor0.col0 * ( + cor0.col2 ) ) FROM tab2 AS cor0 GROUP BY cor0.col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: # Datafusion - Expected - 47 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( - 47, - cor0.col1 * cor0.col2 + - col2, - cor0.col0 * cor0.col2, cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -6397,7 +6397,7 @@ SELECT - 24 FROM tab2 cor0 GROUP BY cor0.col0 # Datafusion - Expected - -50 # Datafusion - Expected - -50 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + - COALESCE ( 50, - tab2.col2, - tab2.col1 - CASE - tab2.col2 WHEN - tab2.col1 THEN + col2 / tab2.col0 WHEN 26 / col0 THEN NULL ELSE NULL END ) col2 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -6786,7 +6786,7 @@ SELECT ALL cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1 # Datafusion - Expected - 90 # Datafusion - Expected - 90 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 90, + cor0.col1 + + 2 * - cor1.col1, + cor0.col1 * + cor1.col0 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0 query I rowsort label-1020 @@ -8107,7 +8107,7 @@ SELECT ALL 63 * col1 AS col0 FROM tab2 AS cor0 GROUP BY col1 # Datafusion - Expected - 57 # Datafusion - Expected - 57 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 57, + tab0.col0 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -8989,7 +8989,7 @@ SELECT ALL + COALESCE ( + cor0.col2, 49 ) AS col0 FROM tab1 AS cor0 GROUP BY cor # Datafusion - Expected - -58 # Datafusion - Expected - -58 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 58, + tab0.col1 * + col0, - tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -10039,7 +10039,7 @@ SELECT DISTINCT - 31 FROM tab1 cor0 GROUP BY cor0.col0 # Datafusion - Expected - -2480 # Datafusion - Expected - -2480 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 40, tab2.col0, ( tab2.col1 ) * - 44 - tab2.col2 ) * - 62 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -11174,7 +11174,7 @@ SELECT DISTINCT + + col0 AS col2 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 33 # Datafusion - Expected - 33 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 33, + cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -11659,7 +11659,7 @@ SELECT DISTINCT + + ( tab1.col1 ) AS col0 FROM tab1 GROUP BY tab1.col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - -13 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( - 13, cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col1 query I rowsort @@ -13755,7 +13755,7 @@ SELECT - 62 * 20 AS col2 FROM tab0 GROUP BY col1 # Datafusion - Expected - 26 # Datafusion - Expected - 26 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( + 26, col1 ) col1 FROM tab1 AS cor0 GROUP BY col2 query I rowsort @@ -13775,7 +13775,7 @@ SELECT ALL - - 61 FROM tab0 GROUP BY tab0.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 1 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + COALESCE ( tab2.col0, tab2.col0 + 53, + 12, - tab2.col2 + tab2.col1, + tab2.col0 / col1 ) / col0 FROM tab2 GROUP BY col0 query I rowsort @@ -15518,7 +15518,7 @@ SELECT ALL + 10 - - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 50 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( 50, tab0.col1 * ( + tab0.col0 * tab0.col1 ) + tab0.col0 ) col0 FROM tab0 GROUP BY col1 query I rowsort @@ -16428,7 +16428,7 @@ SELECT 6 col0 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - -133 # Datafusion - Expected - -52 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT - + tab0.col1 - + COALESCE ( 52, tab0.col0, - col0 ) AS col1 FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -17540,7 +17540,7 @@ SELECT DISTINCT 0 FROM tab1 GROUP BY col2 # Datafusion - Expected - 31 # Datafusion - Expected - 31 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + 31, tab2.col0 ) FROM tab2 GROUP BY col2 query I rowsort @@ -18727,7 +18727,7 @@ SELECT ALL - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2 # Datafusion - Expected - 2370 # Datafusion - Expected - 2610 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( 30, cor0.col0 / ( cor0.col2 * - 72 ) - col1 ) * + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -18789,7 +18789,7 @@ SELECT + cor0.col2 / + 87 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0. # Datafusion - Expected - 29 # Datafusion - Expected - 29 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 29, - tab0.col2 + + ( tab0.col0 ), tab0.col2 + col0 / - tab0.col2 ) AS col2 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -19653,7 +19653,7 @@ SELECT ALL cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1 HAVING NULL IS NO # Datafusion - Datafusion expected results: # Datafusion - Expected - -35 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 35, cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -19929,7 +19929,7 @@ SELECT col1 * 68 AS col1 FROM tab2 GROUP BY tab2.col1 # Datafusion - Expected - -93 # Datafusion - Expected - -93 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( - 93, cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col2 query I rowsort @@ -20607,7 +20607,7 @@ SELECT + - tab1.col1 * 44 AS col2 FROM tab1 GROUP BY tab1.col1 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT + 14 / COALESCE ( 62, tab0.col0 + - tab0.col2, tab0.col1 ) FROM tab0 GROUP BY tab0.col1 query I rowsort @@ -20635,7 +20635,7 @@ NULL # Datafusion - Expected - 2 # Datafusion - Expected - 2 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + COALESCE ( + 80, - cor0.col2 - - cor0.col1 * + cor0.col1 ) / + 28 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1 query I rowsort @@ -21132,7 +21132,7 @@ SELECT DISTINCT 95 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1 # Datafusion - Expected - 69 # Datafusion - Expected - 69 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( - 69, + cor0.col0 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1 query I rowsort @@ -21263,7 +21263,7 @@ SELECT + + tab1.col0 - tab1.col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 79 # Datafusion - Expected - 79 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 14, cor0.col0 / cor0.col1 ) + 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1 query I rowsort @@ -21752,7 +21752,7 @@ SELECT ALL col0 * + 39 col2 FROM tab0 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 91 # Datafusion - Expected - 91 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( - 91, + cor0.col2, cor0.col1 + + 51, col0 * cor0.col1 + col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -22148,7 +22148,7 @@ SELECT 69 col2 FROM tab0 GROUP BY tab0.col0 # Datafusion - Expected - 5414 # Datafusion - Expected - 5455 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT + tab0.col2 + 56 * COALESCE ( 96, tab0.col1 * + tab0.col2 + tab0.col2 * + tab0.col0 ) FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -22343,7 +22343,7 @@ SELECT - - tab2.col0 / tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -56 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( - 56, - cor0.col1, col2 * - cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -23275,7 +23275,7 @@ SELECT - 15 FROM tab1 GROUP BY col0 # Datafusion - Expected - -3 # Datafusion - Expected - 35 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - tab1.col1 + + COALESCE ( 41, - col0, - tab1.col0 + + tab1.col2 ) col0 FROM tab1 GROUP BY col1 query I rowsort @@ -23989,7 +23989,7 @@ SELECT ALL + - tab0.col1 AS col1 FROM tab0 GROUP BY col1 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 / COALESCE ( - 34, - col1 * cor0.col2, cor0.col1, + cor0.col2 + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1 query I rowsort @@ -24999,7 +24999,7 @@ SELECT ALL 37 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -65 # Datafusion - Expected - -65 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 65, cor0.col1 * 39 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2 query I rowsort @@ -25135,7 +25135,7 @@ SELECT + cor0.col0 * - 61 + + cor0.col1 / - cor0.col1 col1 FROM tab2 cor0 GROUP # Datafusion - Datafusion expected results: # Datafusion - Expected - 4 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT COALESCE ( + 4, col1, col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort @@ -27421,7 +27421,7 @@ SELECT - tab1.col0 * - 44 col2 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - -67 # Datafusion - Expected - -67 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( + 67, tab1.col2 * + tab1.col0 + - tab1.col2, - col0 ) FROM tab1 GROUP BY tab1.col2 query I rowsort label-4148 @@ -28103,7 +28103,7 @@ SELECT - + tab1.col0 + + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - -2508 # Datafusion - Expected - -264 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 44, + cor0.col2 ) * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -28659,7 +28659,7 @@ SELECT - 42 * - col1 FROM tab2 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 52, + cor0.col0, cor0.col1 - - 15 * col1 ) / - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1 query I rowsort @@ -29295,7 +29295,7 @@ SELECT - 0 FROM tab2 AS cor0 GROUP BY cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -79 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( 79, cor0.col2 / + 94 ) FROM tab0 AS cor0 GROUP BY cor0.col0 query I rowsort @@ -29629,7 +29629,7 @@ SELECT - cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 WHERE NOT - tab0.col2 * - t # Datafusion - Expected - 96 # Datafusion - Expected - 96 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 96, cor0.col0 * + col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1 query I rowsort @@ -30448,7 +30448,7 @@ SELECT - 54 + - tab2.col0 AS col2 FROM tab2 GROUP BY col0 # Datafusion - Expected - 75 # Datafusion - Expected - 75 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 75, + cor0.col0 + + cor0.col0 * cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 query I rowsort @@ -31208,7 +31208,7 @@ SELECT 69 AS col2 FROM tab0 GROUP BY tab0.col1 # Datafusion - Expected - 6 # Datafusion - Expected - 6 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( 6, 89, tab0.col1 * + 21 - + 28 ) AS col1 FROM tab0 GROUP BY tab0.col2 query I rowsort @@ -31500,7 +31500,7 @@ SELECT 56 * - col0 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 4108 # Datafusion - Expected - 4524 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + COALESCE ( 52, cor0.col2 * cor0.col1 ) * cor0.col2 FROM tab2 AS cor0 GROUP BY col2 query I rowsort @@ -33443,7 +33443,7 @@ SELECT DISTINCT + 63 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor # Datafusion - Expected - 65 # Datafusion - Expected - 65 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + + COALESCE ( 65, tab2.col2 - - tab2.col2 ) AS col1 FROM tab2 GROUP BY col0 query I rowsort @@ -33615,7 +33615,7 @@ SELECT DISTINCT + 0 * 30 AS col2 FROM tab0 GROUP BY tab0.col2 # Datafusion - Expected - 84 # Datafusion - Expected - 84 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + + COALESCE ( + 84, - tab2.col0 + + tab2.col0 ) col2 FROM tab2 GROUP BY tab2.col2 query I rowsort @@ -33989,7 +33989,7 @@ SELECT - ( - 10 ) FROM tab0 AS cor0 GROUP BY cor0.col2 # Datafusion - Expected - -68 # Datafusion - Expected - -68 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( - 68, - cor0.col0 * cor0.col1, cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 query I rowsort label-5142 @@ -34320,7 +34320,7 @@ SELECT ALL - 86 FROM tab1 AS cor0 GROUP BY cor0.col0 # Datafusion - Expected - 89 # Datafusion - Expected - 89 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - COALESCE ( - 89, + cor0.col1 ) FROM tab2 cor0 GROUP BY cor0.col2 query I rowsort @@ -34791,7 +34791,7 @@ SELECT DISTINCT - 43 FROM tab1 GROUP BY tab1.col0 # Datafusion - Expected - 0 # Datafusion - Expected - 0 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT COALESCE ( + 0, tab2.col1, tab2.col1, COALESCE ( tab2.col0, - NULLIF ( 19, + tab2.col1 - tab2.col1 ) * - CASE 45 WHEN tab2.col0 THEN - tab2.col0 END, col1 ) + - tab2.col1 ) FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -35461,7 +35461,7 @@ SELECT + 98 * - col1 + 77 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 # Datafusion - Expected - -92 # Datafusion - Expected - -92 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - COALESCE ( 92, - col0 * 2 + + tab2.col0, tab2.col2 + + tab2.col2 ) FROM tab2 GROUP BY tab2.col0 query I rowsort @@ -36177,7 +36177,7 @@ SELECT ALL - 61 AS col2 FROM tab2 cor0 GROUP BY cor0.col1 # Datafusion - Expected - -570 # Datafusion - Expected - -60 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT + - tab1.col1 + COALESCE ( - 9, + tab1.col0 ) * + tab1.col1 FROM tab1 GROUP BY tab1.col1 query I rowsort @@ -36984,7 +36984,7 @@ SELECT - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -83 skipif postgres -query error DataFusion error: Error during planning: Projection references non\-aggregate values: Expression cor1\.col2 could not be resolved from available columns: cor1\.col1 +query error DataFusion error: Error during planning: Column in SELECT must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - COALESCE ( + 83, - cor1.col2 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1 query I rowsort @@ -45307,7 +45307,7 @@ SELECT + col1 AS col0 FROM tab0 GROUP BY col2, col1 HAVING - col1 IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING ( NULL ) < col2 query I rowsort @@ -45364,7 +45364,7 @@ SELECT + col0 col0 FROM tab2 AS cor0 GROUP BY col2, col0, col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col2 FROM tab2 GROUP BY col1 HAVING NOT NULL NOT IN ( - col2 ) query I rowsort @@ -48556,7 +48556,7 @@ SELECT DISTINCT col1 FROM tab0 AS cor0 GROUP BY col2, col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0, tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0 AS col2 FROM tab0 GROUP BY col0, col0 HAVING NOT - col2 NOT BETWEEN NULL AND NULL query I rowsort @@ -54056,7 +54056,7 @@ SELECT ALL + col2 FROM tab0 cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT + col2 AS col0 FROM tab2 GROUP BY col2 HAVING - col0 > NULL query I rowsort @@ -57313,7 +57313,7 @@ SELECT + col1 - + col1 AS col0 FROM tab1 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col1 HAVING NOT NULL <= - col0 query I rowsort @@ -59096,7 +59096,7 @@ SELECT + col0 col1 FROM tab0 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col1 col2 FROM tab1 GROUP BY col1 HAVING NOT NULL NOT BETWEEN + col2 AND - col2 query I rowsort @@ -59726,7 +59726,7 @@ SELECT ALL + col0 FROM tab2 GROUP BY col2, col0, col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 col0 FROM tab1 AS cor0 GROUP BY col1, col1 HAVING NOT + - col0 * - col1 BETWEEN NULL AND NULL query I rowsort @@ -64480,7 +64480,7 @@ SELECT ALL col2 AS col2, + col2 AS col0 FROM tab0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1, tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 AS col2 FROM tab2 GROUP BY col1, col0 HAVING NULL <= + col0 + + col2 query I rowsort diff --git a/data/sqlite/random/groupby/slt_good_9.slt b/data/sqlite/random/groupby/slt_good_9.slt index 826f1d8..e5ae98b 100644 --- a/data/sqlite/random/groupby/slt_good_9.slt +++ b/data/sqlite/random/groupby/slt_good_9.slt @@ -117,7 +117,7 @@ SELECT DISTINCT col0 AS col1 FROM tab1 GROUP BY col0, col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0 AS col2 FROM tab2 GROUP BY col0 HAVING NULL > ( col2 ) query I rowsort @@ -179,7 +179,7 @@ SELECT DISTINCT - col2 col0 FROM tab1 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, avg\(cor0\.col0\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, avg\(cor0\.col0\)" appears in the SELECT clause satisfies this requirement SELECT - AVG ( + + col0 ) AS col1 FROM tab2 AS cor0 GROUP BY col0 HAVING NOT col1 IS NULL AND NOT NULL IS NULL query I rowsort @@ -224,7 +224,7 @@ SELECT ALL - + col1 FROM tab1 AS cor0 GROUP BY col1, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL = col0 / col0 query I rowsort @@ -2692,7 +2692,7 @@ SELECT - + col1 + - col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 AS col2 FROM tab2 AS cor0 WHERE NULL IS NULL GROUP BY col1 HAVING NOT NULL >= + - col2 query I rowsort @@ -3833,7 +3833,7 @@ SELECT ALL - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT + col0 IS NULL AND NULL IS NOT NULL query I rowsort @@ -7078,7 +7078,7 @@ SELECT DISTINCT - + col0 + + - col0 AS col0 FROM tab0 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, col1 HAVING NOT ( NULL ) < - col1 + - col2 query I rowsort @@ -7472,7 +7472,7 @@ SELECT - col0 + + col0 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 AS col0 FROM tab1 GROUP BY col1 HAVING NULL IN ( - col1 * + col0 ) query II rowsort @@ -10810,7 +10810,7 @@ SELECT DISTINCT - col2 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT NULL <= NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 col0 FROM tab2 AS cor0 GROUP BY col1 HAVING NULL > col0 query II rowsort @@ -11464,7 +11464,7 @@ SELECT ALL - col0 FROM tab2 AS cor0 GROUP BY col0 HAVING NOT NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL >= + - col0 query I rowsort @@ -11831,7 +11831,7 @@ SELECT + AVG ( - col2 ) FROM tab2 WHERE NOT NULL >= col1 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2, tab2\.col1, tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col1, tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 AS col0 FROM tab2 GROUP BY col2, col1, col1 HAVING NULL BETWEEN - col0 AND NULL query I rowsort @@ -12142,7 +12142,7 @@ SELECT DISTINCT col1 AS col2 FROM tab2 AS cor0 GROUP BY col0, col1 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col2, tab0\.col1, avg\(DISTINCT \(\- tab0\.col2\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2, tab0\.col1, avg\(DISTINCT \(\- tab0\.col2\)\)" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 * + + AVG ( DISTINCT - col2 ) AS col0 FROM tab0 GROUP BY col2, col1 HAVING NOT NULL < + col0 + - col1 query I rowsort @@ -12610,7 +12610,7 @@ SELECT - col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, col1 HAVING NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0 AS col1 FROM tab2 GROUP BY col0 HAVING NOT + col1 < NULL query I rowsort @@ -16811,7 +16811,7 @@ SELECT - + col1 AS col0 FROM tab0 cor0 GROUP BY col2, col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1, tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1, tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT col1 AS col2 FROM tab1 GROUP BY col1, col0 HAVING NULL NOT BETWEEN NULL AND - col2 query I rowsort @@ -18535,13 +18535,13 @@ SELECT DISTINCT col0, col0 FROM tab1 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col2 HAVING NOT - col0 BETWEEN NULL AND ( NULL ) # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0, avg\(DISTINCT cor0\.col0\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, avg\(DISTINCT cor0\.col0\)" appears in the SELECT clause satisfies this requirement SELECT ALL - + AVG ( DISTINCT col0 ) AS col1 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT - col1 <= ( NULL ) query I rowsort @@ -19642,7 +19642,7 @@ SELECT ALL + + col0 * col0 AS col1 FROM tab0 WHERE NOT col0 IS NOT NULL GROUP BY # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - - col1 AS col2 FROM tab2 AS cor0 GROUP BY col1 HAVING col2 > NULL query I rowsort @@ -20095,7 +20095,7 @@ SELECT - col2 - col0 * col2 FROM tab0 AS cor0 WHERE + col2 IS NOT NULL GROUP BY # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - col2 AS col1 FROM tab0 AS cor0 WHERE NOT ( NOT ( ( NULL ) >= NULL ) ) GROUP BY col2 HAVING NOT ( col1 ) NOT BETWEEN NULL AND NULL query I rowsort @@ -21548,7 +21548,7 @@ SELECT DISTINCT + col0 AS col0 FROM tab1 AS cor0 WHERE NOT ( NULL ) <= NULL GROU # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1, tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 col2 FROM tab0 GROUP BY col1, col1 HAVING NOT col2 NOT BETWEEN NULL AND NULL query I rowsort @@ -21690,7 +21690,7 @@ SELECT DISTINCT + + col1 FROM tab1 AS cor0 GROUP BY col0, col2, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - + col2 col0 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL NOT IN ( col0 ) query I rowsort @@ -21704,7 +21704,7 @@ SELECT ALL - - col1 FROM tab0 cor0 GROUP BY col1 HAVING NOT - col1 IS NOT NULL O # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT + - col2 = NULL query I rowsort @@ -21805,7 +21805,7 @@ SELECT ALL - col1 FROM tab0 GROUP BY col1 HAVING NOT NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0, tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 AS col2 FROM tab1 GROUP BY col0, col0 HAVING NOT + + col2 < NULL query I rowsort @@ -22180,7 +22180,7 @@ SELECT + col1 col2 FROM tab0 WHERE - col1 IS NULL GROUP BY col1, col2 HAVING NUL # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2, tab2\.col2, tab2\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col2, tab2\.col0" appears in the SELECT clause satisfies this requirement SELECT - col0 AS col1 FROM tab2 GROUP BY col2, col2, col0 HAVING NOT NULL > col1 query I rowsort @@ -22318,7 +22318,7 @@ SELECT ALL - col1 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 col2 FROM tab2 AS cor0 WHERE NOT NULL IS NULL GROUP BY col1, col1 HAVING + col2 >= ( NULL ) query I rowsort @@ -23056,7 +23056,7 @@ SELECT - col0 col1 FROM tab1 AS cor0 WHERE NOT NULL IS NULL GROUP BY col0, col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col0 could not be resolved from available columns: tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col1 AS col0 FROM tab0 GROUP BY col1 HAVING NOT NULL >= - + col0 query I rowsort @@ -23144,7 +23144,7 @@ SELECT DISTINCT - col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2, cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2, cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + + col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, col2 HAVING NOT ( - col1 <= NULL ) query I rowsort @@ -25098,7 +25098,7 @@ SELECT + + col2 FROM tab2 cor0 GROUP BY col2 HAVING NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col1, tab0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col1, tab0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 col2 FROM tab0 GROUP BY col1, col1 HAVING ( NULL > col2 ) query I rowsort @@ -25699,7 +25699,7 @@ SELECT col1 * + + col1 FROM tab0 GROUP BY col1, col1 HAVING ( NULL ) <= NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0 + - col0 AS col2 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT NULL <= ( - col2 + col0 ) query I rowsort @@ -26289,7 +26289,7 @@ SELECT DISTINCT + col1 * col1 FROM tab2 GROUP BY col1, col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 AS col0 FROM tab0 cor0 WHERE NULL IS NOT NULL GROUP BY col1 HAVING NOT NULL > col0 query I rowsort @@ -27434,7 +27434,7 @@ SELECT ALL - col2 * + + col2 FROM tab0 GROUP BY col2, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col0 + + - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0 HAVING col1 > NULL query I rowsort @@ -28416,7 +28416,7 @@ SELECT - col2, col2 AS col2 FROM tab0 cor0 WHERE col0 IS NULL GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col2 * + col2 AS col0 FROM tab2 GROUP BY col2 HAVING + col0 >= ( NULL ) query I rowsort @@ -28764,7 +28764,7 @@ SELECT - col2 AS col2 FROM tab2 GROUP BY col2, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT ( col0 ) = NULL query I rowsort @@ -29068,7 +29068,7 @@ SELECT + col1 * - + col1 AS col0 FROM tab1 GROUP BY col1 HAVING NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, avg\(\(\- cor0\.col0\)\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, avg\(\(\- cor0\.col0\)\)" appears in the SELECT clause satisfies this requirement SELECT AVG ( ALL - col0 ) AS col2 FROM tab1 AS cor0 GROUP BY col0 HAVING + - col2 <= NULL query I rowsort @@ -31044,7 +31044,7 @@ SELECT ALL - col0 col1, col0 AS col1 FROM tab1 cor0 GROUP BY col1, col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2, tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2, tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - col2 AS col0 FROM tab2 GROUP BY col2, col1 HAVING NOT ( - col0 ) > ( NULL ) query I rowsort @@ -31268,7 +31268,7 @@ SELECT DISTINCT col0 FROM tab0 GROUP BY col0, col2 HAVING NOT NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0, tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col1 AS col2 FROM tab1 GROUP BY col0, col1 HAVING NOT NULL <= - col2 query I rowsort @@ -31836,7 +31836,7 @@ SELECT - col0 FROM tab2 AS cor0 WHERE NULL IS NOT NULL GROUP BY col0, col1 HAVIN # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 col0 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT + col0 = NULL query I rowsort @@ -31963,7 +31963,7 @@ SELECT - col0 FROM tab1 GROUP BY col0 HAVING ( NULL ) IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 AS col1 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT + - col1 >= NULL query I rowsort @@ -32729,7 +32729,7 @@ SELECT DISTINCT - col2 AS col1 FROM tab2 GROUP BY col2, col2 # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0, tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 AS col2 FROM tab0 GROUP BY col0, col0 HAVING NOT NULL >= + - col2 * + col0 query I rowsort @@ -32935,7 +32935,7 @@ SELECT DISTINCT + col0 FROM tab0 GROUP BY col0 HAVING ( NULL ) IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL col1 AS col0 FROM tab1 GROUP BY col1 HAVING NULL <> col0 query I rowsort @@ -33442,7 +33442,7 @@ SELECT + col2 AS col1 FROM tab2 AS cor0 WHERE NOT ( NULL ) BETWEEN NULL AND col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT NULL BETWEEN NULL AND - col2 * col0 query I rowsort @@ -33554,7 +33554,7 @@ SELECT AVG ( + - col1 ) FROM tab0 GROUP BY col0, col1 HAVING NOT col0 IS NOT NUL # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 - col1 AS col0 FROM tab2 GROUP BY col1 HAVING NOT ( NULL ) NOT BETWEEN NULL AND + col1 * - col0 query I rowsort @@ -34625,7 +34625,7 @@ SELECT - col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, col1 HAVING NOT NULL IS N # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL - col2 AS col1 FROM tab2 GROUP BY col2 HAVING NOT NULL BETWEEN - col1 AND NULL query I rowsort @@ -35737,7 +35737,7 @@ SELECT DISTINCT - col1 AS col2 FROM tab1 GROUP BY col1, col1 HAVING NOT ( - col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL - col0 col1 FROM tab1 GROUP BY col0 HAVING NOT col1 >= NULL query I rowsort @@ -35906,7 +35906,7 @@ SELECT col0 FROM tab0 GROUP BY col0 HAVING NOT NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0, cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0, cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col0 / - col1 + - col1 col2 FROM tab2 AS cor0 GROUP BY col0, col1 HAVING NOT NULL NOT BETWEEN + col2 AND NULL query I rowsort @@ -36519,7 +36519,7 @@ SELECT col0 AS col1 FROM tab1 GROUP BY col0, col1 HAVING NULL >= NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0 HAVING NULL <= ( + col2 ) query I rowsort @@ -37120,7 +37120,7 @@ SELECT col1 * - - col1 * + - AVG ( + col1 ) FROM tab0 GROUP BY col1, col1 HAVING # Postgresql - Postgres error: db error: ERROR: column "tab0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col1 could not be resolved from available columns: tab0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 col1 FROM tab0 GROUP BY col2 HAVING NOT - + col1 <> NULL query II rowsort @@ -38166,7 +38166,7 @@ SELECT ALL + col0 AS col1 FROM tab1 WHERE NULL <> - col2 * - col0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col2 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 AS col2 FROM tab2 GROUP BY col1 HAVING NULL < col2 query I rowsort @@ -38694,7 +38694,7 @@ SELECT ALL col1 AS col0 FROM tab1 GROUP BY col1 HAVING NULL < NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT - col0 >= NULL query I rowsort @@ -38947,7 +38947,7 @@ SELECT col2 FROM tab0 AS cor0 WHERE + col0 IS NOT NULL GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + col1 AS col0 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT ( NOT ( NULL ) <> col0 ) query I rowsort @@ -40380,7 +40380,7 @@ SELECT - + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT ALL col0 * col0 col1 FROM tab1 GROUP BY col0 HAVING NOT NULL NOT IN ( - col1 ) query I rowsort @@ -40952,7 +40952,7 @@ SELECT + col0 + col0 AS col2 FROM tab2 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT DISTINCT - col2 col1 FROM tab2 GROUP BY col2 HAVING ( NULL ) NOT IN ( col1 ) query II rowsort @@ -41153,7 +41153,7 @@ SELECT DISTINCT col0 col2 FROM tab2 WHERE NULL IS NOT NULL GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT col0 + + col0 AS col1 FROM tab2 AS cor0 GROUP BY col0 HAVING - + col1 * + col0 + col0 > NULL query I rowsort @@ -41351,7 +41351,7 @@ SELECT ALL + col2 AS col2 FROM tab2 GROUP BY col2, col1 HAVING NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 AS col0 FROM tab2 GROUP BY col2 HAVING NOT + + col0 < ( NULL ) query I rowsort label-6554 @@ -41525,7 +41525,7 @@ SELECT ALL - col2 FROM tab2 AS cor0 WHERE + col2 IS NULL GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col0 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL IS NULL OR ( col0 ) NOT BETWEEN NULL AND NULL query I rowsort @@ -42862,7 +42862,7 @@ SELECT + + col1 + col1 col2 FROM tab0 cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - col1 col2 FROM tab1 GROUP BY col1 HAVING NOT NULL < + + col2 query I rowsort @@ -43153,7 +43153,7 @@ SELECT - col2 AS col2 FROM tab1 WHERE NULL IS NULL GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1, avg\(tab2\.col1\) +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1, avg\(tab2\.col1\)" appears in the SELECT clause satisfies this requirement SELECT ALL + AVG ( + col1 ) AS col0 FROM tab2 GROUP BY col1 HAVING NOT NULL <> col0 query I rowsort label-6844 @@ -43386,7 +43386,7 @@ SELECT ALL - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col0 AS col2 FROM tab1 cor0 GROUP BY col0 HAVING NOT col2 NOT BETWEEN NULL AND NULL query I rowsort @@ -44164,7 +44164,7 @@ SELECT col2 * - col2 FROM tab0 AS cor0 WHERE NULL IS NOT NULL GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT + col2 col1 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL NOT IN ( col1 ) query I rowsort @@ -44331,7 +44331,7 @@ SELECT col2 * + col2 col1 FROM tab0 GROUP BY col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT + + col1 AS col2 FROM tab0 AS cor0 GROUP BY col1 HAVING ( NULL ) NOT BETWEEN NULL AND ( col2 ) query I rowsort @@ -44351,7 +44351,7 @@ SELECT + col0 AS col0 FROM tab1 cor0 GROUP BY col0, col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2, tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2, tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT DISTINCT col0 AS col1 FROM tab1 GROUP BY col2, col0 HAVING - col1 NOT BETWEEN ( NULL ) AND ( NULL ) query I rowsort @@ -48390,7 +48390,7 @@ SELECT DISTINCT col2 AS col2 FROM tab1 AS cor0 GROUP BY col0, col0, col2 # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col0, tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0, tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT col0 AS col2 FROM tab1 GROUP BY col0, col1 HAVING + + col1 * col2 + + + col2 * + - col2 > NULL query I rowsort @@ -50673,7 +50673,7 @@ SELECT - col1 - col1 FROM tab2 AS cor0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "cor0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col2 could not be resolved from available columns: cor0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col0" appears in the SELECT clause satisfies this requirement SELECT + + col0 col2 FROM tab0 cor0 GROUP BY col0 HAVING NOT NULL BETWEEN col2 AND + col0 query I rowsort @@ -52333,7 +52333,7 @@ SELECT ALL - col1 FROM tab0 GROUP BY col2, col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col0 could not be resolved from available columns: tab2\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL + col1 AS col0 FROM tab2 GROUP BY col1 HAVING NULL >= ( - col0 ) query I rowsort @@ -52806,7 +52806,7 @@ SELECT DISTINCT - col1 + + col1 FROM tab0 GROUP BY col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col0 FROM tab1 GROUP BY col1 HAVING NULL < + col0 # Datafusion - Datafusion expected results: @@ -52869,7 +52869,7 @@ SELECT + col0 + + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT DISTINCT + col1 AS col0 FROM tab0 AS cor0 GROUP BY col1 HAVING + col0 >= NULL query I rowsort @@ -53757,7 +53757,7 @@ SELECT ALL + col1 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col0" appears in the SELECT clause satisfies this requirement SELECT - col0 AS col1 FROM tab1 GROUP BY col0 HAVING NULL NOT BETWEEN ( NULL ) AND col1 query I rowsort @@ -54118,7 +54118,7 @@ SELECT ALL col1 FROM tab1 GROUP BY col0, col2, col1 # Postgresql - Postgres error: db error: ERROR: column "tab2.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab2\.col1 could not be resolved from available columns: tab2\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab2\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab2\.col2" appears in the SELECT clause satisfies this requirement SELECT col2 col1 FROM tab2 GROUP BY col2 HAVING NOT NULL = col1 query I rowsort @@ -55059,7 +55059,7 @@ SELECT - col2 AS col1 FROM tab0 GROUP BY col0, col2 # Postgresql - Postgres error: db error: ERROR: column "cor0.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col0 could not be resolved from available columns: cor0\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col1" appears in the SELECT clause satisfies this requirement SELECT - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT col0 < NULL # Datafusion - Datafusion expected results: @@ -56150,7 +56150,7 @@ SELECT DISTINCT col0 - col0 AS col2 FROM tab0 GROUP BY col0 # Postgresql - Postgres error: db error: ERROR: column "tab0.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab0\.col2 could not be resolved from available columns: tab0\.col0, tab0\.col0 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab0\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab0\.col0, tab0\.col0" appears in the SELECT clause satisfies this requirement SELECT + col0 AS col2 FROM tab0 GROUP BY col0, col0 HAVING NOT ( + - col2 ) <= ( NULL ) query I rowsort @@ -56881,7 +56881,7 @@ SELECT ALL - col0 col2 FROM tab0 GROUP BY col0 HAVING NOT NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "tab1.col2" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col2 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col2" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT ALL - col1 AS col2 FROM tab1 GROUP BY col1 HAVING NULL <> - col2 query I rowsort @@ -57699,7 +57699,7 @@ SELECT ALL col0 FROM tab1 AS cor0 GROUP BY col2, col0 # Postgresql - Postgres error: db error: ERROR: column "tab1.col0" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col0 could not be resolved from available columns: tab1\.col1 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col0" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col1" appears in the SELECT clause satisfies this requirement SELECT col1 AS col0 FROM tab1 WHERE NOT NULL <= ( - + col0 ) GROUP BY col1 HAVING NULL > ( col1 * + col0 ) query II rowsort @@ -60908,7 +60908,7 @@ SELECT col1 FROM tab0 GROUP BY col1, col0 HAVING NULL IS NULL # Postgresql - Postgres error: db error: ERROR: column "cor0.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression cor0\.col1 could not be resolved from available columns: cor0\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "cor0\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "cor0\.col2" appears in the SELECT clause satisfies this requirement SELECT - + col2 / + col2 AS col1 FROM tab1 AS cor0 GROUP BY col2 HAVING ( + col1 ) = ( NULL ) query I rowsort @@ -61467,7 +61467,7 @@ SELECT - - col2 col1, col1 FROM tab2 AS cor0 GROUP BY col1, col2, col1 # Postgresql - Postgres error: db error: ERROR: column "tab1.col1" must appear in the GROUP BY clause or be used in an aggregate function # Datafusion - Datafusion expected results: skipif postgres -query error DataFusion error: Error during planning: HAVING clause references non\-aggregate values: Expression tab1\.col1 could not be resolved from available columns: tab1\.col2 +query error DataFusion error: Error during planning: Column in HAVING must be in GROUP BY or an aggregate function: While expanding wildcard, column "tab1\.col1" must appear in the GROUP BY clause or must be part of an aggregate function, currently only "tab1\.col2" appears in the SELECT clause satisfies this requirement SELECT ALL col2 AS col1 FROM tab1 GROUP BY col2 HAVING + col1 + - col2 BETWEEN NULL AND NULL query I rowsort