diff --git a/data/sqlite/random/aggregates/slt_good_76.slt b/data/sqlite/random/aggregates/slt_good_76.slt index 7246856..139276c 100644 --- a/data/sqlite/random/aggregates/slt_good_76.slt +++ b/data/sqlite/random/aggregates/slt_good_76.slt @@ -32121,7 +32121,7 @@ SELECT DISTINCT + + 18 + - 84 AS col2 FROM tab2 AS cor0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 7549 # Datafusion - Expected - -117 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(81\) \* Int64\(92\) \+ \(\- min\(\(\- tab0\.col0\)\)\) AS col1" at position 0 and "Int64\(37\) \- Int64\(93\) \+ \(\- count\(Int64\(1\)\) AS count\(\*\) \+ Int64\(58\)\) AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(81\) \* Int64\(92\) \+ \(\- min\(\(\- tab0\.col0\)\)\) AS col1" at position 0 and "Int64\(37\) \- Int64\(93\) \+ \(\- \(count\(Int64\(1\)\) AS count\(\*\) \+ Int64\(58\)\)\) AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT 81 * 92 + - MIN ( ALL - col0 ) AS col1, 37 - + 93 + - ( COUNT ( * ) + 58 ) AS col1 FROM tab0 query II rowsort diff --git a/data/sqlite/random/expr/slt_good_0.slt b/data/sqlite/random/expr/slt_good_0.slt index 894108f..ca689aa 100644 --- a/data/sqlite/random/expr/slt_good_0.slt +++ b/data/sqlite/random/expr/slt_good_0.slt @@ -7451,7 +7451,7 @@ SELECT DISTINCT - + 56 # Datafusion - Datafusion expected results: # Datafusion - Expected - 100 # Datafusion - Expected - 19 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(99\) \+ count\(Int64\(1\)\) AS count\(\*\) AS col2" at position 0 and "Int64\(19\) \+ \(\- count\(Int64\(62\)\)\) / \(\- Int64\(34\) \* Int64\(90\)\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(99\) \+ count\(Int64\(1\)\) AS count\(\*\) AS col2" at position 0 and "Int64\(19\) \+ \(\- count\(Int64\(62\)\)\) / \(\- \(Int64\(34\) \* Int64\(90\)\)\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT 99 + COUNT ( * ) AS col2, 19 + - + COUNT ( 62 ) / - ( 34 * 90 ) col2 query II rowsort diff --git a/data/sqlite/random/expr/slt_good_101.slt b/data/sqlite/random/expr/slt_good_101.slt index 95d78bc..9bc4825 100644 --- a/data/sqlite/random/expr/slt_good_101.slt +++ b/data/sqlite/random/expr/slt_good_101.slt @@ -3539,7 +3539,7 @@ SELECT ALL - + COUNT ( ALL - 93 ) AS col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 73 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(73\) AS col0" at position 0 and "\(\- CASE Int64\(\-73\) WHEN Int64\(\-20\) \+ avg\(Int64\(61\)\) \+ coalesce\(Int64\(75\), \(\- Int64\(34\)\) \+ Int64\(\-83\)\) THEN Int64\(26\) \* Int64\(\-85\) WHEN \(\- \(\- coalesce\(CASE Int64\(69\) WHEN Int64\(80\) \- Int64\(98\) / count\(Int64\(1\)\) AS count\(\*\) \+ Int64\(64\) \- coalesce\(Int64\(94\), Int64\(12\) \+ CAST\(\(\- Int64\(83\)\) AS Int32\) / Int64\(\-94\), Int64\(\-49\) \+ Int64\(76\)\) / Int64\(35\) THEN NULL WHEN Int64\(18\) \* Int64\(69\) THEN Int64\(\-23\) ELSE Int64\(\-50\) \+ Int64\(53\) END, Int64\(41\) \* Int64\(37\) / Int64\(38\)\)\)\) \* \(\- CAST\(NULL AS Int32\) \+ Int64\(35\)\) \+ count\(Int64\(1\)\) AS count\(\*\) THEN Int64\(55\) \* Int64\(87\) END\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(73\) AS col0" at position 0 and "\(\- CASE Int64\(\-73\) WHEN Int64\(\-20\) \+ avg\(Int64\(61\)\) \+ coalesce\(Int64\(75\), \(\- Int64\(34\)\) \+ Int64\(\-83\)\) THEN Int64\(26\) \* Int64\(\-85\) WHEN \(\- \(\- coalesce\(CASE Int64\(69\) WHEN Int64\(80\) \- Int64\(98\) / count\(Int64\(1\)\) AS count\(\*\) \+ Int64\(64\) \- coalesce\(Int64\(94\), Int64\(12\) \+ CAST\(\(\- Int64\(83\)\) AS Int32\) / Int64\(\-94\), Int64\(\-49\) \+ Int64\(76\)\) / Int64\(35\) THEN NULL WHEN Int64\(18\) \* Int64\(69\) THEN Int64\(\-23\) ELSE Int64\(\-50\) \+ Int64\(53\) END, Int64\(41\) \* Int64\(37\) / Int64\(38\)\)\)\) \* \(\- \(CAST\(NULL AS Int32\) \+ Int64\(35\)\)\) \+ count\(Int64\(1\)\) AS count\(\*\) THEN Int64\(55\) \* Int64\(87\) END\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT DISTINCT 73 AS col0, - CASE - 73 WHEN - 20 + + AVG ( + 61 ) + + COALESCE ( + 75, - + 34 + - 83 ) THEN 26 * - 85 WHEN - - COALESCE ( + CASE 69 WHEN 80 - + + 98 / + + COUNT ( * ) + 64 - + COALESCE ( 94, + 12 + CAST ( - ( 83 ) AS INTEGER ) / - 94, - 49 + 76 ) / 35 THEN NULL WHEN + 18 * 69 THEN - 23 ELSE - 50 + 53 END, 41 * ( 37 / 38 ) ) * - ( CAST ( NULL AS INTEGER ) + 35 ) + COUNT ( * ) THEN 55 * 87 END col0 query I rowsort diff --git a/data/sqlite/random/expr/slt_good_104.slt b/data/sqlite/random/expr/slt_good_104.slt index 9e2c394..0a84699 100644 --- a/data/sqlite/random/expr/slt_good_104.slt +++ b/data/sqlite/random/expr/slt_good_104.slt @@ -3889,7 +3889,7 @@ SELECT ALL - 80 * 61 * + 30 # Datafusion - Datafusion expected results: # Datafusion - Expected - -67 # Datafusion - Expected - 489 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- sum\(\(\- Int64\(\-67\)\)\)\) AS col2" at position 0 and "Int64\(\-9\) \* CASE \(\- Int64\(\-4\)\) WHEN Int64\(\-50\) THEN \(\- Int64\(59\)\) \* \(\- Int64\(\-46\)\) \+ Int64\(99\) WHEN Int64\(\-70\) THEN Int64\(\-76\) \- \(\- min\(Int64\(\-91\)\)\) \+ Int64\(88\) \+ Int64\(34\) \* Int64\(33\) \* \(\- CAST\(NULL AS Int32\)\) \* \(\- count\(Int64\(1\)\) AS count\(\*\)\) \+ \(\- Int64\(33\)\) \+ coalesce\(\(\- \(\- CASE Int64\(\-5\) WHEN count\(Int64\(1\)\) AS count\(\*\) \* \(\- CASE Int64\(62\) WHEN Int64\(98\) \* Int64\(24\) \+ Int64\(\-35\) THEN \(\- min\(Int64\(46\)\)\) WHEN Int64\(47\) \+ Int64\(4\) \* sum\(CASE Int64\(99\) WHEN Int64\(14\) THEN Int64\(33\) ELSE Int64\(5\) END\) THEN NULL END\) \* CAST\(\(\- count\(Int64\(1\)\) AS count\(\*\)\) AS Int32\) \+ Int64\(20\) THEN count\(Int64\(1\)\) AS count\(\*\) \* Int64\(\-70\) \+ Int64\(\-80\) \* \(\- CAST\(CASE Int64\(74\) WHEN \(\- CAST\(\(\- count\(Int64\(1\)\) AS count\(\*\)\) AS Int32\)\) \* CAST\(count\(Int64\(67\)\) \* avg\(Int64\(17\)\) \+ Int64\(\-9\) AS Int32\) \+ Int64\(24\) \* Int64\(\-65\) THEN NULL WHEN count\(Int64\(1\)\) AS count\(\*\) THEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) ELSE Int64\(1\) END AS Int32\)\) ELSE NULL END\)\), Int64\(83\), Int64\(38\)\) WHEN Int64\(95\) \- coalesce\(Int64\(51\), Int64\(32\), Int64\(73\) \+ Int64\(50\)\) \* Int64\(27\) THEN NULL ELSE \(\- count\(Int64\(3\)\)\) END \+ \(\- coalesce\(count\(Int64\(1\)\) AS count\(\*\), Int64\(\-81\) \- count\(\(\- CAST\(Int64\(\-16\) AS Int32\)\)\) \* Int64\(69\)\) \+ Int64\(19\)\) \* Int64\(\-24\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- sum\(\(\- Int64\(\-67\)\)\)\) AS col2" at position 0 and "Int64\(\-9\) \* CASE \(\- Int64\(\-4\)\) WHEN Int64\(\-50\) THEN \(\- Int64\(59\)\) \* \(\- Int64\(\-46\)\) \+ Int64\(99\) WHEN Int64\(\-70\) THEN Int64\(\-76\) \- \(\- min\(Int64\(\-91\)\)\) \+ Int64\(88\) \+ Int64\(34\) \* Int64\(33\) \* \(\- CAST\(NULL AS Int32\)\) \* \(\- count\(Int64\(1\)\) AS count\(\*\)\) \+ \(\- Int64\(33\)\) \+ coalesce\(\(\- \(\- CASE Int64\(\-5\) WHEN count\(Int64\(1\)\) AS count\(\*\) \* \(\- CASE Int64\(62\) WHEN Int64\(98\) \* Int64\(24\) \+ Int64\(\-35\) THEN \(\- min\(Int64\(46\)\)\) WHEN Int64\(47\) \+ Int64\(4\) \* sum\(CASE Int64\(99\) WHEN Int64\(14\) THEN Int64\(33\) ELSE Int64\(5\) END\) THEN NULL END\) \* CAST\(\(\- count\(Int64\(1\)\) AS count\(\*\)\) AS Int32\) \+ Int64\(20\) THEN count\(Int64\(1\)\) AS count\(\*\) \* Int64\(\-70\) \+ Int64\(\-80\) \* \(\- CAST\(CASE Int64\(74\) WHEN \(\- CAST\(\(\- count\(Int64\(1\)\) AS count\(\*\)\) AS Int32\)\) \* CAST\(count\(Int64\(67\)\) \* avg\(Int64\(17\)\) \+ Int64\(\-9\) AS Int32\) \+ Int64\(24\) \* Int64\(\-65\) THEN NULL WHEN count\(Int64\(1\)\) AS count\(\*\) THEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) ELSE Int64\(1\) END AS Int32\)\) ELSE NULL END\)\), Int64\(83\), Int64\(38\)\) WHEN Int64\(95\) \- coalesce\(Int64\(51\), Int64\(32\), Int64\(73\) \+ Int64\(50\)\) \* Int64\(27\) THEN NULL ELSE \(\- count\(Int64\(3\)\)\) END \+ \(\- \(coalesce\(count\(Int64\(1\)\) AS count\(\*\), Int64\(\-81\) \- count\(\(\- CAST\(Int64\(\-16\) AS Int32\)\)\) \* Int64\(69\)\) \+ Int64\(19\)\)\) \* Int64\(\-24\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT DISTINCT - SUM ( ( - - 67 ) ) AS col2, - 9 * CASE - - 4 WHEN - 50 THEN - ( 59 ) * - - 46 + 99 WHEN - 70 THEN - 76 - - MIN ( ALL - 91 ) + + + 88 + ( + + 34 ) * + 33 * - CAST ( NULL AS INTEGER ) * - COUNT ( * ) + - + 33 + + COALESCE ( - - CASE - 5 WHEN + COUNT ( * ) * - + CASE + + 62 WHEN 98 * + + ( 24 ) + - 35 THEN - MIN ( + + 46 ) WHEN + 47 + 4 * + SUM ( ALL CASE 99 WHEN 14 THEN ( 33 ) ELSE 5 END ) THEN NULL END * CAST ( - COUNT ( * ) AS INTEGER ) + + 20 THEN + COUNT ( * ) * - 70 + - 80 * - CAST ( + CASE 74 WHEN - CAST ( - COUNT ( * ) AS INTEGER ) * CAST ( COUNT ( 67 ) * AVG ( ALL 17 ) + - 9 AS INTEGER ) + + 24 * ( - 65 ) THEN NULL WHEN COUNT ( * ) THEN - COUNT ( * ) ELSE 1 END AS INTEGER ) ELSE NULL END, 83, 38 ) WHEN + 95 - + COALESCE ( + 51, 32, 73 + 50 ) * + 27 THEN NULL ELSE - COUNT ( 3 ) END + - ( + COALESCE ( COUNT ( * ), - 81 - COUNT ( ALL - CAST ( - 16 AS INTEGER ) ) * 69 ) + 19 ) * - 24 AS col2 query I rowsort @@ -43172,7 +43172,7 @@ SELECT ALL - COUNT ( * ) * - ( + 58 ) # Datafusion - Datafusion expected results: # Datafusion - Expected - -5 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- Int64\(5\)\) AS col1" at position 0 and "CASE WHEN NOT Int64\(\-43\) NOT IN \(\[Int64\(33\) \* Int64\(65\), Int64\(\-31\)\]\) THEN NULL WHEN Int64\(\-41\) IN \(\[Int64\(73\) \* CASE Int64\(33\) WHEN Int64\(\-25\) THEN \(\- CAST\(NULL AS Int32\)\) ELSE NULL END\]\) THEN Int64\(64\) WHEN NOT CAST\(CASE Int64\(52\) WHEN count\(Int64\(1\)\) AS count\(\*\) THEN NULL WHEN Int64\(51\) THEN Int64\(\-68\) ELSE NULL END AS Int32\) = Int64\(50\) THEN NULL END \* Int64\(11\) \+ nullif\(Int64\(\-3\) \+ Int64\(51\), Int64\(32\)\) AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- Int64\(5\)\) AS col1" at position 0 and "CASE WHEN NOT Int64\(\-43\) NOT IN \(\[Int64\(33\) \* Int64\(65\), Int64\(\-31\)\]\) THEN NULL WHEN Int64\(\-41\) IN \(\[Int64\(73\) \* CASE Int64\(33\) WHEN Int64\(\-25\) THEN \(\- CAST\(NULL AS Int32\)\) ELSE NULL END\]\) THEN Int64\(64\) WHEN NOT \(CAST\(CASE Int64\(52\) WHEN count\(Int64\(1\)\) AS count\(\*\) THEN NULL WHEN Int64\(51\) THEN Int64\(\-68\) ELSE NULL END AS Int32\) = Int64\(50\)\) THEN NULL END \* Int64\(11\) \+ nullif\(Int64\(\-3\) \+ Int64\(51\), Int64\(32\)\) AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT - ( 5 ) AS col1, + CASE WHEN NOT - 43 NOT IN ( + + 33 * 65, - 31 ) THEN NULL WHEN ( + ( - 41 ) ) IN ( 73 * CASE + + 33 WHEN - 25 THEN - CAST ( NULL AS INTEGER ) ELSE NULL END ) THEN 64 WHEN NOT ( + CAST ( + CASE + 52 WHEN COUNT ( * ) THEN NULL WHEN 51 THEN - 68 ELSE NULL END AS INTEGER ) ) = 50 THEN NULL END * 11 + NULLIF ( ( - 3 ) + 51, 32 ) AS col1 query II rowsort label-8213 diff --git a/data/sqlite/random/expr/slt_good_115.slt b/data/sqlite/random/expr/slt_good_115.slt index 133313c..2b295f1 100644 --- a/data/sqlite/random/expr/slt_good_115.slt +++ b/data/sqlite/random/expr/slt_good_115.slt @@ -44658,7 +44658,7 @@ SELECT ALL + 47 + + + 19 # Datafusion - Datafusion expected results: # Datafusion - Expected - 76 # Datafusion - Expected - -1888 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(76\) AS col1" at position 0 and "CASE WHEN NOT Int64\(\-21\) > NULL THEN NULL ELSE Int64\(\-59\) \* sum\(Int64\(32\)\) END AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(76\) AS col1" at position 0 and "CASE WHEN NOT \(Int64\(\-21\) > NULL\) THEN NULL ELSE Int64\(\-59\) \* sum\(Int64\(32\)\) END AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT + 76 col1, CASE WHEN NOT ( - 21 > NULL ) THEN NULL ELSE - 59 * + SUM ( ALL 32 ) END AS col1 query II rowsort label-8497 diff --git a/data/sqlite/random/expr/slt_good_12.slt b/data/sqlite/random/expr/slt_good_12.slt index 11fb2f8..3d80a55 100644 --- a/data/sqlite/random/expr/slt_good_12.slt +++ b/data/sqlite/random/expr/slt_good_12.slt @@ -219,7 +219,7 @@ SELECT ALL - 79 + - + 87 AS col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - -3789 # Datafusion - Expected - -54 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(72\) \* \(\- Int64\(52\)\) \+ Int64\(\-45\) AS col2" at position 0 and "CASE sum\(\(\- \(\- CAST\(NULL AS Int32\)\)\)\) WHEN CAST\(NULL AS Float64\) \+ Int64\(38\) THEN \(\- Int64\(\-42\)\) \+ Int64\(\-28\) WHEN Int64\(\-62\) \* Int64\(41\) \- \(\- Int64\(24\)\) THEN CAST\(\(\- Int64\(\-36\)\) AS Int32\) WHEN Int64\(\-64\) \* Int64\(56\) \+ \(\- max\(Int64\(65\)\)\) THEN \(\- sum\(Int64\(80\)\)\) / Int64\(24\) \* count\(Int64\(1\)\) AS count\(\*\) \+ Int64\(\-71\) \+ CASE \(\- \(\- count\(Int64\(1\)\) AS count\(\*\)\)\) WHEN coalesce\(Int64\(62\), min\(Int64\(13\)\) \* Int64\(98\)\) \* Int64\(31\) \* Int64\(22\) \* CASE count\(Int64\(1\)\) AS count\(\*\) WHEN Int64\(75\) \- Int64\(\-17\) THEN Int64\(86\) \* \(\- Int64\(\-35\)\) \+ Int64\(38\) WHEN Int64\(20\) \* Int64\(47\) THEN \(\- Int64\(51\)\) WHEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) THEN NULL END THEN NULL WHEN CASE Int64\(62\) WHEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) THEN Int64\(23\) \* Int64\(55\) \- Int64\(66\) WHEN Int64\(88\) THEN Int64\(82\) \* \(\- \(\- CASE Int64\(\-16\) WHEN Int64\(47\) THEN Int64\(\-18\) END\) \* \(\- count\(Int64\(1\)\) AS count\(\*\)\)\) \- Int64\(\-15\) END / Int64\(24\) \+ Int64\(\-23\) THEN Int64\(96\) END \* \(\- \(\- count\(DISTINCT Int64\(24\)\)\) \* Int64\(\-3\) \+ count\(Int64\(1\)\) AS count\(\*\) \* Int64\(86\)\) ELSE Int64\(\-54\) END AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(72\) \* \(\- Int64\(52\)\) \+ Int64\(\-45\) AS col2" at position 0 and "CASE sum\(\(\- \(\- CAST\(NULL AS Int32\)\)\)\) WHEN CAST\(NULL AS Float64\) \+ Int64\(38\) THEN \(\- Int64\(\-42\)\) \+ Int64\(\-28\) WHEN Int64\(\-62\) \* Int64\(41\) \- \(\- Int64\(24\)\) THEN CAST\(\(\- Int64\(\-36\)\) AS Int32\) WHEN Int64\(\-64\) \* Int64\(56\) \+ \(\- max\(Int64\(65\)\)\) THEN \(\- sum\(Int64\(80\)\)\) / Int64\(24\) \* count\(Int64\(1\)\) AS count\(\*\) \+ Int64\(\-71\) \+ CASE \(\- \(\- count\(Int64\(1\)\) AS count\(\*\)\)\) WHEN coalesce\(Int64\(62\), min\(Int64\(13\)\) \* Int64\(98\)\) \* Int64\(31\) \* Int64\(22\) \* CASE count\(Int64\(1\)\) AS count\(\*\) WHEN Int64\(75\) \- Int64\(\-17\) THEN Int64\(86\) \* \(\- Int64\(\-35\)\) \+ Int64\(38\) WHEN Int64\(20\) \* Int64\(47\) THEN \(\- Int64\(51\)\) WHEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) THEN NULL END THEN NULL WHEN CASE Int64\(62\) WHEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) THEN Int64\(23\) \* Int64\(55\) \- Int64\(66\) WHEN Int64\(88\) THEN Int64\(82\) \* \(\- \(\(\- CASE Int64\(\-16\) WHEN Int64\(47\) THEN Int64\(\-18\) END\) \* \(\- count\(Int64\(1\)\) AS count\(\*\)\)\)\) \- Int64\(\-15\) END / Int64\(24\) \+ Int64\(\-23\) THEN Int64\(96\) END \* \(\- \(\(\- count\(DISTINCT Int64\(24\)\)\) \* Int64\(\-3\) \+ count\(Int64\(1\)\) AS count\(\*\) \* Int64\(86\)\)\) ELSE Int64\(\-54\) END AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT ALL 72 * - + 52 + - 45 AS col2, CASE + SUM ( ALL - - CAST ( NULL AS INTEGER ) ) WHEN CAST ( NULL AS FLOAT8 ) + 38 THEN - - 42 + - 28 WHEN - 62 * + 41 - - + 24 THEN + CAST ( - - 36 AS INTEGER ) WHEN - 64 * 56 + - MAX ( + 65 ) THEN - SUM ( 80 ) / 24 * COUNT ( * ) + + - 71 + + CASE - - COUNT ( * ) WHEN + COALESCE ( 62, + + MIN ( + 13 ) * + 98 ) * + 31 * 22 * + CASE COUNT ( * ) WHEN + 75 - - 17 THEN 86 * - - 35 + + + 38 WHEN + + 20 * + 47 THEN - + 51 WHEN + - COUNT ( * ) THEN NULL END THEN NULL WHEN CASE 62 WHEN - COUNT ( * ) THEN 23 * 55 - + 66 WHEN + 88 THEN + 82 * - ( - CASE - 16 WHEN 47 THEN + ( ( - 18 ) ) END * - COUNT ( * ) ) - - 15 END / 24 + - 23 THEN 96 END * - ( - COUNT ( DISTINCT 24 ) * - 3 + COUNT ( * ) * + 86 ) ELSE - 54 END col2 query II rowsort label-36 diff --git a/data/sqlite/random/expr/slt_good_14.slt b/data/sqlite/random/expr/slt_good_14.slt index 3eb7c96..bac962a 100644 --- a/data/sqlite/random/expr/slt_good_14.slt +++ b/data/sqlite/random/expr/slt_good_14.slt @@ -811,7 +811,7 @@ SELECT 75 - - ( 10 ) AS col0, COUNT ( * ) * - 80 AS col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL # Datafusion - Expected - 4484 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(0\) \+ count\(Int64\(1\)\) AS count\(\*\) \- \(\- CASE Int64\(\-37\) WHEN Int64\(\-50\) \* Int64\(\-84\) THEN Int64\(54\) \* Int64\(90\) ELSE NULL END\) AS col1" at position 0 and "Int64\(60\) \* Int64\(74\) \+ CASE Int64\(\-79\) WHEN Int64\(47\) THEN NULL WHEN Int64\(3\) \+ \(\- Int64\(28\) \+ Int64\(17\)\) THEN Int64\(54\) ELSE Int64\(44\) END AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(0\) \+ count\(Int64\(1\)\) AS count\(\*\) \- \(\- CASE Int64\(\-37\) WHEN Int64\(\-50\) \* Int64\(\-84\) THEN Int64\(54\) \* Int64\(90\) ELSE NULL END\) AS col1" at position 0 and "Int64\(60\) \* Int64\(74\) \+ CASE Int64\(\-79\) WHEN Int64\(47\) THEN NULL WHEN Int64\(3\) \+ \(\- \(Int64\(28\) \+ Int64\(17\)\)\) THEN Int64\(54\) ELSE Int64\(44\) END AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT ALL + 0 + + COUNT ( * ) - - CASE + - 37 WHEN - 50 * + - 84 THEN 54 * 90 ELSE NULL END AS col1, 60 * 74 + ( + CASE - 79 WHEN + 47 THEN NULL WHEN 3 + - ( + 28 + 17 ) THEN 54 ELSE 44 END ) AS col1 query I rowsort label-147 diff --git a/data/sqlite/random/expr/slt_good_16.slt b/data/sqlite/random/expr/slt_good_16.slt index 82d206c..43e2216 100644 --- a/data/sqlite/random/expr/slt_good_16.slt +++ b/data/sqlite/random/expr/slt_good_16.slt @@ -9387,7 +9387,7 @@ SELECT DISTINCT - 39 / - + 94 AS col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL # Datafusion - Expected - 85 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "CASE WHEN NOT Int64\(96\) <= Int64\(67\) \* CAST\(min\(DISTINCT Int64\(\-77\)\) AS Int32\) THEN \(\- CAST\(NULL AS Float64\)\) END AS col0" at position 0 and "Int64\(85\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "CASE WHEN NOT \(Int64\(96\) <= Int64\(67\) \* CAST\(min\(DISTINCT Int64\(\-77\)\) AS Int32\)\) THEN \(\- CAST\(NULL AS Float64\)\) END AS col0" at position 0 and "Int64\(85\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT ALL + CASE WHEN NOT + 96 <= + 67 * + + CAST ( MIN ( DISTINCT - 77 ) AS INTEGER ) THEN - CAST ( NULL AS FLOAT8 ) END AS col0, 85 AS col0 query I rowsort label-1775 diff --git a/data/sqlite/random/expr/slt_good_17.slt b/data/sqlite/random/expr/slt_good_17.slt index e8c7b8d..872f0f6 100644 --- a/data/sqlite/random/expr/slt_good_17.slt +++ b/data/sqlite/random/expr/slt_good_17.slt @@ -13808,7 +13808,7 @@ SELECT ALL - + 40 + - + 42 / COUNT ( * ) AS col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 84 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(84\) AS col0" at position 0 and "count\(Int64\(1\)\) AS count\(\*\) \+ \(\- CAST\(CASE Int64\(69\) WHEN Int64\(64\) \+ \(\- Int64\(\-41\)\) \* Int64\(40\) \- Int64\(9\) \+ Int64\(14\) THEN Int64\(39\) \* \(\- Int64\(\-89\)\) \- Int64\(\-73\) \+ Int64\(20\) / Int64\(37\) \* Int64\(14\) WHEN \(\- min\(Int64\(\-4\)\)\) \* \(\- Int64\(61\) \* Int64\(76\) \+ Int64\(24\)\) THEN Int64\(4\) \* Int64\(4\) \- Int64\(55\) \* Int64\(34\) WHEN CASE Int64\(95\) WHEN Int64\(\-12\) THEN Int64\(\-64\) \+ Int64\(\-40\) / Int64\(54\) END THEN NULL ELSE NULL END AS Int32\)\) \- Int64\(27\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(84\) AS col0" at position 0 and "count\(Int64\(1\)\) AS count\(\*\) \+ \(\- CAST\(CASE Int64\(69\) WHEN Int64\(64\) \+ \(\- Int64\(\-41\)\) \* Int64\(40\) \- Int64\(9\) \+ Int64\(14\) THEN Int64\(39\) \* \(\- Int64\(\-89\)\) \- Int64\(\-73\) \+ Int64\(20\) / Int64\(37\) \* Int64\(14\) WHEN \(\- min\(Int64\(\-4\)\)\) \* \(\- \(Int64\(61\) \* Int64\(76\) \+ Int64\(24\)\)\) THEN Int64\(4\) \* Int64\(4\) \- Int64\(55\) \* Int64\(34\) WHEN CASE Int64\(95\) WHEN Int64\(\-12\) THEN Int64\(\-64\) \+ Int64\(\-40\) / Int64\(54\) END THEN NULL ELSE NULL END AS Int32\)\) \- Int64\(27\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT DISTINCT 84 AS col0, + COUNT ( * ) + - + CAST ( + + CASE + 69 WHEN 64 + - - 41 * + 40 - 9 + + 14 THEN + 39 * + ( - - 89 ) - - 73 + + 20 / + 37 * + 14 WHEN + - MIN ( ALL - 4 ) * - ( 61 * 76 + + 24 ) THEN 4 * + 4 - 55 * 34 WHEN CASE 95 WHEN - 12 THEN - 64 + - 40 / 54 END THEN NULL ELSE NULL END AS INTEGER ) - 27 col0 query I rowsort label-2617 diff --git a/data/sqlite/random/expr/slt_good_26.slt b/data/sqlite/random/expr/slt_good_26.slt index 58d48e9..6bc1857 100644 --- a/data/sqlite/random/expr/slt_good_26.slt +++ b/data/sqlite/random/expr/slt_good_26.slt @@ -5893,7 +5893,7 @@ SELECT + 72, 10 + - + 93 * - NULLIF ( + ( - 41 ), - 47 ) + + - 59 AS col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -383 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(\-63\) \* Int64\(7\) \+ Int64\(58\) AS col0" at position 0 and "CASE coalesce\(avg\(DISTINCT \(\- \(\- Int64\(88\)\)\)\), Int64\(69\)\) WHEN Int64\(\-58\) THEN Int64\(60\) END \+ Int64\(\-66\) \- \(\- CAST\(NULL AS Int32\)\) \+ coalesce\(Int64\(\-9\), CASE coalesce\(Int64\(10\), Int64\(21\), count\(Int64\(1\)\) AS count\(\*\)\) WHEN coalesce\(Int64\(\-68\), Int64\(87\) \+ Int64\(76\) \* CASE Int64\(6\) / Int64\(\-80\) WHEN Int64\(59\) \+ \(\- nullif\(Int64\(73\) \- Int64\(15\) / Int64\(22\), Int64\(78\) \+ \(\- sum\(Int64\(74\) \+ CAST\(NULL AS Int32\)\)\)\)\) \* Int64\(\-85\) THEN Int64\(57\) \* Int64\(93\) \+ coalesce\(Int64\(\-38\), Int64\(3\)\) \* Int64\(\-43\) WHEN Int64\(78\) \+ \(\- Int64\(44\) \+ Int64\(49\) \* \(\- count\(Int64\(1\)\) AS count\(\*\)\)\) THEN NULL END, Int64\(33\) \* Int64\(\-56\) \+ count\(Int64\(1\)\) AS count\(\*\) \* Int64\(76\), Int64\(\-93\) \* Int64\(\-36\)\) \+ \(\- Int64\(87\) \+ Int64\(11\)\) \* Int64\(96\) THEN Int64\(\-37\) ELSE count\(Int64\(1\)\) AS count\(\*\) / Int64\(78\) END \* Int64\(57\)\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(\-63\) \* Int64\(7\) \+ Int64\(58\) AS col0" at position 0 and "CASE coalesce\(avg\(DISTINCT \(\- \(\- Int64\(88\)\)\)\), Int64\(69\)\) WHEN Int64\(\-58\) THEN Int64\(60\) END \+ Int64\(\-66\) \- \(\- CAST\(NULL AS Int32\)\) \+ coalesce\(Int64\(\-9\), CASE coalesce\(Int64\(10\), Int64\(21\), count\(Int64\(1\)\) AS count\(\*\)\) WHEN coalesce\(Int64\(\-68\), Int64\(87\) \+ Int64\(76\) \* CASE Int64\(6\) / Int64\(\-80\) WHEN Int64\(59\) \+ \(\- nullif\(Int64\(73\) \- Int64\(15\) / Int64\(22\), Int64\(78\) \+ \(\- sum\(Int64\(74\) \+ CAST\(NULL AS Int32\)\)\)\)\) \* Int64\(\-85\) THEN Int64\(57\) \* Int64\(93\) \+ coalesce\(Int64\(\-38\), Int64\(3\)\) \* Int64\(\-43\) WHEN Int64\(78\) \+ \(\- \(Int64\(44\) \+ Int64\(49\) \* \(\- count\(Int64\(1\)\) AS count\(\*\)\)\)\) THEN NULL END, Int64\(33\) \* Int64\(\-56\) \+ count\(Int64\(1\)\) AS count\(\*\) \* Int64\(76\), Int64\(\-93\) \* Int64\(\-36\)\) \+ \(\- \(Int64\(87\) \+ Int64\(11\)\)\) \* Int64\(96\) THEN Int64\(\-37\) ELSE count\(Int64\(1\)\) AS count\(\*\) / Int64\(78\) END \* Int64\(57\)\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT - 63 * + 7 + 58 AS col0, CASE COALESCE ( AVG ( DISTINCT - - ( 88 ) ), + 69 ) WHEN - 58 THEN + + 60 END + + - 66 - - CAST ( NULL AS INTEGER ) + COALESCE ( + - 9, + CASE + COALESCE ( + 10, 21, COUNT ( * ) ) WHEN + COALESCE ( - 68, + 87 + 76 * CASE 6 / - 80 WHEN + 59 + - NULLIF ( 73 - 15 / 22, 78 + - SUM ( ALL + 74 + CAST ( NULL AS INTEGER ) ) ) * - 85 THEN 57 * + 93 + COALESCE ( ( - 38 ), 3 ) * - 43 WHEN + 78 + - ( 44 + + 49 * - COUNT ( * ) ) THEN NULL END, + 33 * - 56 + + COUNT ( * ) * 76, + ( - 93 ) * - 36 ) + - ( 87 + + 11 ) * 96 THEN - 37 ELSE COUNT ( * ) / 78 END * 57 ) AS col0 query I rowsort label-1121 @@ -49781,7 +49781,7 @@ SELECT DISTINCT - + 56 # Datafusion - Datafusion expected results: # Datafusion - Expected - 100 # Datafusion - Expected - 19 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(99\) \+ count\(Int64\(1\)\) AS count\(\*\) AS col2" at position 0 and "Int64\(19\) \+ \(\- count\(Int64\(62\)\)\) / \(\- Int64\(34\) \* Int64\(90\)\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(99\) \+ count\(Int64\(1\)\) AS count\(\*\) AS col2" at position 0 and "Int64\(19\) \+ \(\- count\(Int64\(62\)\)\) / \(\- \(Int64\(34\) \* Int64\(90\)\)\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT 99 + COUNT ( * ) AS col2, 19 + - + COUNT ( 62 ) / - ( 34 * 90 ) col2 query II rowsort diff --git a/data/sqlite/random/expr/slt_good_33.slt b/data/sqlite/random/expr/slt_good_33.slt index cb1e27f..455d69a 100644 --- a/data/sqlite/random/expr/slt_good_33.slt +++ b/data/sqlite/random/expr/slt_good_33.slt @@ -13607,7 +13607,7 @@ SELECT + 72, 10 + - + 93 * - NULLIF ( + ( - 41 ), - 47 ) + + - 59 AS col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -383 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(\-63\) \* Int64\(7\) \+ Int64\(58\) AS col0" at position 0 and "CASE coalesce\(avg\(DISTINCT \(\- \(\- Int64\(88\)\)\)\), Int64\(69\)\) WHEN Int64\(\-58\) THEN Int64\(60\) END \+ Int64\(\-66\) \- \(\- CAST\(NULL AS Int32\)\) \+ coalesce\(Int64\(\-9\), CASE coalesce\(Int64\(10\), Int64\(21\), count\(Int64\(1\)\) AS count\(\*\)\) WHEN coalesce\(Int64\(\-68\), Int64\(87\) \+ Int64\(76\) \* CASE Int64\(6\) / Int64\(\-80\) WHEN Int64\(59\) \+ \(\- nullif\(Int64\(73\) \- Int64\(15\) / Int64\(22\), Int64\(78\) \+ \(\- sum\(Int64\(74\) \+ CAST\(NULL AS Int32\)\)\)\)\) \* Int64\(\-85\) THEN Int64\(57\) \* Int64\(93\) \+ coalesce\(Int64\(\-38\), Int64\(3\)\) \* Int64\(\-43\) WHEN Int64\(78\) \+ \(\- Int64\(44\) \+ Int64\(49\) \* \(\- count\(Int64\(1\)\) AS count\(\*\)\)\) THEN NULL END, Int64\(33\) \* Int64\(\-56\) \+ count\(Int64\(1\)\) AS count\(\*\) \* Int64\(76\), Int64\(\-93\) \* Int64\(\-36\)\) \+ \(\- Int64\(87\) \+ Int64\(11\)\) \* Int64\(96\) THEN Int64\(\-37\) ELSE count\(Int64\(1\)\) AS count\(\*\) / Int64\(78\) END \* Int64\(57\)\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(\-63\) \* Int64\(7\) \+ Int64\(58\) AS col0" at position 0 and "CASE coalesce\(avg\(DISTINCT \(\- \(\- Int64\(88\)\)\)\), Int64\(69\)\) WHEN Int64\(\-58\) THEN Int64\(60\) END \+ Int64\(\-66\) \- \(\- CAST\(NULL AS Int32\)\) \+ coalesce\(Int64\(\-9\), CASE coalesce\(Int64\(10\), Int64\(21\), count\(Int64\(1\)\) AS count\(\*\)\) WHEN coalesce\(Int64\(\-68\), Int64\(87\) \+ Int64\(76\) \* CASE Int64\(6\) / Int64\(\-80\) WHEN Int64\(59\) \+ \(\- nullif\(Int64\(73\) \- Int64\(15\) / Int64\(22\), Int64\(78\) \+ \(\- sum\(Int64\(74\) \+ CAST\(NULL AS Int32\)\)\)\)\) \* Int64\(\-85\) THEN Int64\(57\) \* Int64\(93\) \+ coalesce\(Int64\(\-38\), Int64\(3\)\) \* Int64\(\-43\) WHEN Int64\(78\) \+ \(\- \(Int64\(44\) \+ Int64\(49\) \* \(\- count\(Int64\(1\)\) AS count\(\*\)\)\)\) THEN NULL END, Int64\(33\) \* Int64\(\-56\) \+ count\(Int64\(1\)\) AS count\(\*\) \* Int64\(76\), Int64\(\-93\) \* Int64\(\-36\)\) \+ \(\- \(Int64\(87\) \+ Int64\(11\)\)\) \* Int64\(96\) THEN Int64\(\-37\) ELSE count\(Int64\(1\)\) AS count\(\*\) / Int64\(78\) END \* Int64\(57\)\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT - 63 * + 7 + 58 AS col0, CASE COALESCE ( AVG ( DISTINCT - - ( 88 ) ), + 69 ) WHEN - 58 THEN + + 60 END + + - 66 - - CAST ( NULL AS INTEGER ) + COALESCE ( + - 9, + CASE + COALESCE ( + 10, 21, COUNT ( * ) ) WHEN + COALESCE ( - 68, + 87 + 76 * CASE 6 / - 80 WHEN + 59 + - NULLIF ( 73 - 15 / 22, 78 + - SUM ( ALL + 74 + CAST ( NULL AS INTEGER ) ) ) * - 85 THEN 57 * + 93 + COALESCE ( ( - 38 ), 3 ) * - 43 WHEN + 78 + - ( 44 + + 49 * - COUNT ( * ) ) THEN NULL END, + 33 * - 56 + + COUNT ( * ) * 76, + ( - 93 ) * - 36 ) + - ( 87 + + 11 ) * 96 THEN - 37 ELSE COUNT ( * ) / 78 END * 57 ) AS col0 query I rowsort label-2597 diff --git a/data/sqlite/random/expr/slt_good_39.slt b/data/sqlite/random/expr/slt_good_39.slt index d1d337d..3e0a740 100644 --- a/data/sqlite/random/expr/slt_good_39.slt +++ b/data/sqlite/random/expr/slt_good_39.slt @@ -47772,7 +47772,7 @@ SELECT ALL COUNT ( * ) + 51 AS col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 1327 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(16\) \* Int64\(76\) \+ Int64\(91\) \+ Int64\(20\) AS col1" at position 0 and "Int64\(76\) \* Int64\(15\) \* CAST\(\(\- CAST\(CASE Int64\(\-23\) WHEN Int64\(71\) THEN Int64\(0\) / max\(Int64\(2\)\) END AS Int32\)\) AS Int32\) / nullif\(Int64\(13\) \+ \(\- Int64\(63\) \+ Int64\(13\)\), \(\- Int64\(55\)\) \+ Int64\(97\) \* Int64\(90\)\) \+ nullif\(Int64\(2\), Int64\(1\) \* Int64\(\-71\) \- count\(Int64\(1\)\) AS count\(\*\) \* Int64\(25\)\) AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(16\) \* Int64\(76\) \+ Int64\(91\) \+ Int64\(20\) AS col1" at position 0 and "Int64\(76\) \* Int64\(15\) \* CAST\(\(\- CAST\(CASE Int64\(\-23\) WHEN Int64\(71\) THEN Int64\(0\) / max\(Int64\(2\)\) END AS Int32\)\) AS Int32\) / nullif\(Int64\(13\) \+ \(\- \(Int64\(63\) \+ Int64\(13\)\)\), \(\- Int64\(55\)\) \+ Int64\(97\) \* Int64\(90\)\) \+ nullif\(Int64\(2\), Int64\(1\) \* Int64\(\-71\) \- count\(Int64\(1\)\) AS count\(\*\) \* Int64\(25\)\) AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT 16 * + 76 + + 91 + + 20 col1, 76 * 15 * + CAST ( - CAST ( + CASE + - 23 WHEN 71 THEN + 0 / MAX ( + + 2 ) END AS INTEGER ) AS INTEGER ) / NULLIF ( 13 + - ( 63 + 13 ), - ( 55 ) + 97 * 90 ) + NULLIF ( 2, 1 * - 71 - + COUNT ( * ) * 25 ) col1 query I rowsort diff --git a/data/sqlite/random/expr/slt_good_4.slt b/data/sqlite/random/expr/slt_good_4.slt index cc73b2f..2deab08 100644 --- a/data/sqlite/random/expr/slt_good_4.slt +++ b/data/sqlite/random/expr/slt_good_4.slt @@ -18356,7 +18356,7 @@ SELECT + COUNT ( * ) + - - 73 AS col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 111 # Datafusion - Expected - 5310 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(83\) \+ Int64\(28\) AS col2" at position 0 and "Int64\(3\) \* Int64\(\-74\) \+ nullif\(\(\- \(\- CASE Int64\(11\) WHEN CASE WHEN Int64\(87\) != Int64\(92\) \* Int64\(43\) AND NOT Int64\(\-72\) \* Int64\(82\) \* count\(Int64\(1\)\) AS count\(\*\) \* Int64\(\-84\) IS NULL THEN Int64\(90\) WHEN NOT NULL > Int64\(\-29\) THEN Int64\(68\) ELSE \(\- coalesce\(nullif\(Int64\(7\), Int64\(97\)\), \(\- CASE Int64\(93\) WHEN Int64\(3\) \* Int64\(\-65\) \+ Int64\(\-86\) THEN Int64\(71\) / Int64\(\-95\) WHEN Int64\(1\) / Int64\(48\) THEN NULL ELSE Int64\(34\) / CAST\(Int64\(98\) / Int64\(45\) AS Int32\) END\)\)\) END THEN NULL WHEN min\(Int64\(77\)\) THEN \(\- max\(Int64\(11\)\)\) \* Int64\(74\) \+ Int64\(32\) ELSE Int64\(\-73\) END\)\), Int64\(\-14\) \+ Int64\(51\)\) \+ Int64\(95\) \* Int64\(59\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(83\) \+ Int64\(28\) AS col2" at position 0 and "Int64\(3\) \* Int64\(\-74\) \+ nullif\(\(\- \(\- CASE Int64\(11\) WHEN CASE WHEN Int64\(87\) != Int64\(92\) \* Int64\(43\) AND NOT Int64\(\-72\) \* Int64\(82\) \* count\(Int64\(1\)\) AS count\(\*\) \* Int64\(\-84\) IS NULL THEN Int64\(90\) WHEN NOT \(NULL > Int64\(\-29\)\) THEN Int64\(68\) ELSE \(\- coalesce\(nullif\(Int64\(7\), Int64\(97\)\), \(\- CASE Int64\(93\) WHEN Int64\(3\) \* Int64\(\-65\) \+ Int64\(\-86\) THEN Int64\(71\) / Int64\(\-95\) WHEN Int64\(1\) / Int64\(48\) THEN NULL ELSE Int64\(34\) / CAST\(Int64\(98\) / Int64\(45\) AS Int32\) END\)\)\) END THEN NULL WHEN min\(Int64\(77\)\) THEN \(\- max\(Int64\(11\)\)\) \* Int64\(74\) \+ Int64\(32\) ELSE Int64\(\-73\) END\)\), Int64\(\-14\) \+ Int64\(51\)\) \+ Int64\(95\) \* Int64\(59\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT ALL ( + 83 ) + + 28 AS col2, 3 * - 74 + NULLIF ( - - CASE 11 WHEN CASE WHEN 87 <> + + 92 * + 43 AND NOT - 72 * + 82 * COUNT ( * ) * - 84 IS NULL THEN 90 WHEN NOT ( NULL ) > - 29 THEN + 68 ELSE - COALESCE ( + NULLIF ( + 7, ( 97 ) ), - CASE 93 WHEN + 3 * - 65 + - 86 THEN + 71 / - 95 WHEN 1 / 48 THEN NULL ELSE + 34 / CAST ( 98 / + 45 AS INTEGER ) END ) END THEN NULL WHEN + MIN ( + 77 ) THEN - MAX ( 11 ) * ( + 74 ) + 32 ELSE - 73 END, - 14 + 51 ) + + 95 * 59 AS col2 query I rowsort @@ -21218,7 +21218,7 @@ SELECT ALL - 26 * - - MAX ( ALL + + 12 ) AS col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -7254 # Datafusion - Expected - -4674 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(58\) \- \(\- CASE WHEN NOT NULL < Int64\(71\) THEN Int64\(88\) ELSE Int64\(\-83\) \* Int64\(88\) END\) \- Int64\(8\) AS col0" at position 0 and "Int64\(71\) \* Int64\(\-67\) \- Int64\(\-83\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(58\) \- \(\- CASE WHEN NOT \(NULL < Int64\(71\)\) THEN Int64\(88\) ELSE Int64\(\-83\) \* Int64\(88\) END\) \- Int64\(8\) AS col0" at position 0 and "Int64\(71\) \* Int64\(\-67\) \- Int64\(\-83\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT 58 - - CASE WHEN NOT NULL < 71 THEN 88 ELSE - 83 * + ( + 88 ) END - 8 col0, + 71 * - 67 - - 83 AS col0 query I rowsort diff --git a/data/sqlite/random/expr/slt_good_44.slt b/data/sqlite/random/expr/slt_good_44.slt index 6051b88..f11eb45 100644 --- a/data/sqlite/random/expr/slt_good_44.slt +++ b/data/sqlite/random/expr/slt_good_44.slt @@ -8928,7 +8928,7 @@ SELECT 32, - 23 AS col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - -43 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(\-43\) AS col2" at position 0 and "Int64\(\-4\) \+ \(\- coalesce\(nullif\(\(\- Int64\(\-50\)\), \(\- nullif\(count\(Int64\(1\)\) AS count\(\*\), Int64\(85\) / Int64\(48\) \- \(\- Int64\(68\)\)\)\)\), CAST\(NULL AS Int32\), Int64\(9\) \* Int64\(\-69\) \+ coalesce\(\(\- Int64\(\-26\)\), Int64\(\-13\), Int64\(\-16\) \- Int64\(66\) \* CAST\(Int64\(\-22\) \+ Int64\(\-93\) \* Int64\(\-31\) AS Int32\)\)\)\) \+ Int64\(7\) \* \(\- CASE Int64\(\-87\) WHEN Int64\(77\) THEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) \+ \(\- Int64\(25\) \+ Int64\(60\)\) \* Int64\(\-94\) WHEN Int64\(41\) THEN Int64\(69\) \+ Int64\(25\) END\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(\-43\) AS col2" at position 0 and "Int64\(\-4\) \+ \(\- coalesce\(nullif\(\(\- Int64\(\-50\)\), \(\- nullif\(count\(Int64\(1\)\) AS count\(\*\), Int64\(85\) / Int64\(48\) \- \(\- Int64\(68\)\)\)\)\), CAST\(NULL AS Int32\), Int64\(9\) \* Int64\(\-69\) \+ coalesce\(\(\- Int64\(\-26\)\), Int64\(\-13\), Int64\(\-16\) \- Int64\(66\) \* CAST\(Int64\(\-22\) \+ Int64\(\-93\) \* Int64\(\-31\) AS Int32\)\)\)\) \+ Int64\(7\) \* \(\- CASE Int64\(\-87\) WHEN Int64\(77\) THEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) \+ \(\- \(Int64\(25\) \+ Int64\(60\)\)\) \* Int64\(\-94\) WHEN Int64\(41\) THEN Int64\(69\) \+ Int64\(25\) END\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT - 43 col2, - 4 + - COALESCE ( NULLIF ( - - 50, - NULLIF ( COUNT ( * ), 85 / + 48 - - + 68 ) ), + CAST ( NULL AS INTEGER ), 9 * - 69 + COALESCE ( - - 26, - 13, - 16 - 66 * CAST ( - 22 + - 93 * - 31 AS INTEGER ) ) ) + ( 7 ) * ( - CASE - 87 WHEN 77 THEN - ( COUNT ( * ) ) + - ( + 25 + + 60 ) * - 94 WHEN 41 THEN 69 + + 25 END ) col2 query I rowsort label-1700 @@ -43512,7 +43512,7 @@ NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - -97 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(\-26\) \- Int64\(71\) AS col2" at position 0 and "Int64\(57\) \* Int64\(\-77\) / \(\- Int64\(10\)\) \+ Int64\(\-98\) \* min\(Int64\(\-53\)\) \* Int64\(\-89\) \* count\(Int64\(1\)\) AS count\(\*\) \- Int64\(88\) / CASE Int64\(33\) WHEN \(\- CASE nullif\(Int64\(33\), \(\- coalesce\(Int64\(90\), \(\- CASE Int64\(21\) WHEN Int64\(\-53\) THEN Int64\(34\) END\) \+ count\(Int64\(52\)\)\)\)\) WHEN Int64\(12\) \* Int64\(59\) THEN Int64\(\-81\) \+ \(\- \(\- avg\(DISTINCT Int64\(24\)\)\) \+ CAST\(Int64\(\-63\) AS Float64\)\) / Int64\(\-64\) END\) \- avg\(DISTINCT Int64\(59\)\) THEN Int64\(33\) \+ Int64\(\-58\) \* Int64\(\-98\) WHEN Int64\(\-46\) THEN Int64\(\-9\) WHEN Int64\(\-77\) \+ CAST\(Int64\(\-64\) AS Int32\) THEN NULL ELSE NULL END \- Int64\(6\) \* Int64\(21\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(\-26\) \- Int64\(71\) AS col2" at position 0 and "Int64\(57\) \* Int64\(\-77\) / \(\- Int64\(10\)\) \+ Int64\(\-98\) \* min\(Int64\(\-53\)\) \* Int64\(\-89\) \* count\(Int64\(1\)\) AS count\(\*\) \- Int64\(88\) / CASE Int64\(33\) WHEN \(\- CASE nullif\(Int64\(33\), \(\- coalesce\(Int64\(90\), \(\- CASE Int64\(21\) WHEN Int64\(\-53\) THEN Int64\(34\) END\) \+ count\(Int64\(52\)\)\)\)\) WHEN Int64\(12\) \* Int64\(59\) THEN Int64\(\-81\) \+ \(\- \(\(\- avg\(DISTINCT Int64\(24\)\)\) \+ CAST\(Int64\(\-63\) AS Float64\)\)\) / Int64\(\-64\) END\) \- avg\(DISTINCT Int64\(59\)\) THEN Int64\(33\) \+ Int64\(\-58\) \* Int64\(\-98\) WHEN Int64\(\-46\) THEN Int64\(\-9\) WHEN Int64\(\-77\) \+ CAST\(Int64\(\-64\) AS Int32\) THEN NULL ELSE NULL END \- Int64\(6\) \* Int64\(21\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT - 26 - 71 AS col2, 57 * - 77 / - + 10 + + - 98 * MIN ( ALL + - 53 ) * - 89 * ( COUNT ( * ) ) - + 88 / + CASE 33 WHEN - CASE + NULLIF ( 33, - COALESCE ( ( + 90 ), - CASE + 21 WHEN - 53 THEN + 34 END + COUNT ( 52 ) ) ) WHEN 12 * + 59 THEN - 81 + - ( - AVG ( DISTINCT + 24 ) + CAST ( - 63 AS FLOAT8 ) ) / - 64 END - AVG ( DISTINCT 59 ) THEN 33 + - 58 * - 98 WHEN - 46 THEN - 9 WHEN - 77 + CAST ( - 64 AS INTEGER ) THEN NULL ELSE NULL END - 6 * + 21 AS col2 query I rowsort diff --git a/data/sqlite/random/expr/slt_good_51.slt b/data/sqlite/random/expr/slt_good_51.slt index 4e525a3..6b01d96 100644 --- a/data/sqlite/random/expr/slt_good_51.slt +++ b/data/sqlite/random/expr/slt_good_51.slt @@ -39184,7 +39184,7 @@ SELECT 94 AS col0, + 16 col2 # Datafusion - Expected - 35 # Datafusion - Expected - NULL # Datafusion - Expected - 142 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(35\) AS col1" at position 0 and "Int64\(92\) / CASE WHEN NOT Int64\(76\) >= Int64\(28\) \- Int64\(68\) OR Int64\(9\) / \(\- Int64\(\-73\)\) \- Int64\(\-47\) IN \(\[\(\- Int64\(\-49\)\), count\(Int64\(1\)\) AS count\(\*\), \(\- Int64\(\-55\)\), Int64\(\-71\), Int64\(68\), count\(Int64\(1\)\) AS count\(\*\)\]\) THEN \(\- \(\- \(\- sum\(DISTINCT Int64\(76\)\)\)\)\) END AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(35\) AS col1" at position 0 and "Int64\(92\) / CASE WHEN NOT \(Int64\(76\) >= Int64\(28\) \- Int64\(68\)\) OR Int64\(9\) / \(\- Int64\(\-73\)\) \- Int64\(\-47\) IN \(\[\(\- Int64\(\-49\)\), count\(Int64\(1\)\) AS count\(\*\), \(\- Int64\(\-55\)\), Int64\(\-71\), Int64\(68\), count\(Int64\(1\)\) AS count\(\*\)\]\) THEN \(\- \(\- \(\- sum\(DISTINCT Int64\(76\)\)\)\)\) END AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT DISTINCT 35 col1, 92 / CASE WHEN NOT 76 >= + + 28 - 68 OR + 9 / - - 73 - + - 47 IN ( - - 49, + COUNT ( * ), - - 55, - 71, + 68, + COUNT ( * ) ) THEN - - ( - SUM ( DISTINCT + 76 ) ) END AS col1, MIN ( DISTINCT 51 ) + + 91 AS col0 query I rowsort diff --git a/data/sqlite/random/expr/slt_good_52.slt b/data/sqlite/random/expr/slt_good_52.slt index 9a64da9..d1dc99e 100644 --- a/data/sqlite/random/expr/slt_good_52.slt +++ b/data/sqlite/random/expr/slt_good_52.slt @@ -41038,7 +41038,7 @@ SELECT DISTINCT 99, 14 col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - 5 # Datafusion - Expected - -2488 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(5\) AS col2" at position 0 and "Int64\(14\) \* Int64\(\-92\) \+ \(\- nullif\(\(\- CASE coalesce\(Int64\(\-65\), Int64\(49\)\) WHEN Int64\(99\) \+ CASE Int64\(\-5\) \+ \(\- Int64\(70\) \+ Int64\(88\)\) \* sum\(DISTINCT Int64\(\-29\)\) WHEN Int64\(\-3\) \* Int64\(5\) THEN NULL WHEN Int64\(82\) THEN Int64\(\-37\) END THEN Int64\(5\) \* Int64\(\-72\) ELSE Int64\(25\) END\), Int64\(91\) \* Int64\(15\)\)\) \* CAST\(Int64\(\-48\) AS Int32\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(5\) AS col2" at position 0 and "Int64\(14\) \* Int64\(\-92\) \+ \(\- nullif\(\(\- CASE coalesce\(Int64\(\-65\), Int64\(49\)\) WHEN Int64\(99\) \+ CASE Int64\(\-5\) \+ \(\- \(Int64\(70\) \+ Int64\(88\)\)\) \* sum\(DISTINCT Int64\(\-29\)\) WHEN Int64\(\-3\) \* Int64\(5\) THEN NULL WHEN Int64\(82\) THEN Int64\(\-37\) END THEN Int64\(5\) \* Int64\(\-72\) ELSE Int64\(25\) END\), Int64\(91\) \* Int64\(15\)\)\) \* CAST\(Int64\(\-48\) AS Int32\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT ALL 5 AS col2, 14 * - 92 + + - NULLIF ( + + ( - CASE COALESCE ( - 65, 49 ) WHEN 99 + CASE - 5 + - ( 70 + 88 ) * SUM ( DISTINCT - 29 ) WHEN - 3 * 5 THEN NULL WHEN 82 THEN - 37 END THEN 5 * - 72 ELSE 25 END ), 91 * 15 ) * CAST ( - 48 AS INTEGER ) AS col2 query I rowsort diff --git a/data/sqlite/random/expr/slt_good_57.slt b/data/sqlite/random/expr/slt_good_57.slt index a42f84c..3452a0b 100644 --- a/data/sqlite/random/expr/slt_good_57.slt +++ b/data/sqlite/random/expr/slt_good_57.slt @@ -18893,7 +18893,7 @@ SELECT - NULLIF ( 49, + 99 ) # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL # Datafusion - Expected - 193456 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "CAST\(NULL AS Int32\) \+ \(\- Int64\(\-8\)\) AS col1" at position 0 and "\(\- CASE WHEN NOT Int64\(76\) = CASE \(\- \(\- Int64\(\-44\)\)\) WHEN Int64\(62\) THEN \(\- min\(Int64\(\-56\)\)\) \* count\(Int64\(\-27\)\) END THEN \(\- \(\- count\(Int64\(\-27\)\)\)\) \+ Int64\(21\) \+ Int64\(37\) WHEN NOT NULL > Int64\(\-41\) \+ avg\(Int64\(18\) \+ Int64\(53\)\) THEN Int64\(93\) / \(\- nullif\(\(\- count\(Int64\(1\)\) AS count\(\*\)\), Int64\(\-46\) \+ nullif\(Int64\(11\), count\(Int64\(1\)\) AS count\(\*\) / \(\- Int64\(42\)\) \- Int64\(\-84\)\)\)\) ELSE Int64\(89\) END\) \+ \(\- coalesce\(Int64\(75\) \- \(\- Int64\(57\) \- count\(Int64\(1\)\) AS count\(\*\) \* Int64\(\-36\)\) \* Int64\(40\), Int64\(\-31\) \+ Int64\(\-81\), Int64\(6\) \+ Int64\(44\)\)\) \* Int64\(\-51\) AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "CAST\(NULL AS Int32\) \+ \(\- Int64\(\-8\)\) AS col1" at position 0 and "\(\- CASE WHEN NOT \(Int64\(76\) = CASE \(\- \(\- Int64\(\-44\)\)\) WHEN Int64\(62\) THEN \(\- min\(Int64\(\-56\)\)\) \* count\(Int64\(\-27\)\) END\) THEN \(\- \(\- count\(Int64\(\-27\)\)\)\) \+ Int64\(21\) \+ Int64\(37\) WHEN NOT \(NULL > Int64\(\-41\) \+ avg\(Int64\(18\) \+ Int64\(53\)\)\) THEN Int64\(93\) / \(\- nullif\(\(\- count\(Int64\(1\)\) AS count\(\*\)\), Int64\(\-46\) \+ nullif\(Int64\(11\), count\(Int64\(1\)\) AS count\(\*\) / \(\- Int64\(42\)\) \- Int64\(\-84\)\)\)\) ELSE Int64\(89\) END\) \+ \(\- coalesce\(Int64\(75\) \- \(\- \(Int64\(57\) \- count\(Int64\(1\)\) AS count\(\*\) \* Int64\(\-36\)\)\) \* Int64\(40\), Int64\(\-31\) \+ Int64\(\-81\), Int64\(6\) \+ Int64\(44\)\)\) \* Int64\(\-51\) AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT DISTINCT CAST ( NULL AS INTEGER ) + - - 8 AS col1, - CASE WHEN NOT + 76 = + CASE - - ( - 44 ) WHEN + 62 THEN - + MIN ( + - 56 ) * COUNT ( + - 27 ) END THEN - - COUNT ( - 27 ) + + 21 + + 37 WHEN NOT ( NULL ) > ( - 41 + AVG ( + 18 + 53 ) ) THEN + 93 / + ( - NULLIF ( - COUNT ( * ), - 46 + + NULLIF ( 11, COUNT ( * ) / - ( + 42 ) - - 84 ) ) ) ELSE 89 END + - COALESCE ( 75 - - ( + 57 - COUNT ( * ) * - 36 ) * 40, - 31 + - 81, 6 + 44 ) * - 51 AS col1 query I rowsort label-3600 diff --git a/data/sqlite/random/expr/slt_good_58.slt b/data/sqlite/random/expr/slt_good_58.slt index d83fdd5..9752344 100644 --- a/data/sqlite/random/expr/slt_good_58.slt +++ b/data/sqlite/random/expr/slt_good_58.slt @@ -16674,7 +16674,7 @@ NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - 88 # Datafusion - Expected - -37 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(88\) AS col1" at position 0 and "Int64\(37\) / coalesce\(\(\- count\(Int64\(1\)\) AS count\(\*\)\), Int64\(23\) \* Int64\(17\) \* \(\- CAST\(\(\- nullif\(Int64\(73\), Int64\(11\) \* \(\- Int64\(\-10\) \* Int64\(83\)\)\)\) \+ count\(Int64\(1\)\) AS count\(\*\) AS Int32\)\) \+ \(\- Int64\(35\) \+ CAST\(Int64\(\-17\) AS Int32\) \* Int64\(60\)\)\) AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(88\) AS col1" at position 0 and "Int64\(37\) / coalesce\(\(\- count\(Int64\(1\)\) AS count\(\*\)\), Int64\(23\) \* Int64\(17\) \* \(\- CAST\(\(\- nullif\(Int64\(73\), Int64\(11\) \* \(\- \(Int64\(\-10\) \* Int64\(83\)\)\)\)\) \+ count\(Int64\(1\)\) AS count\(\*\) AS Int32\)\) \+ \(\- \(Int64\(35\) \+ CAST\(Int64\(\-17\) AS Int32\) \* Int64\(60\)\)\)\) AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT 88 AS col1, + 37 / + COALESCE ( - COUNT ( * ), 23 * + ( 17 ) * - CAST ( - NULLIF ( + 73, 11 * - ( - 10 * 83 ) ) + COUNT ( * ) AS INTEGER ) + - ( 35 + CAST ( - 17 AS INTEGER ) * 60 ) ) AS col1 query II rowsort label-3178 diff --git a/data/sqlite/random/expr/slt_good_62.slt b/data/sqlite/random/expr/slt_good_62.slt index 8aa60df..609501b 100644 --- a/data/sqlite/random/expr/slt_good_62.slt +++ b/data/sqlite/random/expr/slt_good_62.slt @@ -6725,7 +6725,7 @@ SELECT ALL - ( + 43 ) + + 50 + + NULLIF ( + COUNT ( * ), 87 ) AS col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 196417 # Datafusion - Expected - -76 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(\-40\) \+ count\(Int64\(1\)\) AS count\(\*\) \+ Int64\(\-21\) \+ Int64\(\-66\) \* Int64\(\-62\) \* Int64\(48\) \+ CASE WHEN NOT CASE Int64\(67\) WHEN Int64\(94\) THEN Int64\(43\) WHEN Int64\(74\) \* Int64\(85\) THEN \(\- count\(Int64\(7\)\)\) ELSE NULL END != Int64\(\-7\) \* \(\- Int64\(92\)\) / Int64\(53\) \+ Int64\(90\) THEN Int64\(71\) \* \(\- count\(Int64\(\-10\)\)\) / \(\- max\(DISTINCT Int64\(\-8\)\)\) ELSE count\(Int64\(\-83\)\) END \+ Int64\(60\) AS col2" at position 0 and "Int64\(\-76\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(\-40\) \+ count\(Int64\(1\)\) AS count\(\*\) \+ Int64\(\-21\) \+ Int64\(\-66\) \* Int64\(\-62\) \* Int64\(48\) \+ CASE WHEN NOT \(CASE Int64\(67\) WHEN Int64\(94\) THEN Int64\(43\) WHEN Int64\(74\) \* Int64\(85\) THEN \(\- count\(Int64\(7\)\)\) ELSE NULL END != Int64\(\-7\) \* \(\- Int64\(92\)\) / Int64\(53\) \+ Int64\(90\)\) THEN Int64\(71\) \* \(\- count\(Int64\(\-10\)\)\) / \(\- max\(DISTINCT Int64\(\-8\)\)\) ELSE count\(Int64\(\-83\)\) END \+ Int64\(60\) AS col2" at position 0 and "Int64\(\-76\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT - 40 + + + COUNT ( * ) + - 21 + - 66 * - 62 * 48 + CASE WHEN NOT CASE 67 WHEN 94 THEN 43 WHEN + 74 * 85 THEN - COUNT ( 7 ) ELSE NULL END <> + - 7 * - ( 92 ) / 53 + + 90 THEN + + 71 * - COUNT ( ALL + - 10 ) / - MAX ( DISTINCT + - 8 ) ELSE ( + COUNT ( - 83 ) ) END + 60 AS col2, - 76 AS col2 query I rowsort label-1274 diff --git a/data/sqlite/random/expr/slt_good_69.slt b/data/sqlite/random/expr/slt_good_69.slt index cb35dbf..67f8a5d 100644 --- a/data/sqlite/random/expr/slt_good_69.slt +++ b/data/sqlite/random/expr/slt_good_69.slt @@ -19113,7 +19113,7 @@ SELECT ALL 51 + - 88 - + 88 * + 0 * 70 * 69 # Datafusion - Expected - 1372 # Datafusion - Expected - -18 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- Int64\(18\)\) AS col1" at position 1 and "Int64\(2\) \+ Int64\(\-89\) \* Int64\(47\) \* \(\- \(\- nullif\(\(\- \(\- count\(Int64\(1\)\) AS count\(\*\)\)\), \(\- \(\- CASE Int64\(\-14\) WHEN Int64\(\-58\) THEN NULL ELSE Int64\(27\) END\)\)\)\)\) \* Int64\(76\) \* Int64\(\-42\) \- \(\- Int64\(\-23\)\) \- Int64\(\-29\) \* \(\- CASE \(\- Int64\(19\)\) WHEN Int64\(90\) \- Int64\(55\) THEN CAST\(NULL AS Int32\) / count\(Int64\(1\)\) AS count\(\*\) \- \(\- Int64\(\-7\) \- Int64\(28\)\) WHEN Int64\(\-66\) \+ Int64\(72\) THEN count\(Int64\(1\)\) AS count\(\*\) ELSE NULL END\) \* Int64\(65\) AS col1" at position 2 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- Int64\(18\)\) AS col1" at position 1 and "Int64\(2\) \+ Int64\(\-89\) \* Int64\(47\) \* \(\- \(\- nullif\(\(\- \(\- count\(Int64\(1\)\) AS count\(\*\)\)\), \(\- \(\- CASE Int64\(\-14\) WHEN Int64\(\-58\) THEN NULL ELSE Int64\(27\) END\)\)\)\)\) \* Int64\(76\) \* Int64\(\-42\) \- \(\- Int64\(\-23\)\) \- Int64\(\-29\) \* \(\- CASE \(\- Int64\(19\)\) WHEN Int64\(90\) \- Int64\(55\) THEN CAST\(NULL AS Int32\) / count\(Int64\(1\)\) AS count\(\*\) \- \(\- \(Int64\(\-7\) \- Int64\(28\)\)\) WHEN Int64\(\-66\) \+ Int64\(72\) THEN count\(Int64\(1\)\) AS count\(\*\) ELSE NULL END\) \* Int64\(65\) AS col1" at position 2 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT 98 * + ( + 14 ) AS col0, ( - + ( + 18 ) ) col1, 2 + - 89 * + 47 * - ( - NULLIF ( - - COUNT ( * ), - - CASE - 14 WHEN - 58 THEN NULL ELSE + 27 END ) ) * + 76 * + - 42 - - - 23 - - 29 * - CASE - + 19 WHEN 90 - 55 THEN CAST ( NULL AS INTEGER ) / COUNT ( * ) - - ( - 7 - 28 ) WHEN - 66 + 72 THEN COUNT ( * ) ELSE NULL END * + 65 AS col1 query I rowsort @@ -37484,7 +37484,7 @@ SELECT + 68 + - + 0 AS col2 # Datafusion - Datafusion expected results: # Datafusion - Expected - 17 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(17\) AS col1" at position 0 and "Int64\(\-26\) \* Int64\(\-38\) \+ count\(Int64\(1\)\) AS count\(\*\) \- sum\(Int64\(67\)\) \* CASE nullif\(count\(Int64\(1\)\) AS count\(\*\), CASE \(\- \(\- CASE CASE Int64\(23\) WHEN \(\- nullif\(Int64\(68\), Int64\(17\)\)\) \* Int64\(12\) / Int64\(\-44\) \* Int64\(45\) THEN \(\- Int64\(\-71\)\) \+ Int64\(79\) \* Int64\(15\) \+ Int64\(69\) ELSE NULL END WHEN Int64\(\-94\) THEN Int64\(57\) \- Int64\(94\) \* Int64\(46\) \+ Int64\(74\) WHEN count\(Int64\(1\)\) AS count\(\*\) THEN NULL WHEN Int64\(73\) \+ Int64\(\-57\) THEN NULL END\)\) WHEN count\(\(\- Int64\(1\)\)\) \+ \(\- CASE Int64\(\-38\) WHEN \(\- min\(DISTINCT Int64\(49\)\)\) THEN count\(Int64\(1\)\) AS count\(\*\) \* \(\- CASE WHEN NOT NULL <= NULL THEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) END\) END\) \* Int64\(28\) THEN Int64\(16\) \+ Int64\(26\) ELSE Int64\(46\) END\) WHEN Int64\(47\) THEN Int64\(\-11\) WHEN Int64\(25\) THEN Int64\(70\) END AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(17\) AS col1" at position 0 and "Int64\(\-26\) \* Int64\(\-38\) \+ count\(Int64\(1\)\) AS count\(\*\) \- sum\(Int64\(67\)\) \* CASE nullif\(count\(Int64\(1\)\) AS count\(\*\), CASE \(\- \(\- CASE CASE Int64\(23\) WHEN \(\- nullif\(Int64\(68\), Int64\(17\)\)\) \* Int64\(12\) / Int64\(\-44\) \* Int64\(45\) THEN \(\- Int64\(\-71\)\) \+ Int64\(79\) \* Int64\(15\) \+ Int64\(69\) ELSE NULL END WHEN Int64\(\-94\) THEN Int64\(57\) \- Int64\(94\) \* Int64\(46\) \+ Int64\(74\) WHEN count\(Int64\(1\)\) AS count\(\*\) THEN NULL WHEN Int64\(73\) \+ Int64\(\-57\) THEN NULL END\)\) WHEN count\(\(\- Int64\(1\)\)\) \+ \(\- CASE Int64\(\-38\) WHEN \(\- min\(DISTINCT Int64\(49\)\)\) THEN count\(Int64\(1\)\) AS count\(\*\) \* \(\- CASE WHEN NOT \(NULL <= NULL\) THEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) END\) END\) \* Int64\(28\) THEN Int64\(16\) \+ Int64\(26\) ELSE Int64\(46\) END\) WHEN Int64\(47\) THEN Int64\(\-11\) WHEN Int64\(25\) THEN Int64\(70\) END AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT ALL 17 AS col1, - 26 * - 38 + COUNT ( * ) - SUM ( ALL 67 ) * CASE + NULLIF ( COUNT ( * ), CASE - - CASE + CASE + 23 WHEN - ( NULLIF ( + + 68, 17 ) ) * + 12 / - 44 * 45 THEN - - 71 + + + 79 * + 15 + 69 ELSE NULL END WHEN - 94 THEN + 57 - + 94 * + 46 + + 74 WHEN + COUNT ( * ) THEN NULL WHEN 73 + - 57 THEN NULL END WHEN COUNT ( - ( + 1 ) ) + - CASE - 38 WHEN - MIN ( DISTINCT + 49 ) THEN COUNT ( * ) * - CASE WHEN NOT NULL <= NULL THEN - COUNT ( * ) END END * 28 THEN 16 + 26 ELSE + 46 END ) WHEN + 47 THEN - 11 WHEN + 25 THEN 70 END AS col1 query I rowsort label-7142 diff --git a/data/sqlite/random/expr/slt_good_74.slt b/data/sqlite/random/expr/slt_good_74.slt index 89f5754..ef6cc26 100644 --- a/data/sqlite/random/expr/slt_good_74.slt +++ b/data/sqlite/random/expr/slt_good_74.slt @@ -41536,7 +41536,7 @@ NULL # Datafusion - Datafusion expected results: # Datafusion - Expected - 891458700 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(55\) \+ Int64\(52\) \* Int64\(\-19\) \* \(\- count\(Int64\(\-28\)\)\) \* Int64\(\-98\) \* Int64\(\-93\) \* Int64\(99\) \- Int64\(77\) / \(\- count\(Int64\(1\)\) AS count\(\*\)\) AS col2" at position 0 and "Int64\(\-31\) \* CASE Int64\(\-75\) WHEN Int64\(99\) / \(\- coalesce\(Int64\(83\) \* \(\- Int64\(\-65\) \* CAST\(NULL AS Int32\)\), Int64\(\-84\), Int64\(90\), count\(Int64\(1\)\) AS count\(\*\)\)\) \+ \(\- sum\(Int64\(77\)\)\) THEN Int64\(24\) ELSE NULL END AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(55\) \+ Int64\(52\) \* Int64\(\-19\) \* \(\- count\(Int64\(\-28\)\)\) \* Int64\(\-98\) \* Int64\(\-93\) \* Int64\(99\) \- Int64\(77\) / \(\- count\(Int64\(1\)\) AS count\(\*\)\) AS col2" at position 0 and "Int64\(\-31\) \* CASE Int64\(\-75\) WHEN Int64\(99\) / \(\- coalesce\(Int64\(83\) \* \(\- \(Int64\(\-65\) \* CAST\(NULL AS Int32\)\)\), Int64\(\-84\), Int64\(90\), count\(Int64\(1\)\) AS count\(\*\)\)\) \+ \(\- sum\(Int64\(77\)\)\) THEN Int64\(24\) ELSE NULL END AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT 55 + + + 52 * - 19 * - COUNT ( - 28 ) * + - 98 * - 93 * 99 - + 77 / - COUNT ( * ) AS col2, - 31 * + CASE - 75 WHEN 99 / - COALESCE ( 83 * - ( - 65 * ( CAST ( NULL AS INTEGER ) ) ), - 84, + 90, + COUNT ( * ) ) + - SUM ( 77 ) THEN + 24 ELSE NULL END col2 query I rowsort diff --git a/data/sqlite/random/expr/slt_good_75.slt b/data/sqlite/random/expr/slt_good_75.slt index cbdfcc4..dbae0fa 100644 --- a/data/sqlite/random/expr/slt_good_75.slt +++ b/data/sqlite/random/expr/slt_good_75.slt @@ -20858,7 +20858,7 @@ SELECT - + 75 + COUNT ( * ) / - 44 + - ( MIN ( ALL CAST ( - 75 AS INTEGER ) ) ) # Datafusion - Datafusion expected results: # Datafusion - Expected - 0 # Datafusion - Expected - NULL -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- Int64\(0\)\) / count\(Int64\(1\)\) AS count\(\*\) AS col2" at position 0 and "\(\- count\(Int64\(36\)\)\) / coalesce\(Int64\(58\), nullif\(\(\- nullif\(Int64\(36\), Int64\(60\) \+ count\(Int64\(1\)\) AS count\(\*\)\)\), Int64\(26\)\)\) \* Int64\(27\) \+ Int64\(49\) \+ \(\- CAST\(avg\(Int64\(\-63\)\) AS Int32\)\) \+ Int64\(\-52\) \* Int64\(\-9\) \* Int64\(13\) \+ CASE Int64\(\-17\) WHEN Int64\(57\) THEN coalesce\(Int64\(\-50\), CASE \(\- \(\- CAST\(Int64\(79\) AS Int32\)\)\) WHEN Int64\(25\) \* Int64\(30\) / Int64\(\-46\) THEN count\(Int64\(1\)\) AS count\(\*\) WHEN Int64\(34\) / Int64\(50\) \+ Int64\(\-11\) / Int64\(\-22\) THEN NULL WHEN CASE Int64\(\-15\) WHEN Int64\(4\) \* Int64\(\-86\) THEN Int64\(\-30\) \+ Int64\(98\) ELSE NULL END \* count\(Int64\(1\)\) AS count\(\*\) \* nullif\(Int64\(20\), \(\- Int64\(\-35\)\)\) \- Int64\(30\) / CAST\(NULL AS Int32\) THEN Int64\(60\) \* Int64\(\-51\) ELSE NULL END, Int64\(\-41\) / Int64\(96\) \+ Int64\(30\) / Int64\(84\)\) WHEN Int64\(11\) THEN CASE count\(Int64\(1\)\) AS count\(\*\) WHEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) \+ \(\- CAST\(Int64\(\-18\) AS Int32\) \+ Int64\(74\)\) THEN NULL ELSE Int64\(72\) \+ Int64\(74\) \* Int64\(\-96\) END ELSE NULL END AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- Int64\(0\)\) / count\(Int64\(1\)\) AS count\(\*\) AS col2" at position 0 and "\(\- count\(Int64\(36\)\)\) / coalesce\(Int64\(58\), nullif\(\(\- nullif\(Int64\(36\), Int64\(60\) \+ count\(Int64\(1\)\) AS count\(\*\)\)\), Int64\(26\)\)\) \* Int64\(27\) \+ Int64\(49\) \+ \(\- CAST\(avg\(Int64\(\-63\)\) AS Int32\)\) \+ Int64\(\-52\) \* Int64\(\-9\) \* Int64\(13\) \+ CASE Int64\(\-17\) WHEN Int64\(57\) THEN coalesce\(Int64\(\-50\), CASE \(\- \(\- CAST\(Int64\(79\) AS Int32\)\)\) WHEN Int64\(25\) \* Int64\(30\) / Int64\(\-46\) THEN count\(Int64\(1\)\) AS count\(\*\) WHEN Int64\(34\) / Int64\(50\) \+ Int64\(\-11\) / Int64\(\-22\) THEN NULL WHEN CASE Int64\(\-15\) WHEN Int64\(4\) \* Int64\(\-86\) THEN Int64\(\-30\) \+ Int64\(98\) ELSE NULL END \* count\(Int64\(1\)\) AS count\(\*\) \* nullif\(Int64\(20\), \(\- Int64\(\-35\)\)\) \- Int64\(30\) / CAST\(NULL AS Int32\) THEN Int64\(60\) \* Int64\(\-51\) ELSE NULL END, Int64\(\-41\) / Int64\(96\) \+ Int64\(30\) / Int64\(84\)\) WHEN Int64\(11\) THEN CASE count\(Int64\(1\)\) AS count\(\*\) WHEN \(\- count\(Int64\(1\)\) AS count\(\*\)\) \+ \(\- \(CAST\(Int64\(\-18\) AS Int32\) \+ Int64\(74\)\)\) THEN NULL ELSE Int64\(72\) \+ Int64\(74\) \* Int64\(\-96\) END ELSE NULL END AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT - - 0 / + ( + + COUNT ( * ) ) AS col2, - COUNT ( 36 ) / + + COALESCE ( 58, NULLIF ( - NULLIF ( + 36, 60 + + COUNT ( * ) ), + 26 ) ) * 27 + 49 + - ( + CAST ( + + AVG ( - 63 ) AS INTEGER ) ) + - 52 * - 9 * 13 + CASE - 17 WHEN + 57 THEN COALESCE ( - 50, + CASE - - CAST ( 79 AS INTEGER ) WHEN 25 * + 30 / - 46 THEN + COUNT ( * ) WHEN 34 / + + 50 + + - 11 / + - 22 THEN NULL WHEN CASE - 15 WHEN 4 * - 86 THEN - 30 + + 98 ELSE NULL END * COUNT ( * ) * NULLIF ( + 20, - ( - 35 ) ) - 30 / CAST ( NULL AS INTEGER ) THEN 60 * - 51 ELSE NULL END, - 41 / 96 + 30 / + 84 ) WHEN 11 THEN CASE COUNT ( * ) WHEN - COUNT ( * ) + - ( CAST ( - 18 AS INTEGER ) + + 74 ) THEN NULL ELSE ( 72 ) + + 74 * - 96 END ELSE NULL END AS col2 query I rowsort label-3962 diff --git a/data/sqlite/random/expr/slt_good_78.slt b/data/sqlite/random/expr/slt_good_78.slt index f9c04c6..faf27b5 100644 --- a/data/sqlite/random/expr/slt_good_78.slt +++ b/data/sqlite/random/expr/slt_good_78.slt @@ -24129,7 +24129,7 @@ SELECT + - 15 * + + 99 * 35 * ( + 17 ) # Datafusion - Expected - -81 # Datafusion - Expected - NULL # Datafusion - Expected - 3040 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- Int64\(81\)\) AS col2" at position 0 and "Int64\(38\) \- \(\- nullif\(CASE WHEN NOT Int64\(44\) != NULL THEN \(\- nullif\(\(\- CAST\(Int64\(\-1\) AS Int32\)\), Int64\(96\) \- Int64\(73\)\)\) ELSE NULL END, Int64\(38\)\)\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- Int64\(81\)\) AS col2" at position 0 and "Int64\(38\) \- \(\- nullif\(CASE WHEN NOT \(Int64\(44\) != NULL\) THEN \(\- nullif\(\(\- CAST\(Int64\(\-1\) AS Int32\)\), Int64\(96\) \- Int64\(73\)\)\) ELSE NULL END, Int64\(38\)\)\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT - + 81 AS col2, 38 - - + NULLIF ( CASE WHEN NOT 44 <> NULL THEN - NULLIF ( - CAST ( + - 1 AS INTEGER ), 96 - 73 ) ELSE NULL END, + 38 ) AS col2, - - 38 * - - SUM ( ALL 80 ) AS col2 query II rowsort label-4586 diff --git a/data/sqlite/random/expr/slt_good_8.slt b/data/sqlite/random/expr/slt_good_8.slt index 4e30958..83ecf3a 100644 --- a/data/sqlite/random/expr/slt_good_8.slt +++ b/data/sqlite/random/expr/slt_good_8.slt @@ -8459,7 +8459,7 @@ SELECT ALL + 82 * + ( - 36 ) * 81 * + 40 + + 18 * - COUNT ( * ) AS col1 # Datafusion - Datafusion expected results: # Datafusion - Expected - 7 # Datafusion - Expected - -4201092 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(7\) AS col2" at position 0 and "Int64\(\-15\) \- Int64\(\-69\) \+ Int64\(27\) \- Int64\(53\) \+ Int64\(46\) / Int64\(39\) \* \(\- Int64\(\-22\) \* Int64\(\-77\)\) \* Int64\(31\) \* Int64\(80\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "Int64\(7\) AS col2" at position 0 and "Int64\(\-15\) \- Int64\(\-69\) \+ Int64\(27\) \- Int64\(53\) \+ Int64\(46\) / Int64\(39\) \* \(\- \(Int64\(\-22\) \* Int64\(\-77\)\)\) \* Int64\(31\) \* Int64\(80\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT ALL 7 AS col2, - 15 - - 69 + 27 - 53 + 46 / 39 * - ( - 22 * - 77 ) * 31 * 80 AS col2 query I rowsort diff --git a/data/sqlite/random/expr/slt_good_91.slt b/data/sqlite/random/expr/slt_good_91.slt index 11e421f..d603f63 100644 --- a/data/sqlite/random/expr/slt_good_91.slt +++ b/data/sqlite/random/expr/slt_good_91.slt @@ -50705,7 +50705,7 @@ SELECT CAST ( - - 42 AS INTEGER ) AS col0 # Datafusion - Datafusion expected results: # Datafusion - Expected - NULL # Datafusion - Expected - 79 -query error DataFusion error: Error during planning: Projections require unique expression names but the expression "CASE WHEN NOT NULL != Int64\(41\) THEN NULL WHEN NOT Int64\(27\) IS NOT NULL THEN Int64\(\-51\) / max\(Int64\(11\)\) END \* CAST\(Int64\(6\) AS Int32\) \+ Int64\(\-67\) AS col0" at position 0 and "Int64\(79\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. +query error DataFusion error: Error during planning: Projections require unique expression names but the expression "CASE WHEN NOT \(NULL != Int64\(41\)\) THEN NULL WHEN NOT Int64\(27\) IS NOT NULL THEN Int64\(\-51\) / max\(Int64\(11\)\) END \* CAST\(Int64\(6\) AS Int32\) \+ Int64\(\-67\) AS col0" at position 0 and "Int64\(79\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\. SELECT + CASE WHEN NOT NULL <> + 41 THEN NULL WHEN NOT 27 IS NOT NULL THEN - 51 / + MAX ( ALL 11 ) END * + CAST ( + 6 AS INTEGER ) + - 67 col0, 79 AS col0 query I rowsort label-9636