You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by al...@apache.org on 2025/08/23 11:36:22 UTC
(datafusion-testing) branch main updated: Regenerate tests due to new avg(distinct) support for floats (#11)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-testing.git
The following commit(s) were added to refs/heads/main by this push:
new f72ac40 Regenerate tests due to new avg(distinct) support for floats (#11)
f72ac40 is described below
commit f72ac4075ada5ea9810551bc0c3e3161c61204a2
Author: Jeffrey Vo <je...@gmail.com>
AuthorDate: Sat Aug 23 21:36:12 2025 +1000
Regenerate tests due to new avg(distinct) support for floats (#11)
* Regenerate tests due to new avg(distinct) support for floats
* Update after pushing fix for group by for avg(distinct)
---
data/sqlite/index/random/10/slt_good_0.slt | 90 ++++--
data/sqlite/index/random/10/slt_good_1.slt | 45 ++-
data/sqlite/index/random/10/slt_good_10.slt | 90 ++++--
data/sqlite/index/random/10/slt_good_11.slt | 45 ++-
data/sqlite/index/random/10/slt_good_12.slt | 90 ++++--
data/sqlite/index/random/10/slt_good_13.slt | 90 ++++--
data/sqlite/index/random/10/slt_good_3.slt | 90 ++++--
data/sqlite/index/random/10/slt_good_5.slt | 145 ++++++---
data/sqlite/index/random/10/slt_good_6.slt | 45 ++-
data/sqlite/index/random/10/slt_good_7.slt | 45 ++-
data/sqlite/index/random/10/slt_good_8.slt | 135 +++++---
data/sqlite/index/random/10/slt_good_9.slt | 90 ++++--
data/sqlite/index/random/100/slt_good_0.slt | 45 ++-
data/sqlite/index/random/100/slt_good_1.slt | 45 ++-
data/sqlite/index/random/1000/slt_good_0.slt | 45 ++-
data/sqlite/index/random/1000/slt_good_7.slt | 45 ++-
data/sqlite/index/random/1000/slt_good_8.slt | 45 ++-
data/sqlite/random/aggregates/slt_good_0.slt | 33 +-
data/sqlite/random/aggregates/slt_good_1.slt | 18 +-
data/sqlite/random/aggregates/slt_good_10.slt | 114 ++++---
data/sqlite/random/aggregates/slt_good_100.slt | 42 ++-
data/sqlite/random/aggregates/slt_good_101.slt | 56 ++--
data/sqlite/random/aggregates/slt_good_102.slt | 90 ++++--
data/sqlite/random/aggregates/slt_good_103.slt | 95 ++++--
data/sqlite/random/aggregates/slt_good_104.slt | 27 +-
data/sqlite/random/aggregates/slt_good_105.slt | 90 ++++--
data/sqlite/random/aggregates/slt_good_106.slt | 78 +++--
data/sqlite/random/aggregates/slt_good_107.slt | 24 +-
data/sqlite/random/aggregates/slt_good_108.slt | 47 ++-
data/sqlite/random/aggregates/slt_good_109.slt | 57 ++--
data/sqlite/random/aggregates/slt_good_11.slt | 33 +-
data/sqlite/random/aggregates/slt_good_110.slt | 101 +++---
data/sqlite/random/aggregates/slt_good_111.slt | 89 ++++--
data/sqlite/random/aggregates/slt_good_112.slt | 81 +++--
data/sqlite/random/aggregates/slt_good_113.slt | 57 ++--
data/sqlite/random/aggregates/slt_good_114.slt | 65 ++--
data/sqlite/random/aggregates/slt_good_115.slt | 92 ++++--
data/sqlite/random/aggregates/slt_good_116.slt | 72 +++--
data/sqlite/random/aggregates/slt_good_117.slt | 92 ++++--
data/sqlite/random/aggregates/slt_good_118.slt | 59 ++--
data/sqlite/random/aggregates/slt_good_119.slt | 48 +--
data/sqlite/random/aggregates/slt_good_12.slt | 36 ++-
data/sqlite/random/aggregates/slt_good_120.slt | 114 ++++---
data/sqlite/random/aggregates/slt_good_121.slt | 42 ++-
data/sqlite/random/aggregates/slt_good_122.slt | 78 +++--
data/sqlite/random/aggregates/slt_good_123.slt | 107 ++++---
data/sqlite/random/aggregates/slt_good_124.slt | 125 +++++---
data/sqlite/random/aggregates/slt_good_125.slt | 18 +-
data/sqlite/random/aggregates/slt_good_126.slt | 63 ++--
data/sqlite/random/aggregates/slt_good_127.slt | 68 ++--
data/sqlite/random/aggregates/slt_good_128.slt | 78 +++--
data/sqlite/random/aggregates/slt_good_13.slt | 54 ++--
data/sqlite/random/aggregates/slt_good_14.slt | 29 +-
data/sqlite/random/aggregates/slt_good_15.slt | 54 ++--
data/sqlite/random/aggregates/slt_good_16.slt | 56 ++--
data/sqlite/random/aggregates/slt_good_17.slt | 110 ++++---
data/sqlite/random/aggregates/slt_good_18.slt | 24 +-
data/sqlite/random/aggregates/slt_good_19.slt | 42 ++-
data/sqlite/random/aggregates/slt_good_2.slt | 62 ++--
data/sqlite/random/aggregates/slt_good_20.slt | 73 +++--
data/sqlite/random/aggregates/slt_good_21.slt | 57 ++--
data/sqlite/random/aggregates/slt_good_22.slt | 90 ++++--
data/sqlite/random/aggregates/slt_good_23.slt | 92 ++++--
data/sqlite/random/aggregates/slt_good_24.slt | 63 ++--
data/sqlite/random/aggregates/slt_good_25.slt | 18 +-
data/sqlite/random/aggregates/slt_good_26.slt | 45 ++-
data/sqlite/random/aggregates/slt_good_27.slt | 116 ++++---
data/sqlite/random/aggregates/slt_good_28.slt | 74 +++--
data/sqlite/random/aggregates/slt_good_29.slt | 60 ++--
data/sqlite/random/aggregates/slt_good_3.slt | 47 ++-
data/sqlite/random/aggregates/slt_good_30.slt | 62 ++--
data/sqlite/random/aggregates/slt_good_31.slt | 65 ++--
data/sqlite/random/aggregates/slt_good_32.slt | 18 +-
data/sqlite/random/aggregates/slt_good_33.slt | 104 +++---
data/sqlite/random/aggregates/slt_good_34.slt | 47 ++-
data/sqlite/random/aggregates/slt_good_35.slt | 36 ++-
data/sqlite/random/aggregates/slt_good_36.slt | 27 +-
data/sqlite/random/aggregates/slt_good_37.slt | 63 ++--
data/sqlite/random/aggregates/slt_good_38.slt | 56 ++--
data/sqlite/random/aggregates/slt_good_39.slt | 51 +--
data/sqlite/random/aggregates/slt_good_4.slt | 71 +++--
data/sqlite/random/aggregates/slt_good_40.slt | 76 +++--
data/sqlite/random/aggregates/slt_good_41.slt | 36 ++-
data/sqlite/random/aggregates/slt_good_42.slt | 74 +++--
data/sqlite/random/aggregates/slt_good_43.slt | 27 +-
data/sqlite/random/aggregates/slt_good_44.slt | 63 ++--
data/sqlite/random/aggregates/slt_good_45.slt | 72 +++--
data/sqlite/random/aggregates/slt_good_46.slt | 44 ++-
data/sqlite/random/aggregates/slt_good_47.slt | 98 ++++--
data/sqlite/random/aggregates/slt_good_48.slt | 54 ++--
data/sqlite/random/aggregates/slt_good_49.slt | 60 ++--
data/sqlite/random/aggregates/slt_good_5.slt | 51 +--
data/sqlite/random/aggregates/slt_good_50.slt | 67 ++--
data/sqlite/random/aggregates/slt_good_51.slt | 49 ++-
data/sqlite/random/aggregates/slt_good_52.slt | 60 ++--
data/sqlite/random/aggregates/slt_good_53.slt | 87 +++--
data/sqlite/random/aggregates/slt_good_54.slt | 71 +++--
data/sqlite/random/aggregates/slt_good_55.slt | 18 +-
data/sqlite/random/aggregates/slt_good_56.slt | 50 +--
data/sqlite/random/aggregates/slt_good_57.slt | 60 ++--
data/sqlite/random/aggregates/slt_good_58.slt | 51 +--
data/sqlite/random/aggregates/slt_good_59.slt | 24 +-
data/sqlite/random/aggregates/slt_good_6.slt | 122 +++++---
data/sqlite/random/aggregates/slt_good_60.slt | 66 ++--
data/sqlite/random/aggregates/slt_good_61.slt | 53 ++--
data/sqlite/random/aggregates/slt_good_62.slt | 29 +-
data/sqlite/random/aggregates/slt_good_63.slt | 48 +--
data/sqlite/random/aggregates/slt_good_64.slt | 53 ++--
data/sqlite/random/aggregates/slt_good_65.slt | 116 ++++---
data/sqlite/random/aggregates/slt_good_66.slt | 56 ++--
data/sqlite/random/aggregates/slt_good_67.slt | 39 ++-
data/sqlite/random/aggregates/slt_good_68.slt | 72 +++--
data/sqlite/random/aggregates/slt_good_69.slt | 27 +-
data/sqlite/random/aggregates/slt_good_7.slt | 45 ++-
data/sqlite/random/aggregates/slt_good_70.slt | 42 ++-
data/sqlite/random/aggregates/slt_good_71.slt | 24 +-
data/sqlite/random/aggregates/slt_good_72.slt | 44 ++-
data/sqlite/random/aggregates/slt_good_73.slt | 51 +--
data/sqlite/random/aggregates/slt_good_74.slt | 63 ++--
data/sqlite/random/aggregates/slt_good_75.slt | 58 ++--
data/sqlite/random/aggregates/slt_good_76.slt | 60 ++--
data/sqlite/random/aggregates/slt_good_77.slt | 47 ++-
data/sqlite/random/aggregates/slt_good_78.slt | 36 ++-
data/sqlite/random/aggregates/slt_good_79.slt | 57 ++--
data/sqlite/random/aggregates/slt_good_8.slt | 59 ++--
data/sqlite/random/aggregates/slt_good_80.slt | 108 ++++---
data/sqlite/random/aggregates/slt_good_81.slt | 69 ++--
data/sqlite/random/aggregates/slt_good_82.slt | 45 ++-
data/sqlite/random/aggregates/slt_good_83.slt | 33 +-
data/sqlite/random/aggregates/slt_good_84.slt | 66 ++--
data/sqlite/random/aggregates/slt_good_85.slt | 69 ++--
data/sqlite/random/aggregates/slt_good_86.slt | 30 +-
data/sqlite/random/aggregates/slt_good_87.slt | 126 +++++---
data/sqlite/random/aggregates/slt_good_88.slt | 91 ++++--
data/sqlite/random/aggregates/slt_good_89.slt | 93 ++++--
data/sqlite/random/aggregates/slt_good_9.slt | 36 ++-
data/sqlite/random/aggregates/slt_good_90.slt | 54 ++--
data/sqlite/random/aggregates/slt_good_91.slt | 36 ++-
data/sqlite/random/aggregates/slt_good_92.slt | 80 +++--
data/sqlite/random/aggregates/slt_good_93.slt | 89 ++++--
data/sqlite/random/aggregates/slt_good_94.slt | 24 +-
data/sqlite/random/aggregates/slt_good_95.slt | 30 +-
data/sqlite/random/aggregates/slt_good_96.slt | 53 ++--
data/sqlite/random/aggregates/slt_good_97.slt | 83 +++--
data/sqlite/random/aggregates/slt_good_98.slt | 36 ++-
data/sqlite/random/aggregates/slt_good_99.slt | 72 +++--
data/sqlite/random/expr/slt_good_0.slt | 285 ++++++++++-------
data/sqlite/random/expr/slt_good_1.slt | 62 ++--
data/sqlite/random/expr/slt_good_10.slt | 379 +++++++++++++---------
data/sqlite/random/expr/slt_good_100.slt | 296 ++++++++++-------
data/sqlite/random/expr/slt_good_101.slt | 331 ++++++++++++--------
data/sqlite/random/expr/slt_good_102.slt | 298 +++++++++++-------
data/sqlite/random/expr/slt_good_103.slt | 405 +++++++++++++++---------
data/sqlite/random/expr/slt_good_104.slt | 260 +++++++++------
data/sqlite/random/expr/slt_good_105.slt | 274 +++++++++-------
data/sqlite/random/expr/slt_good_106.slt | 353 +++++++++++++--------
data/sqlite/random/expr/slt_good_107.slt | 277 +++++++++-------
data/sqlite/random/expr/slt_good_108.slt | 295 ++++++++++-------
data/sqlite/random/expr/slt_good_109.slt | 197 +++++++-----
data/sqlite/random/expr/slt_good_11.slt | 298 +++++++++++-------
data/sqlite/random/expr/slt_good_110.slt | 375 +++++++++++++---------
data/sqlite/random/expr/slt_good_111.slt | 260 +++++++++------
data/sqlite/random/expr/slt_good_112.slt | 315 ++++++++++++-------
data/sqlite/random/expr/slt_good_113.slt | 343 ++++++++++++--------
data/sqlite/random/expr/slt_good_114.slt | 263 ++++++++++------
data/sqlite/random/expr/slt_good_115.slt | 289 ++++++++++-------
data/sqlite/random/expr/slt_good_116.slt | 315 ++++++++++++-------
data/sqlite/random/expr/slt_good_117.slt | 349 +++++++++++++--------
data/sqlite/random/expr/slt_good_118.slt | 273 +++++++++-------
data/sqlite/random/expr/slt_good_119.slt | 238 ++++++++------
data/sqlite/random/expr/slt_good_12.slt | 333 ++++++++++++--------
data/sqlite/random/expr/slt_good_13.slt | 217 ++++++++-----
data/sqlite/random/expr/slt_good_14.slt | 371 +++++++++++++---------
data/sqlite/random/expr/slt_good_15.slt | 276 +++++++++-------
data/sqlite/random/expr/slt_good_16.slt | 418 +++++++++++++++----------
data/sqlite/random/expr/slt_good_17.slt | 299 +++++++++++-------
data/sqlite/random/expr/slt_good_18.slt | 298 +++++++++++-------
data/sqlite/random/expr/slt_good_19.slt | 177 ++++++-----
data/sqlite/random/expr/slt_good_2.slt | 261 +++++++++------
data/sqlite/random/expr/slt_good_20.slt | 196 +++++++-----
data/sqlite/random/expr/slt_good_21.slt | 295 ++++++++++-------
data/sqlite/random/expr/slt_good_22.slt | 327 +++++++++++--------
data/sqlite/random/expr/slt_good_23.slt | 272 +++++++++-------
data/sqlite/random/expr/slt_good_24.slt | 249 +++++++++------
data/sqlite/random/expr/slt_good_25.slt | 291 ++++++++++-------
data/sqlite/random/expr/slt_good_26.slt | 304 ++++++++++--------
data/sqlite/random/expr/slt_good_27.slt | 284 ++++++++++-------
data/sqlite/random/expr/slt_good_28.slt | 287 ++++++++++-------
data/sqlite/random/expr/slt_good_29.slt | 185 ++++++-----
data/sqlite/random/expr/slt_good_3.slt | 296 ++++++++++-------
data/sqlite/random/expr/slt_good_30.slt | 190 +++++++----
data/sqlite/random/expr/slt_good_31.slt | 304 +++++++++++-------
data/sqlite/random/expr/slt_good_32.slt | 63 ++--
data/sqlite/random/expr/slt_good_33.slt | 328 +++++++++++--------
data/sqlite/random/expr/slt_good_34.slt | 212 ++++++++-----
data/sqlite/random/expr/slt_good_35.slt | 249 +++++++++------
data/sqlite/random/expr/slt_good_36.slt | 186 ++++++-----
data/sqlite/random/expr/slt_good_37.slt | 288 ++++++++++-------
data/sqlite/random/expr/slt_good_38.slt | 335 ++++++++++++--------
data/sqlite/random/expr/slt_good_39.slt | 285 ++++++++++-------
data/sqlite/random/expr/slt_good_4.slt | 386 ++++++++++++++---------
data/sqlite/random/expr/slt_good_40.slt | 353 +++++++++++++--------
data/sqlite/random/expr/slt_good_41.slt | 316 +++++++++++--------
data/sqlite/random/expr/slt_good_42.slt | 287 ++++++++++-------
data/sqlite/random/expr/slt_good_43.slt | 75 +++--
data/sqlite/random/expr/slt_good_44.slt | 291 ++++++++++-------
data/sqlite/random/expr/slt_good_45.slt | 313 +++++++++++-------
data/sqlite/random/expr/slt_good_46.slt | 299 +++++++++++-------
data/sqlite/random/expr/slt_good_47.slt | 292 ++++++++++-------
data/sqlite/random/expr/slt_good_48.slt | 270 +++++++++-------
data/sqlite/random/expr/slt_good_49.slt | 317 +++++++++++--------
data/sqlite/random/expr/slt_good_5.slt | 394 ++++++++++++++---------
data/sqlite/random/expr/slt_good_50.slt | 298 ++++++++++--------
data/sqlite/random/expr/slt_good_51.slt | 271 +++++++++-------
data/sqlite/random/expr/slt_good_52.slt | 284 ++++++++++-------
data/sqlite/random/expr/slt_good_53.slt | 326 +++++++++++--------
data/sqlite/random/expr/slt_good_54.slt | 84 +++--
data/sqlite/random/expr/slt_good_55.slt | 279 +++++++++++------
data/sqlite/random/expr/slt_good_56.slt | 247 +++++++++------
data/sqlite/random/expr/slt_good_57.slt | 232 ++++++++------
data/sqlite/random/expr/slt_good_58.slt | 285 ++++++++++-------
data/sqlite/random/expr/slt_good_59.slt | 174 +++++-----
data/sqlite/random/expr/slt_good_6.slt | 285 ++++++++++-------
data/sqlite/random/expr/slt_good_60.slt | 246 +++++++++------
data/sqlite/random/expr/slt_good_61.slt | 313 ++++++++++--------
data/sqlite/random/expr/slt_good_62.slt | 301 +++++++++++-------
data/sqlite/random/expr/slt_good_63.slt | 269 +++++++++-------
data/sqlite/random/expr/slt_good_64.slt | 331 ++++++++++++--------
data/sqlite/random/expr/slt_good_65.slt | 128 +++++---
data/sqlite/random/expr/slt_good_66.slt | 406 +++++++++++++++---------
data/sqlite/random/expr/slt_good_67.slt | 258 +++++++++------
data/sqlite/random/expr/slt_good_68.slt | 417 ++++++++++++++----------
data/sqlite/random/expr/slt_good_69.slt | 255 +++++++++------
data/sqlite/random/expr/slt_good_7.slt | 184 ++++++-----
data/sqlite/random/expr/slt_good_70.slt | 276 +++++++++-------
data/sqlite/random/expr/slt_good_71.slt | 359 ++++++++++++---------
data/sqlite/random/expr/slt_good_72.slt | 326 +++++++++++--------
data/sqlite/random/expr/slt_good_73.slt | 350 +++++++++++++--------
data/sqlite/random/expr/slt_good_74.slt | 286 ++++++++++-------
data/sqlite/random/expr/slt_good_75.slt | 323 +++++++++++--------
data/sqlite/random/expr/slt_good_76.slt | 131 +++++---
data/sqlite/random/expr/slt_good_77.slt | 314 +++++++++++--------
data/sqlite/random/expr/slt_good_78.slt | 181 ++++++-----
data/sqlite/random/expr/slt_good_79.slt | 294 ++++++++++-------
data/sqlite/random/expr/slt_good_8.slt | 288 ++++++++++-------
data/sqlite/random/expr/slt_good_80.slt | 359 +++++++++++++--------
data/sqlite/random/expr/slt_good_81.slt | 237 ++++++++------
data/sqlite/random/expr/slt_good_82.slt | 300 +++++++++++-------
data/sqlite/random/expr/slt_good_83.slt | 358 ++++++++++++---------
data/sqlite/random/expr/slt_good_84.slt | 306 ++++++++++--------
data/sqlite/random/expr/slt_good_85.slt | 231 ++++++++------
data/sqlite/random/expr/slt_good_86.slt | 315 +++++++++++--------
data/sqlite/random/expr/slt_good_87.slt | 146 ++++++---
data/sqlite/random/expr/slt_good_88.slt | 382 +++++++++++++---------
data/sqlite/random/expr/slt_good_89.slt | 344 ++++++++++++--------
data/sqlite/random/expr/slt_good_9.slt | 254 +++++++++------
data/sqlite/random/expr/slt_good_90.slt | 380 +++++++++++++---------
data/sqlite/random/expr/slt_good_91.slt | 347 +++++++++++---------
data/sqlite/random/expr/slt_good_92.slt | 347 ++++++++++++--------
data/sqlite/random/expr/slt_good_93.slt | 347 ++++++++++++--------
data/sqlite/random/expr/slt_good_94.slt | 267 +++++++++-------
data/sqlite/random/expr/slt_good_95.slt | 352 +++++++++++++--------
data/sqlite/random/expr/slt_good_96.slt | 292 +++++++++--------
data/sqlite/random/expr/slt_good_97.slt | 218 ++++++++-----
data/sqlite/random/expr/slt_good_98.slt | 175 +++++++----
data/sqlite/random/expr/slt_good_99.slt | 342 +++++++++++---------
266 files changed, 26627 insertions(+), 16434 deletions(-)
diff --git a/data/sqlite/index/random/10/slt_good_0.slt b/data/sqlite/index/random/10/slt_good_0.slt
index 4901b85..0e52bdb 100644
--- a/data/sqlite/index/random/10/slt_good_0.slt
+++ b/data/sqlite/index/random/10/slt_good_0.slt
@@ -41925,30 +41925,45 @@ query IIRTIRT rowsort label-6870
SELECT ALL * FROM tab4 WHERE NULL NOT IN ( - col1 / + col3 + 63 - + - col3, + 68, 40 )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6875
SELECT - + AVG ( DISTINCT + ( - col3 ) ) * + COUNT ( DISTINCT + col3 ) AS col2 FROM tab0 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND + 25
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6875
SELECT - + AVG ( DISTINCT + ( - col3 ) ) * + COUNT ( DISTINCT + col3 ) AS col2 FROM tab1 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND + 25
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6875
SELECT - + AVG ( DISTINCT + ( - col3 ) ) * + COUNT ( DISTINCT + col3 ) AS col2 FROM tab2 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND + 25
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6875
SELECT - + AVG ( DISTINCT + ( - col3 ) ) * + COUNT ( DISTINCT + col3 ) AS col2 FROM tab3 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND + 25
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6875
SELECT - + AVG ( DISTINCT + ( - col3 ) ) * + COUNT ( DISTINCT + col3 ) AS col2 FROM tab4 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND + 25
+----
+NULL
query I rowsort label-6880
SELECT + - COUNT ( * ) FROM tab0 AS cor0 WHERE NOT ( - col0 ) BETWEEN - + col4 AND NULL
@@ -56850,30 +56865,45 @@ query IIRTIRT rowsort label-9385
SELECT * FROM tab4 AS cor0 WHERE - CAST ( NULL AS FLOAT8 ) > NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9390
SELECT + + AVG ( DISTINCT 47 ) FROM tab0 AS cor0 WHERE + CAST ( NULL AS INTEGER ) <> NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9390
SELECT + + AVG ( DISTINCT 47 ) FROM tab1 AS cor0 WHERE + CAST ( NULL AS INTEGER ) <> NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9390
SELECT + + AVG ( DISTINCT 47 ) FROM tab2 AS cor0 WHERE + CAST ( NULL AS INTEGER ) <> NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9390
SELECT + + AVG ( DISTINCT 47 ) FROM tab3 AS cor0 WHERE + CAST ( NULL AS INTEGER ) <> NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9390
SELECT + + AVG ( DISTINCT 47 ) FROM tab4 AS cor0 WHERE + CAST ( NULL AS INTEGER ) <> NULL
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
diff --git a/data/sqlite/index/random/10/slt_good_1.slt b/data/sqlite/index/random/10/slt_good_1.slt
index 3ccc793..39132ad 100644
--- a/data/sqlite/index/random/10/slt_good_1.slt
+++ b/data/sqlite/index/random/10/slt_good_1.slt
@@ -13408,30 +13408,45 @@ SELECT - ( + 39 ) FROM tab4 AS cor0 WHERE NOT NULL IS NOT NULL
----
10 values hashing to e121a49f5083c0c58c774d880cfa1e9d
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2205
SELECT - AVG ( DISTINCT + 22 ) + + + AVG ( - + 62 ) + - COUNT ( * ) * - - 49 col0 FROM tab0 cor0 WHERE NOT + 59 * - col0 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2205
SELECT - AVG ( DISTINCT + 22 ) + + + AVG ( - + 62 ) + - COUNT ( * ) * - - 49 col0 FROM tab1 cor0 WHERE NOT + 59 * - col0 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2205
SELECT - AVG ( DISTINCT + 22 ) + + + AVG ( - + 62 ) + - COUNT ( * ) * - - 49 col0 FROM tab2 cor0 WHERE NOT + 59 * - col0 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2205
SELECT - AVG ( DISTINCT + 22 ) + + + AVG ( - + 62 ) + - COUNT ( * ) * - - 49 col0 FROM tab3 cor0 WHERE NOT + 59 * - col0 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2205
SELECT - AVG ( DISTINCT + 22 ) + + + AVG ( - + 62 ) + - COUNT ( * ) * - - 49 col0 FROM tab4 cor0 WHERE NOT + 59 * - col0 IS NOT NULL
+----
+NULL
query I rowsort label-2210
SELECT ALL + COUNT ( * ) FROM tab0 AS cor0 WHERE NOT col2 IS NOT NULL
diff --git a/data/sqlite/index/random/10/slt_good_10.slt b/data/sqlite/index/random/10/slt_good_10.slt
index 84a2839..4211395 100644
--- a/data/sqlite/index/random/10/slt_good_10.slt
+++ b/data/sqlite/index/random/10/slt_good_10.slt
@@ -16993,30 +16993,45 @@ query R rowsort label-2800
SELECT ALL col4 AS col3 FROM tab4 AS cor0 WHERE NOT NULL IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2805
SELECT COUNT ( * ) * ( + AVG ( DISTINCT ( col3 ) ) ) AS col4 FROM tab0 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2805
SELECT COUNT ( * ) * ( + AVG ( DISTINCT ( col3 ) ) ) AS col4 FROM tab1 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2805
SELECT COUNT ( * ) * ( + AVG ( DISTINCT ( col3 ) ) ) AS col4 FROM tab2 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2805
SELECT COUNT ( * ) * ( + AVG ( DISTINCT ( col3 ) ) ) AS col4 FROM tab3 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2805
SELECT COUNT ( * ) * ( + AVG ( DISTINCT ( col3 ) ) ) AS col4 FROM tab4 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort label-2810
SELECT col3 AS col5 FROM tab0 AS cor0 WHERE + 67 IS NULL
@@ -25968,30 +25983,45 @@ skipif postgres
query error DataFusion error: Error during planning: Unary operator '\+' only supports numeric, interval and timestamp types
SELECT + + ( + + 13 ) - + CAST ( - col1 AS INTEGER ) AS col1 FROM tab4 WHERE + col2 IS NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4250
SELECT 84 * + - 61 * + AVG ( DISTINCT ( 70 ) ) AS col2 FROM tab0 WHERE ( NULL ) BETWEEN NULL AND col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4250
SELECT 84 * + - 61 * + AVG ( DISTINCT ( 70 ) ) AS col2 FROM tab1 WHERE ( NULL ) BETWEEN NULL AND col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4250
SELECT 84 * + - 61 * + AVG ( DISTINCT ( 70 ) ) AS col2 FROM tab2 WHERE ( NULL ) BETWEEN NULL AND col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4250
SELECT 84 * + - 61 * + AVG ( DISTINCT ( 70 ) ) AS col2 FROM tab3 WHERE ( NULL ) BETWEEN NULL AND col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4250
SELECT 84 * + - 61 * + AVG ( DISTINCT ( 70 ) ) AS col2 FROM tab4 WHERE ( NULL ) BETWEEN NULL AND col3
+----
+NULL
query I rowsort label-4255
SELECT ALL + 90 FROM tab0 AS cor0 WHERE NOT col4 IS NULL
diff --git a/data/sqlite/index/random/10/slt_good_11.slt b/data/sqlite/index/random/10/slt_good_11.slt
index 1427baf..166d6af 100644
--- a/data/sqlite/index/random/10/slt_good_11.slt
+++ b/data/sqlite/index/random/10/slt_good_11.slt
@@ -36566,30 +36566,45 @@ query IIRTIRT rowsort label-5970
SELECT * FROM tab4 WHERE NOT + 77 - 6 IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5975
SELECT AVG ( DISTINCT - 54 ) col0 FROM tab0 WHERE 55 IN ( col1 * + 36 + + 75 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5975
SELECT AVG ( DISTINCT - 54 ) col0 FROM tab1 WHERE 55 IN ( col1 * + 36 + + 75 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5975
SELECT AVG ( DISTINCT - 54 ) col0 FROM tab2 WHERE 55 IN ( col1 * + 36 + + 75 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5975
SELECT AVG ( DISTINCT - 54 ) col0 FROM tab3 WHERE 55 IN ( col1 * + 36 + + 75 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5975
SELECT AVG ( DISTINCT - 54 ) col0 FROM tab4 WHERE 55 IN ( col1 * + 36 + + 75 )
+----
+NULL
# Postgresql - Postgres error: db error: ERROR: operator does not exist: + text
# Postgresql - HINT: No operator matches the given name and argument type. You might need to add an explicit type cast.
diff --git a/data/sqlite/index/random/10/slt_good_12.slt b/data/sqlite/index/random/10/slt_good_12.slt
index 457db62..b312ff8 100644
--- a/data/sqlite/index/random/10/slt_good_12.slt
+++ b/data/sqlite/index/random/10/slt_good_12.slt
@@ -9944,30 +9944,45 @@ query IIRTIRT rowsort label-1615
SELECT ALL * FROM tab4 WHERE NOT ( col3 ) < NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1620
SELECT DISTINCT AVG ( DISTINCT - 35 ) AS col0 FROM tab0 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND ( NULL )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1620
SELECT DISTINCT AVG ( DISTINCT - 35 ) AS col0 FROM tab1 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND ( NULL )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1620
SELECT DISTINCT AVG ( DISTINCT - 35 ) AS col0 FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND ( NULL )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1620
SELECT DISTINCT AVG ( DISTINCT - 35 ) AS col0 FROM tab3 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND ( NULL )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1620
SELECT DISTINCT AVG ( DISTINCT - 35 ) AS col0 FROM tab4 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND ( NULL )
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] [I]
@@ -44599,30 +44614,45 @@ query I rowsort label-7330
SELECT + col0 + - 80 AS col0 FROM tab4 AS cor0 WHERE NOT ( col1 * + 50 ) IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7335
SELECT - - AVG ( DISTINCT + 83 ) FROM tab0 AS cor0 WHERE NOT ( NULL ) = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7335
SELECT - - AVG ( DISTINCT + 83 ) FROM tab1 AS cor0 WHERE NOT ( NULL ) = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7335
SELECT - - AVG ( DISTINCT + 83 ) FROM tab2 AS cor0 WHERE NOT ( NULL ) = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7335
SELECT - - AVG ( DISTINCT + 83 ) FROM tab3 AS cor0 WHERE NOT ( NULL ) = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7335
SELECT - - AVG ( DISTINCT + 83 ) FROM tab4 AS cor0 WHERE NOT ( NULL ) = NULL
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
diff --git a/data/sqlite/index/random/10/slt_good_13.slt b/data/sqlite/index/random/10/slt_good_13.slt
index 1e83a8b..68255b1 100644
--- a/data/sqlite/index/random/10/slt_good_13.slt
+++ b/data/sqlite/index/random/10/slt_good_13.slt
@@ -33885,30 +33885,45 @@ query I rowsort label-5610
SELECT ALL - CAST ( - 46 AS INTEGER ) AS col4 FROM tab4 AS cor0 WHERE NULL = NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5615
SELECT AVG ( DISTINCT - - 65 ) FROM tab0 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5615
SELECT AVG ( DISTINCT - - 65 ) FROM tab1 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5615
SELECT AVG ( DISTINCT - - 65 ) FROM tab2 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5615
SELECT AVG ( DISTINCT - - 65 ) FROM tab3 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5615
SELECT AVG ( DISTINCT - - 65 ) FROM tab4 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] [I]
@@ -58015,30 +58030,45 @@ query IIRTIRT rowsort label-9610
SELECT * FROM tab4 WHERE 82 IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9615
SELECT DISTINCT + AVG ( DISTINCT + - 90 ) * 35 FROM tab0 cor0 WHERE NOT + col3 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9615
SELECT DISTINCT + AVG ( DISTINCT + - 90 ) * 35 FROM tab1 cor0 WHERE NOT + col3 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9615
SELECT DISTINCT + AVG ( DISTINCT + - 90 ) * 35 FROM tab2 cor0 WHERE NOT + col3 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9615
SELECT DISTINCT + AVG ( DISTINCT + - 90 ) * 35 FROM tab3 cor0 WHERE NOT + col3 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9615
SELECT DISTINCT + AVG ( DISTINCT + - 90 ) * 35 FROM tab4 cor0 WHERE NOT + col3 IS NOT NULL
+----
+NULL
# Datafusion - Data was automatically updated based on comparison db results
# Datafusion - Previous results:
diff --git a/data/sqlite/index/random/10/slt_good_3.slt b/data/sqlite/index/random/10/slt_good_3.slt
index 075f250..15d0f6d 100644
--- a/data/sqlite/index/random/10/slt_good_3.slt
+++ b/data/sqlite/index/random/10/slt_good_3.slt
@@ -14938,30 +14938,45 @@ query IIRTIRT rowsort label-2430
SELECT * FROM tab4 AS cor0 WHERE NOT - col1 <= NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2435
SELECT ALL + - AVG ( DISTINCT + ( + 27 ) ) FROM tab0 WHERE CAST ( - 43 AS INTEGER ) = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2435
SELECT ALL + - AVG ( DISTINCT + ( + 27 ) ) FROM tab1 WHERE CAST ( - 43 AS INTEGER ) = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2435
SELECT ALL + - AVG ( DISTINCT + ( + 27 ) ) FROM tab2 WHERE CAST ( - 43 AS INTEGER ) = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2435
SELECT ALL + - AVG ( DISTINCT + ( + 27 ) ) FROM tab3 WHERE CAST ( - 43 AS INTEGER ) = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2435
SELECT ALL + - AVG ( DISTINCT + ( + 27 ) ) FROM tab4 WHERE CAST ( - 43 AS INTEGER ) = NULL
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
@@ -27623,30 +27638,45 @@ query IIRTIRT rowsort label-4515
SELECT * FROM tab4 AS cor0 WHERE NOT + col0 NOT BETWEEN CAST ( NULL AS INTEGER ) / - + col3 AND NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4520
SELECT ALL + AVG ( DISTINCT + 55 ) AS col2 FROM tab0 AS cor0 WHERE NOT NULL <= ( NULL )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4520
SELECT ALL + AVG ( DISTINCT + 55 ) AS col2 FROM tab1 AS cor0 WHERE NOT NULL <= ( NULL )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4520
SELECT ALL + AVG ( DISTINCT + 55 ) AS col2 FROM tab2 AS cor0 WHERE NOT NULL <= ( NULL )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4520
SELECT ALL + AVG ( DISTINCT + 55 ) AS col2 FROM tab3 AS cor0 WHERE NOT NULL <= ( NULL )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4520
SELECT ALL + AVG ( DISTINCT + 55 ) AS col2 FROM tab4 AS cor0 WHERE NOT NULL <= ( NULL )
+----
+NULL
query I rowsort label-4525
SELECT + col0 AS col3 FROM tab0 AS cor0 WHERE NOT NULL >= NULL
diff --git a/data/sqlite/index/random/10/slt_good_5.slt b/data/sqlite/index/random/10/slt_good_5.slt
index 5a69d9b..84b92e9 100644
--- a/data/sqlite/index/random/10/slt_good_5.slt
+++ b/data/sqlite/index/random/10/slt_good_5.slt
@@ -6998,35 +6998,50 @@ query IIRTIRT rowsort label-1115
SELECT * FROM tab4 AS cor0 WHERE ( - col0 + - 4 + + ( - - 48 ) * - col0 + - + 3 * - col4 ) IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-1120
SELECT DISTINCT - MAX ( + col0 ), AVG ( DISTINCT - 74 ) col0 FROM tab0 AS cor0 WHERE NOT NULL <> ( + col0 * - + col4 )
+----
+NULL
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-1120
SELECT DISTINCT - MAX ( + col0 ), AVG ( DISTINCT - 74 ) col0 FROM tab1 AS cor0 WHERE NOT NULL <> ( + col0 * - + col4 )
+----
+NULL
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-1120
SELECT DISTINCT - MAX ( + col0 ), AVG ( DISTINCT - 74 ) col0 FROM tab2 AS cor0 WHERE NOT NULL <> ( + col0 * - + col4 )
+----
+NULL
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-1120
SELECT DISTINCT - MAX ( + col0 ), AVG ( DISTINCT - 74 ) col0 FROM tab3 AS cor0 WHERE NOT NULL <> ( + col0 * - + col4 )
+----
+NULL
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-1120
SELECT DISTINCT - MAX ( + col0 ), AVG ( DISTINCT - 74 ) col0 FROM tab4 AS cor0 WHERE NOT NULL <> ( + col0 * - + col4 )
+----
+NULL
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
@@ -18833,30 +18848,45 @@ query I rowsort label-3060
SELECT 76 AS col0 FROM tab4 AS cor0 WHERE NOT ( + 11 * - col4 ) IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3065
SELECT DISTINCT + AVG ( DISTINCT + 50 ) FROM tab0 WHERE NOT + col4 * + CAST ( NULL AS INTEGER ) - - col1 = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3065
SELECT DISTINCT + AVG ( DISTINCT + 50 ) FROM tab1 WHERE NOT + col4 * + CAST ( NULL AS INTEGER ) - - col1 = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3065
SELECT DISTINCT + AVG ( DISTINCT + 50 ) FROM tab2 WHERE NOT + col4 * + CAST ( NULL AS INTEGER ) - - col1 = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3065
SELECT DISTINCT + AVG ( DISTINCT + 50 ) FROM tab3 WHERE NOT + col4 * + CAST ( NULL AS INTEGER ) - - col1 = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3065
SELECT DISTINCT + AVG ( DISTINCT + 50 ) FROM tab4 WHERE NOT + col4 * + CAST ( NULL AS INTEGER ) - - col1 = NULL
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
@@ -55678,30 +55708,45 @@ query R rowsort label-9090
SELECT + col1 FROM tab4 AS cor0 WHERE NOT ( NULL ) IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9095
SELECT ALL + AVG ( DISTINCT + - 78 ) AS col5 FROM tab0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9095
SELECT ALL + AVG ( DISTINCT + - 78 ) AS col5 FROM tab1 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9095
SELECT ALL + AVG ( DISTINCT + - 78 ) AS col5 FROM tab2 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9095
SELECT ALL + AVG ( DISTINCT + - 78 ) AS col5 FROM tab3 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9095
SELECT ALL + AVG ( DISTINCT + - 78 ) AS col5 FROM tab4 WHERE NULL IS NOT NULL
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
diff --git a/data/sqlite/index/random/10/slt_good_6.slt b/data/sqlite/index/random/10/slt_good_6.slt
index f98cc8f..1577a35 100644
--- a/data/sqlite/index/random/10/slt_good_6.slt
+++ b/data/sqlite/index/random/10/slt_good_6.slt
@@ -29483,30 +29483,45 @@ query IIRTIRT rowsort label-4815
SELECT * FROM tab4 WHERE NOT + - 90 IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4820
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab0 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4820
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab1 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4820
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab2 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4820
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab3 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4820
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab4 WHERE NOT NULL <> - + 90
+----
+NULL
query I rowsort label-4825
SELECT - col0 FROM tab0 AS cor0 WHERE 96 IS NULL
diff --git a/data/sqlite/index/random/10/slt_good_7.slt b/data/sqlite/index/random/10/slt_good_7.slt
index d8dca65..a5e1188 100644
--- a/data/sqlite/index/random/10/slt_good_7.slt
+++ b/data/sqlite/index/random/10/slt_good_7.slt
@@ -32586,30 +32586,45 @@ query IIRTIRT rowsort label-5350
SELECT * FROM tab4 WHERE NOT + col0 * + - col4 + - + 55 * + col3 < NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5355
SELECT - COUNT ( * ) * AVG ( DISTINCT + col3 ) AS col3 FROM tab0 WHERE NOT NULL <= + + col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5355
SELECT - COUNT ( * ) * AVG ( DISTINCT + col3 ) AS col3 FROM tab1 WHERE NOT NULL <= + + col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5355
SELECT - COUNT ( * ) * AVG ( DISTINCT + col3 ) AS col3 FROM tab2 WHERE NOT NULL <= + + col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5355
SELECT - COUNT ( * ) * AVG ( DISTINCT + col3 ) AS col3 FROM tab3 WHERE NOT NULL <= + + col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5355
SELECT - COUNT ( * ) * AVG ( DISTINCT + col3 ) AS col3 FROM tab4 WHERE NOT NULL <= + + col3
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] [I]
diff --git a/data/sqlite/index/random/10/slt_good_8.slt b/data/sqlite/index/random/10/slt_good_8.slt
index 697db26..9822f94 100644
--- a/data/sqlite/index/random/10/slt_good_8.slt
+++ b/data/sqlite/index/random/10/slt_good_8.slt
@@ -35550,30 +35550,45 @@ query IIRTIRT rowsort label-5880
SELECT * FROM tab4 AS cor0 WHERE NOT ( NOT col3 BETWEEN NULL AND - col0 * - + col3 )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5885
SELECT DISTINCT AVG ( DISTINCT 92 ) FROM tab0 cor0 WHERE ( NULL ) IN ( - - 29, - col1, - - 36, 41 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5885
SELECT DISTINCT AVG ( DISTINCT 92 ) FROM tab1 cor0 WHERE ( NULL ) IN ( - - 29, - col1, - - 36, 41 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5885
SELECT DISTINCT AVG ( DISTINCT 92 ) FROM tab2 cor0 WHERE ( NULL ) IN ( - - 29, - col1, - - 36, 41 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5885
SELECT DISTINCT AVG ( DISTINCT 92 ) FROM tab3 cor0 WHERE ( NULL ) IN ( - - 29, - col1, - - 36, 41 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5885
SELECT DISTINCT AVG ( DISTINCT 92 ) FROM tab4 cor0 WHERE ( NULL ) IN ( - - 29, - col1, - - 36, 41 )
+----
+NULL
# Postgresql - Postgres error: db error: ERROR: operator does not exist: + text
# Postgresql - HINT: No operator matches the given name and argument type. You might need to add an explicit type cast.
@@ -49740,30 +49755,45 @@ query I rowsort label-8230
SELECT DISTINCT + col0 FROM tab4 AS cor0 WHERE ( 75 ) <> ( NULL )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8235
SELECT ALL AVG ( DISTINCT - 46 ) FROM tab0 WHERE ( NULL ) BETWEEN NULL AND - col0
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8235
SELECT ALL AVG ( DISTINCT - 46 ) FROM tab1 WHERE ( NULL ) BETWEEN NULL AND - col0
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8235
SELECT ALL AVG ( DISTINCT - 46 ) FROM tab2 WHERE ( NULL ) BETWEEN NULL AND - col0
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8235
SELECT ALL AVG ( DISTINCT - 46 ) FROM tab3 WHERE ( NULL ) BETWEEN NULL AND - col0
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8235
SELECT ALL AVG ( DISTINCT - 46 ) FROM tab4 WHERE ( NULL ) BETWEEN NULL AND - col0
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
@@ -52845,30 +52875,45 @@ query IIRTIRT rowsort label-8740
SELECT * FROM tab4 AS cor0 WHERE NOT 86 * 86 IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8745
SELECT ALL ( + 67 ) * - AVG ( DISTINCT + 65 ) AS col5 FROM tab0 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8745
SELECT ALL ( + 67 ) * - AVG ( DISTINCT + 65 ) AS col5 FROM tab1 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8745
SELECT ALL ( + 67 ) * - AVG ( DISTINCT + 65 ) AS col5 FROM tab2 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8745
SELECT ALL ( + 67 ) * - AVG ( DISTINCT + 65 ) AS col5 FROM tab3 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8745
SELECT ALL ( + 67 ) * - AVG ( DISTINCT + 65 ) AS col5 FROM tab4 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort label-8750
SELECT ALL - col3 AS col1 FROM tab0 WHERE NULL IS NULL
diff --git a/data/sqlite/index/random/10/slt_good_9.slt b/data/sqlite/index/random/10/slt_good_9.slt
index 35cba0c..ad9401f 100644
--- a/data/sqlite/index/random/10/slt_good_9.slt
+++ b/data/sqlite/index/random/10/slt_good_9.slt
@@ -28981,30 +28981,45 @@ query I rowsort label-4785
SELECT ALL + + col0 AS col1 FROM tab4 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4790
SELECT DISTINCT - + AVG ( DISTINCT + - 24 ) FROM tab0 WHERE NOT - + col3 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4790
SELECT DISTINCT - + AVG ( DISTINCT + - 24 ) FROM tab1 WHERE NOT - + col3 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4790
SELECT DISTINCT - + AVG ( DISTINCT + - 24 ) FROM tab2 WHERE NOT - + col3 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4790
SELECT DISTINCT - + AVG ( DISTINCT + - 24 ) FROM tab3 WHERE NOT - + col3 IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4790
SELECT DISTINCT - + AVG ( DISTINCT + - 24 ) FROM tab4 WHERE NOT - + col3 IS NOT NULL
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
@@ -48126,30 +48141,45 @@ query R rowsort label-7905
SELECT ALL - col4 AS col1 FROM tab4 AS cor0 WHERE ( NULL ) IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7910
SELECT ALL - AVG ( DISTINCT + - 87 ) FROM tab0 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7910
SELECT ALL - AVG ( DISTINCT + - 87 ) FROM tab1 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7910
SELECT ALL - AVG ( DISTINCT + - 87 ) FROM tab2 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7910
SELECT ALL - AVG ( DISTINCT + - 87 ) FROM tab3 WHERE NULL IS NOT NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7910
SELECT ALL - AVG ( DISTINCT + - 87 ) FROM tab4 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort label-7915
SELECT DISTINCT - col0 FROM tab0 WHERE + col0 IS NULL
diff --git a/data/sqlite/index/random/100/slt_good_0.slt b/data/sqlite/index/random/100/slt_good_0.slt
index 70e3917..2fae654 100644
--- a/data/sqlite/index/random/100/slt_good_0.slt
+++ b/data/sqlite/index/random/100/slt_good_0.slt
@@ -4059,30 +4059,45 @@ query IIRTIRT rowsort label-590
SELECT * FROM tab4 WHERE NOT + - 90 IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-595
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab0 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-595
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab1 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-595
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab2 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-595
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab3 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-595
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab4 WHERE NOT NULL <> - + 90
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
diff --git a/data/sqlite/index/random/100/slt_good_1.slt b/data/sqlite/index/random/100/slt_good_1.slt
index 595047c..4875b79 100644
--- a/data/sqlite/index/random/100/slt_good_1.slt
+++ b/data/sqlite/index/random/100/slt_good_1.slt
@@ -11099,30 +11099,45 @@ query IIRTIRT rowsort label-1770
SELECT * FROM tab4 WHERE NOT + col0 * + - col4 + - + 55 * + col3 < NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1775
SELECT - COUNT ( * ) * AVG ( DISTINCT + col3 ) AS col3 FROM tab0 WHERE NOT NULL <= + + col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1775
SELECT - COUNT ( * ) * AVG ( DISTINCT + col3 ) AS col3 FROM tab1 WHERE NOT NULL <= + + col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1775
SELECT - COUNT ( * ) * AVG ( DISTINCT + col3 ) AS col3 FROM tab2 WHERE NOT NULL <= + + col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1775
SELECT - COUNT ( * ) * AVG ( DISTINCT + col3 ) AS col3 FROM tab3 WHERE NOT NULL <= + + col3
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1775
SELECT - COUNT ( * ) * AVG ( DISTINCT + col3 ) AS col3 FROM tab4 WHERE NOT NULL <= + + col3
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] [I]
diff --git a/data/sqlite/index/random/1000/slt_good_0.slt b/data/sqlite/index/random/1000/slt_good_0.slt
index 8f44dae..2e1a28c 100644
--- a/data/sqlite/index/random/1000/slt_good_0.slt
+++ b/data/sqlite/index/random/1000/slt_good_0.slt
@@ -6035,30 +6035,45 @@ query IIRTIRT rowsort label-470
SELECT * FROM tab4 WHERE NOT + - 90 IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-475
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab0 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-475
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab1 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-475
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab2 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-475
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab3 WHERE NOT NULL <> - + 90
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-475
SELECT - AVG ( DISTINCT 27 ) + - MAX ( DISTINCT col1 ) AS col4 FROM tab4 WHERE NOT NULL <> - + 90
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
diff --git a/data/sqlite/index/random/1000/slt_good_7.slt b/data/sqlite/index/random/1000/slt_good_7.slt
index 9c4744e..90853aa 100644
--- a/data/sqlite/index/random/1000/slt_good_7.slt
+++ b/data/sqlite/index/random/1000/slt_good_7.slt
@@ -38245,30 +38245,45 @@ SELECT ALL col3 + ( 37 + 41 ) FROM tab4 WHERE ( - col4 ) NOT BETWEEN 94 AND 80 *
----
1000 values hashing to 72b3cc05002a4244592e415a18dc025e
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5770
SELECT ALL - AVG ( DISTINCT 48 ) AS col4 FROM tab0 WHERE NOT - col4 BETWEEN ( NULL ) AND CAST ( 2 AS INTEGER )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5770
SELECT ALL - AVG ( DISTINCT 48 ) AS col4 FROM tab1 WHERE NOT - col4 BETWEEN ( NULL ) AND CAST ( 2 AS INTEGER )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5770
SELECT ALL - AVG ( DISTINCT 48 ) AS col4 FROM tab2 WHERE NOT - col4 BETWEEN ( NULL ) AND CAST ( 2 AS INTEGER )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5770
SELECT ALL - AVG ( DISTINCT 48 ) AS col4 FROM tab3 WHERE NOT - col4 BETWEEN ( NULL ) AND CAST ( 2 AS INTEGER )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5770
SELECT ALL - AVG ( DISTINCT 48 ) AS col4 FROM tab4 WHERE NOT - col4 BETWEEN ( NULL ) AND CAST ( 2 AS INTEGER )
+----
+NULL
query I rowsort label-5775
SELECT DISTINCT - ( - COUNT ( * ) ) AS col2 FROM tab0 WHERE NULL IS NULL
diff --git a/data/sqlite/index/random/1000/slt_good_8.slt b/data/sqlite/index/random/1000/slt_good_8.slt
index 538ff9d..8bf2d33 100644
--- a/data/sqlite/index/random/1000/slt_good_8.slt
+++ b/data/sqlite/index/random/1000/slt_good_8.slt
@@ -17755,30 +17755,45 @@ query I rowsort label-2440
SELECT 97 FROM tab4 AS cor0 WHERE NOT NULL BETWEEN 1 AND NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2445
SELECT DISTINCT - COUNT ( * ) * AVG ( DISTINCT + 89 ) col4 FROM tab0 AS cor0 WHERE NULL NOT IN ( CAST ( NULL AS INTEGER ) + - 15 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2445
SELECT DISTINCT - COUNT ( * ) * AVG ( DISTINCT + 89 ) col4 FROM tab1 AS cor0 WHERE NULL NOT IN ( CAST ( NULL AS INTEGER ) + - 15 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2445
SELECT DISTINCT - COUNT ( * ) * AVG ( DISTINCT + 89 ) col4 FROM tab2 AS cor0 WHERE NULL NOT IN ( CAST ( NULL AS INTEGER ) + - 15 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2445
SELECT DISTINCT - COUNT ( * ) * AVG ( DISTINCT + 89 ) col4 FROM tab3 AS cor0 WHERE NULL NOT IN ( CAST ( NULL AS INTEGER ) + - 15 )
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2445
SELECT DISTINCT - COUNT ( * ) * AVG ( DISTINCT + 89 ) col4 FROM tab4 AS cor0 WHERE NULL NOT IN ( CAST ( NULL AS INTEGER ) + - 15 )
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] III[I][I][I][I]
diff --git a/data/sqlite/random/aggregates/slt_good_0.slt b/data/sqlite/random/aggregates/slt_good_0.slt
index 45d1bbb..be4e955 100644
--- a/data/sqlite/random/aggregates/slt_good_0.slt
+++ b/data/sqlite/random/aggregates/slt_good_0.slt
@@ -3457,10 +3457,13 @@ SELECT ALL col0 * + + 22 AS col0 FROM tab2
1408
1650
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-563
SELECT AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) / CAST ( - + 77 AS INTEGER ) + - 47 AS col1 FROM tab1
+----
+NULL
query II rowsort label-564
SELECT ALL + COUNT ( * ) AS col2, 38 AS col0 FROM tab1
@@ -6016,10 +6019,13 @@ SELECT DISTINCT + col1 + col0 * + + col0 FROM tab0 cor0
7590
9410
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT ( - AVG ( DISTINCT + 59 ) ) AS col0 FROM tab0 AS cor0 WHERE 56 BETWEEN + - col1 * col2 * col1 + - col0 + - col1 * - - 13 + - col2 + - col1 + + 97 AND NULL
+----
+NULL
query I rowsort label-992
SELECT DISTINCT + MIN ( DISTINCT col0 ) col0 FROM tab0 AS cor0
@@ -14375,10 +14381,10 @@ NULL
NULL
-77
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-2377
SELECT DISTINCT + + 8 * COUNT ( col2 ) * - CAST ( + - AVG ( DISTINCT + 87 ) AS INTEGER ) * - + COUNT ( * ) FROM tab1 WHERE NOT - - 0 * + - 16 < col0
+----
+NULL
query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT 34 = - - 76
@@ -33871,10 +33877,13 @@ query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL >= ( 41 )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5591
SELECT ALL - AVG ( DISTINCT 26 ) FROM tab1 WHERE NOT col1 > ( CAST ( NULL AS INTEGER ) )
+----
+NULL
query I rowsort label-5592
SELECT - COUNT ( * ) + - COUNT ( * ) AS col1 FROM tab0 WHERE NOT NULL NOT BETWEEN - 14 AND + 14 - col2 * col2
diff --git a/data/sqlite/random/aggregates/slt_good_1.slt b/data/sqlite/random/aggregates/slt_good_1.slt
index e8c9828..e538c68 100644
--- a/data/sqlite/random/aggregates/slt_good_1.slt
+++ b/data/sqlite/random/aggregates/slt_good_1.slt
@@ -35700,10 +35700,13 @@ SELECT 90 * - COUNT ( * ) AS col0 FROM tab2
----
-270
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6007
SELECT AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) * + 37 AS col1 FROM tab0
+----
+NULL
query I rowsort
SELECT DISTINCT + 66 * - + col1 col0 FROM tab0
@@ -39298,10 +39301,13 @@ query III rowsort label-6612
SELECT * FROM tab1 WHERE + CAST ( NULL AS INTEGER ) IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6613
SELECT ALL + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) + MIN ( + col2 ) col1 FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT DISTINCT + 82 * 64 FROM tab1 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_10.slt b/data/sqlite/random/aggregates/slt_good_10.slt
index 8c6f97d..3424f71 100644
--- a/data/sqlite/random/aggregates/slt_good_10.slt
+++ b/data/sqlite/random/aggregates/slt_good_10.slt
@@ -2614,10 +2614,13 @@ query I rowsort
SELECT col0 + + col1 FROM tab0 WHERE NOT NULL IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-414
SELECT ALL - 86 + - AVG ( DISTINCT - col2 ) * + COUNT ( * ) AS col2 FROM tab1 WHERE 61 <= ( NULL )
+----
+NULL
query III rowsort
SELECT * FROM tab2 WHERE + col2 - col0 IS NULL
@@ -3593,10 +3596,13 @@ SELECT ALL + col1 * + - 20 FROM tab1 AS cor0
query error DataFusion error: Error during planning: Projections require unique expression names but the expression "count\(Int64\(1\)\) AS count\(\*\) AS col2" at position 0 and "Int64\(\-47\) \+ \(\- count\(Int64\(1\)\) AS count\(\*\)\) AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\.
SELECT ALL COUNT ( * ) col2, - 47 + - COUNT ( * ) AS col2 FROM tab0 AS cor0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-583
SELECT AVG ( DISTINCT CAST ( - - CAST ( NULL AS INTEGER ) AS INTEGER ) ) AS col2 FROM tab0 cor0
+----
+NULL
query II rowsort label-584
SELECT - COUNT ( * ), 18 AS col0 FROM tab1 AS cor0
@@ -4749,10 +4755,13 @@ SELECT DISTINCT + - CAST ( - COUNT ( * ) AS INTEGER ) AS col2 FROM tab2 cor0
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( DISTINCT - 18 ) AS col2 FROM tab2 AS cor0 WHERE NOT col1 * - col2 < NULL
+----
+NULL
query II rowsort
SELECT DISTINCT - - col0 * - - col1 AS col0, col0 * - - 40 + - col2 + - + col0 + col0 FROM tab0 AS cor0
@@ -7537,10 +7546,13 @@ SELECT DISTINCT col1 / - - col1 + - 38 AS col1 FROM tab0 AS cor0 WHERE - col1 *
----
-37
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT - 44 * - AVG ( DISTINCT - 91 ) AS col2 FROM tab2 WHERE NOT - 75 <> - col1
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - 46
@@ -17225,10 +17237,13 @@ SELECT ALL + col2 + + col1 + + 56, col2 FROM tab1 AS cor0
171
68
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2819
SELECT DISTINCT AVG ( DISTINCT + 2 ) - COUNT ( * ) AS col2 FROM tab1 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort
SELECT ALL 78 + col1 AS col2 FROM tab2 AS cor0
@@ -23625,10 +23640,10 @@ query III rowsort label-3867
SELECT DISTINCT * FROM tab0 AS cor0 WHERE NOT col2 * + col0 > CAST ( NULL AS INTEGER ) * 58 + + CAST ( NULL AS INTEGER ) - + 68
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 8
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-3868
SELECT ALL + CAST ( - AVG ( DISTINCT - 8 ) AS INTEGER ) FROM tab2
+----
+8
query I rowsort
SELECT - col1 / col1 FROM tab1 WHERE NOT 31 <> + + col2
@@ -27577,10 +27592,13 @@ SELECT DISTINCT - + 8 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-8
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4511
SELECT DISTINCT + AVG ( DISTINCT + + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab1
+----
+NULL
query III rowsort
SELECT * FROM tab2 WHERE NOT NULL = 3 * + col1
@@ -32306,10 +32324,13 @@ SELECT DISTINCT CAST ( - + AVG ( ( - 72 ) ) AS INTEGER ) FROM tab2 AS cor0
query error DataFusion error: Schema error: Schema contains qualified field name cor0\.col2 and unqualified field name col2 which would be ambiguous
SELECT - + 27 AS col2, col2 FROM tab2 AS cor0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5269
SELECT DISTINCT + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col2 FROM tab0
+----
+NULL
query II rowsort
SELECT DISTINCT col0 + - - col0 - + col2 AS col1, - 75 * 14 FROM tab0 WHERE - col1 >= + col1 / 66 * + + col1
@@ -36752,10 +36773,13 @@ SELECT ALL - col0 - + - 11 AS col1 FROM tab1 AS cor0
-74
-80
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL - AVG ( DISTINCT + - 1 ) AS col0 FROM tab2 AS cor0 WHERE NOT NULL <> 14
+----
+NULL
query I rowsort
SELECT DISTINCT 13 FROM tab0 AS cor0 WHERE NULL IS NULL
@@ -41840,10 +41864,13 @@ SELECT DISTINCT + col2 + - col0 - + 57 FROM tab0 AS cor0
-25
-55
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6834
SELECT + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) + + 70 + - MAX ( - + col1 ) AS col1 FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT ALL col1 * - col0 + + col0 + + 86 + - col2 + col2 FROM tab2 cor0
@@ -42462,10 +42489,13 @@ SELECT DISTINCT - col0 * col1 / - - 58 FROM tab2
-84
-86
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6933
SELECT + + AVG ( DISTINCT + + 70 ) * + COUNT ( * ) AS col1 FROM tab0 AS cor0 WHERE col0 <> NULL
+----
+NULL
query I rowsort
SELECT 9 + - - col1 + + + 52 + col1 AS col2 FROM tab1 AS cor0
@@ -52912,10 +52942,13 @@ SELECT + COUNT ( * ) * + 17 AS col0 FROM tab1 AS cor0
----
51
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT AVG ( DISTINCT - 61 ) FROM tab0 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort
SELECT DISTINCT - + col0 * ( + + col0 ) FROM tab1 cor0
@@ -53816,10 +53849,13 @@ SELECT + + col2 + + 54 * col2 * col0 FROM tab0 AS cor0
46990
518661
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8814
SELECT ALL AVG ( DISTINCT + + 89 ) + - MIN ( DISTINCT + col1 ) FROM tab0 AS cor0 WHERE NOT CAST ( NULL AS INTEGER ) IS NULL
+----
+NULL
query I rowsort label-8815
SELECT SUM ( - col0 ) + - 43 FROM tab2 cor0
diff --git a/data/sqlite/random/aggregates/slt_good_100.slt b/data/sqlite/random/aggregates/slt_good_100.slt
index 1d46d2e..03343e5 100644
--- a/data/sqlite/random/aggregates/slt_good_100.slt
+++ b/data/sqlite/random/aggregates/slt_good_100.slt
@@ -5988,10 +5988,13 @@ SELECT * FROM tab0 AS cor0 WHERE ( + - 60 NOT IN ( - - 49, + col0 + - 62, + 69,
----
9 values hashing to c4b42765dff94eaaa46040e537fb43b7
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-983
SELECT DISTINCT - + 90 * - AVG ( DISTINCT CAST ( NULL AS FLOAT8 ) ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
+----
+NULL
query I rowsort label-984
SELECT - 60 * COUNT ( * ) * + COUNT ( * ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
@@ -36032,10 +36035,13 @@ SELECT ALL col1 * 31 + + 10 + - col2 FROM tab2
2029
2357
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5923
SELECT COUNT ( * ) * - 21 - - - AVG ( DISTINCT + 91 ) + + COUNT ( * ) FROM tab0 WHERE NULL IS NOT NULL
+----
+NULL
query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NOT 9 IS NULL
@@ -47563,10 +47569,13 @@ SELECT ALL * FROM tab2 AS cor0 WHERE 20 IS NOT NULL
----
9 values hashing to 75c998aa53ac83218cbf2feb962d0a49
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL AVG ( DISTINCT + 74 ) FROM tab1 AS cor0 WHERE NULL <> col1 * - - 88 * - col2 * - 45
+----
+NULL
query I rowsort
SELECT - + 93 * + 50 FROM tab1 AS cor0
@@ -49486,10 +49495,10 @@ query I rowsort
SELECT + 11 + + col2 AS col0 FROM tab2 AS cor0 WHERE NOT col0 NOT BETWEEN NULL AND col2
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 184
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-8132
SELECT ALL CAST ( - AVG ( DISTINCT + ( col2 ) ) AS INTEGER ) + - + 75 + - 73 * - COUNT ( * ) + + 92 AS col2 FROM tab0 AS cor0
+----
+184
query I rowsort
SELECT DISTINCT - col1 * - 23 * ( - + col1 ) AS col0 FROM tab2 AS cor0
@@ -52786,10 +52795,13 @@ SELECT DISTINCT - 0 + - COUNT ( * ) AS col1 FROM tab1 AS cor0
----
-3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8679
SELECT ALL - AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) FROM tab1 WHERE NOT NULL IS NULL
+----
+NULL
query II rowsort
SELECT DISTINCT col2 AS col1, col2 + + col2 FROM tab2 WHERE NOT NULL <> 74 * 82 + - - 58
diff --git a/data/sqlite/random/aggregates/slt_good_101.slt b/data/sqlite/random/aggregates/slt_good_101.slt
index e746dc7..4bf615e 100644
--- a/data/sqlite/random/aggregates/slt_good_101.slt
+++ b/data/sqlite/random/aggregates/slt_good_101.slt
@@ -19520,10 +19520,13 @@ SELECT - - MIN ( col0 ) / COUNT ( * ) FROM tab0 AS cor0
query error DataFusion error: Error during planning: Projections require unique expression names but the expression "cor0\.col0 / Int64\(53\) AS col2" at position 0 and "cor0\.col0 AS col2" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\.
SELECT ALL + col0 / + 53 AS col2, col0 AS col2 FROM tab2 AS cor0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT - AVG ( DISTINCT - 6 ) AS col0 FROM tab1 cor0 WHERE NOT NULL <> NULL
+----
+NULL
query I rowsort
SELECT ALL + - 54 AS col0 FROM tab0 AS cor0
@@ -33813,10 +33816,13 @@ SELECT ALL 68 * - col2 col1 FROM tab1 AS cor0
-4624
-6528
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT + + 91 ) FROM tab2 AS cor0 WHERE col0 + + col1 / - - col0 IS NULL
+----
+NULL
query III rowsort
SELECT * FROM tab0 cor0 WHERE col2 * col0 IS NULL
@@ -36959,10 +36965,13 @@ SELECT 53 + col1 AS col2 FROM tab1
58
67
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( DISTINCT 48 ) FROM tab2 WHERE NULL NOT IN ( - col1 )
+----
+NULL
query I rowsort
SELECT - col0 / - col2 col2 FROM tab2 WHERE + col0 IS NULL
@@ -38143,10 +38152,13 @@ SELECT ALL col2 * - col2 - + col2 FROM tab0 AS cor0
-2256
-9900
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6271
SELECT 72 + + - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0
+----
+NULL
query I rowsort
SELECT 59 AS col1 FROM tab0 AS cor0 WHERE 44 < + col2 * + col1
@@ -48396,11 +48408,14 @@ SELECT - COUNT ( + + col1 ) * COUNT ( * ) AS col0 FROM tab2 WHERE NULL < col2
----
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - 73
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]I
+# Datafusion - [Actual ] [R]I
+query RI rowsort label-7923
SELECT DISTINCT - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) + - 57, + 73 col1 FROM tab0
+----
+NULL
+73
query II rowsort
SELECT DISTINCT + col2, - ( - + col0 ) FROM tab0 AS cor0 WHERE - col0 IS NOT NULL
@@ -59926,10 +59941,13 @@ query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL = + 59 * + col1
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9812
SELECT ALL - + AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
+----
+NULL
query I rowsort label-9813
SELECT col0 AS col1 FROM tab0 AS cor0 WHERE NOT - 41 < - col2 + 46 * - col1 + + CAST ( NULL AS INTEGER )
diff --git a/data/sqlite/random/aggregates/slt_good_102.slt b/data/sqlite/random/aggregates/slt_good_102.slt
index ae6add9..849f564 100644
--- a/data/sqlite/random/aggregates/slt_good_102.slt
+++ b/data/sqlite/random/aggregates/slt_good_102.slt
@@ -2527,10 +2527,13 @@ query III rowsort
SELECT * FROM tab0 WHERE NOT + col2 * - 30 IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-410
SELECT DISTINCT 84 * - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab2
+----
+NULL
query I rowsort
SELECT + col0 * - 13 col1 FROM tab0
@@ -3109,10 +3112,13 @@ SELECT ( - + col1 ) + - + col0 FROM tab2 AS cor0
-142
-97
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-502
SELECT DISTINCT - AVG ( DISTINCT - CAST ( + CAST ( NULL AS INTEGER ) AS INTEGER ) ) FROM tab0 AS cor0
+----
+NULL
query I rowsort
SELECT ALL col2 col0 FROM tab0 AS cor0 WHERE NOT 92 IS NULL
@@ -4278,10 +4284,13 @@ SELECT CAST ( NULL AS INTEGER ) + + SUM ( DISTINCT - ( - + col0 ) ) AS col1 FROM
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-691
SELECT + AVG ( DISTINCT CAST ( NULL AS FLOAT8 ) ) FROM tab0
+----
+NULL
query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + 43 * - - col2 + - - 50 <> - ( - 2 )
@@ -6940,10 +6949,13 @@ query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL <> + 71
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1133
SELECT ALL AVG ( DISTINCT - ( + CAST ( NULL AS INTEGER ) ) ) FROM tab2
+----
+NULL
query I rowsort label-1134
SELECT + CAST ( + 14 AS INTEGER ) FROM tab0
@@ -12649,10 +12661,13 @@ query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab2 AS cor0 WHERE NOT 62 * col2 <> + - 1
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2064
SELECT ALL COUNT ( * ) * - MAX ( - col1 ) * - + AVG ( DISTINCT + col0 ) FROM tab2 AS cor0 WHERE NULL BETWEEN NULL AND NULL
+----
+NULL
query I rowsort
SELECT ALL 33 * - - ( col1 ) AS col2 FROM tab2 AS cor0
@@ -19006,10 +19021,13 @@ query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + 49 = + col2
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT AVG ( DISTINCT - col1 ) * + AVG ( ALL + col2 ) + 39 AS col1 FROM tab1 WHERE col2 IS NULL
+----
+NULL
query I rowsort
SELECT DISTINCT 60 - col2 * col1 AS col2 FROM tab1
@@ -21298,10 +21316,13 @@ SELECT ALL MIN ( + - col2 ) AS col0 FROM tab0 AS cor0
----
-99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3477
SELECT ALL AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab2 cor0
+----
+NULL
query I rowsort
SELECT - + col0 + - col2 * - col1 AS col2 FROM tab0 AS cor0 WHERE NOT - 86 * - + col2 NOT BETWEEN + + ( + 18 ) AND - 28 * - 23
@@ -37634,10 +37655,13 @@ SELECT + COUNT ( - - ( + - col0 ) ) AS col1 FROM tab0 AS cor0
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6162
SELECT AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col0 FROM tab0 cor0
+----
+NULL
query I rowsort label-6163
SELECT DISTINCT - - SUM ( - + 29 ) AS col0 FROM tab1 AS cor0
@@ -48908,10 +48932,13 @@ SELECT - col0 / - - col2 FROM tab1
-1
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8014
SELECT AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) FROM tab2
+----
+NULL
query I rowsort
SELECT DISTINCT - col0 * - 47 FROM tab2 AS cor0
@@ -50027,10 +50054,13 @@ SELECT ALL col0 / 7 FROM tab2 AS cor0
6
9
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8199
SELECT DISTINCT + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) col2 FROM tab1 AS cor0
+----
+NULL
query I rowsort label-8200
SELECT DISTINCT SUM ( 64 ) FROM tab0 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_103.slt b/data/sqlite/random/aggregates/slt_good_103.slt
index 716579f..b7be320 100644
--- a/data/sqlite/random/aggregates/slt_good_103.slt
+++ b/data/sqlite/random/aggregates/slt_good_103.slt
@@ -2926,10 +2926,13 @@ SELECT - col1 - - 92 FROM tab0 AS cor0
71
91
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-474
SELECT ALL + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) * + 79 - COUNT ( * ) * + 7 AS col2 FROM tab2 cor0
+----
+NULL
query I rowsort label-475
SELECT 80 / ( col2 ) + + 30 AS col0 FROM tab0 AS cor0
@@ -3865,10 +3868,13 @@ query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 WHERE col0 + - 8 <> NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-632
SELECT - - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) * - 76 AS col1 FROM tab0 AS cor0
+----
+NULL
query I rowsort
SELECT - 54 * 78 FROM tab2 cor0
@@ -4178,10 +4184,13 @@ SELECT - COUNT ( * ) AS col2 FROM tab2 WHERE - - col1 IS NOT NULL
----
-3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT + 69 ) col0 FROM tab0 WHERE + + col1 IS NULL
+----
+NULL
query III rowsort label-689
SELECT * FROM tab1 WHERE + CAST ( col0 AS INTEGER ) < + + col2
@@ -4287,10 +4296,13 @@ SELECT - - MIN ( + 37 ) FROM tab1 AS cor0
----
37
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-707
SELECT - + ( - AVG ( DISTINCT - CAST ( NULL AS FLOAT8 ) ) ) FROM tab0 AS cor0
+----
+NULL
query I rowsort
SELECT DISTINCT - + col2 * col2 FROM tab2 cor0 WHERE ( NULL ) IS NOT NULL
@@ -7774,10 +7786,10 @@ SELECT DISTINCT COUNT ( * ) - + + MAX ( - - col1 ) col2 FROM tab2 cor0
----
-74
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 40
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-1274
SELECT ALL + CAST ( - AVG ( DISTINCT - + 40 ) AS INTEGER ) AS col1 FROM tab1 AS cor0
+----
+40
query I rowsort label-1275
SELECT - 85 / - + col0 AS col2 FROM tab0 AS cor0
@@ -10325,11 +10337,11 @@ SELECT DISTINCT - 92 * col2 FROM tab2
-3680
-5336
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - 0
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query II rowsort label-1700
SELECT + CAST ( + AVG ( DISTINCT 17 ) AS INTEGER ) AS col2, COUNT ( * ) AS col1 FROM tab1 WHERE NOT NULL BETWEEN NULL AND + - col1
+----
+NULL
+0
query I rowsort
SELECT DISTINCT col0 * - ( ( - - col0 ) ) FROM tab1
@@ -12184,10 +12196,13 @@ SELECT + col0 + col1 + - col1 FROM tab0 cor0
87
97
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2007
SELECT 25 + COUNT ( * ) - + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query III rowsort
SELECT * FROM tab0 AS cor0 WHERE 24 IS NULL
@@ -14594,10 +14609,13 @@ query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 WHERE NOT - - 67 * - 41 IS NOT NULL AND NOT NULL IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2408
SELECT - ( 0 ) * + + COUNT ( ALL - - col1 ) + + 75 + AVG ( DISTINCT - 89 ) FROM tab2 AS cor0 WHERE ( NULL ) <> + - ( - col1 ) * - col0
+----
+NULL
query I rowsort label-2409
SELECT COUNT ( * ) + - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
@@ -45175,10 +45193,13 @@ SELECT ALL SUM ( DISTINCT - 63 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-63
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7448
SELECT - AVG ( DISTINCT ( - - CAST ( NULL AS FLOAT8 ) ) ) FROM tab1
+----
+NULL
query I rowsort label-7449
SELECT COUNT ( DISTINCT + col2 ) AS col2 FROM tab0 cor0 WHERE NOT ( col0 ) <> NULL
@@ -48205,10 +48226,13 @@ SELECT ALL MAX ( - + col0 ) FROM tab0
----
-15
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7939
SELECT + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col0 FROM tab0
+----
+NULL
query I rowsort
SELECT ALL ( 59 ) AS col0 FROM tab0
@@ -52957,10 +52981,13 @@ SELECT DISTINCT - col2 * - + CAST ( NULL AS INTEGER ) col1 FROM tab1
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8719
SELECT DISTINCT - AVG ( DISTINCT + CAST ( NULL AS FLOAT8 ) ) FROM tab0
+----
+NULL
query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT IN ( 93, + col2, col1 )
diff --git a/data/sqlite/random/aggregates/slt_good_104.slt b/data/sqlite/random/aggregates/slt_good_104.slt
index 42d5c2c..c99b8b4 100644
--- a/data/sqlite/random/aggregates/slt_good_104.slt
+++ b/data/sqlite/random/aggregates/slt_good_104.slt
@@ -19529,10 +19529,13 @@ SELECT DISTINCT + 51 * col0 col0, - 25 AS col2 FROM tab2
3825
-25
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3221
SELECT - AVG ( DISTINCT - col1 ) * SUM ( DISTINCT - col2 ) FROM tab2 cor0 WHERE - 94 * - 24 * col1 IS NULL
+----
+NULL
query I rowsort label-3222
SELECT ALL - CAST ( NULL AS INTEGER ) * - col1 + col0 AS col0 FROM tab1 cor0
@@ -23051,10 +23054,13 @@ SELECT COUNT ( * ) * COUNT ( - 5 ) FROM tab0
----
9
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( DISTINCT + 38 ) AS col2 FROM tab1 WHERE 54 * + ( 32 ) - ( + col1 ) < NULL
+----
+NULL
query I rowsort
SELECT col2 AS col1 FROM tab2 WHERE NOT NULL < - col1
@@ -35364,10 +35370,13 @@ SELECT col0, col2 * - col2 + + ( 91 ) FROM tab1
91
-4533
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT 86 ) FROM tab0 WHERE 26 / 97 + + col1 * + col2 IS NULL
+----
+NULL
query I rowsort label-5830
SELECT - COUNT ( * ) / - CAST ( NULL AS INTEGER ) FROM tab0
diff --git a/data/sqlite/random/aggregates/slt_good_105.slt b/data/sqlite/random/aggregates/slt_good_105.slt
index 38ca515..7462d5a 100644
--- a/data/sqlite/random/aggregates/slt_good_105.slt
+++ b/data/sqlite/random/aggregates/slt_good_105.slt
@@ -902,10 +902,13 @@ SELECT ALL + 71 AS col0, ( - - CAST ( - CAST ( + MIN ( ALL - col2 ) AS INTEGER )
71
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT - AVG ( DISTINCT - 39 ) AS col2 FROM tab1 AS cor0 WHERE NULL < NULL
+----
+NULL
query I rowsort label-144
SELECT ALL MAX ( ALL - - 2 ) AS col2 FROM tab1 AS cor0
@@ -2964,10 +2967,13 @@ SELECT * FROM tab0 AS cor0 WHERE + 82 BETWEEN - + ( - - 41 ) AND col2
1
99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT - 17 ) FROM tab2 AS cor0 WHERE col1 < ( - col2 )
+----
+NULL
query II rowsort
SELECT - col0 * col2 * - 91, - col0 + + + 3 FROM tab2 AS cor0 WHERE NULL IS NOT NULL
@@ -5416,10 +5422,13 @@ SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 WHERE NOT (
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-876
SELECT ALL AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) FROM tab0 cor0
+----
+NULL
query I rowsort
SELECT ALL - col1 * + - 4 + + - col0 * col0 FROM tab2 AS cor0 WHERE NULL >= - 22
@@ -9031,10 +9040,13 @@ SELECT + 41 + col2 col1 FROM tab2
81
99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1466
SELECT DISTINCT AVG ( DISTINCT ( CAST ( NULL AS INTEGER ) ) ) FROM tab0 AS cor0
+----
+NULL
query I rowsort label-1467
SELECT 45 * - ( COUNT ( * ) ) FROM tab2 AS cor0
@@ -14982,10 +14994,13 @@ query I rowsort
SELECT + col0 * + col1 + + 18 col2 FROM tab0 cor0 WHERE NULL IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2439
SELECT ALL - COUNT ( * ) * - AVG ( DISTINCT + 34 ) AS col2 FROM tab0 AS cor0 WHERE NOT NULL >= NULL
+----
+NULL
query II rowsort label-2440
SELECT DISTINCT + col2 * - CAST ( NULL AS INTEGER ) AS col1, - 7 FROM tab2
@@ -23210,10 +23225,13 @@ SELECT SUM ( DISTINCT - 36 ) * COUNT ( * ) AS col1 FROM tab2
----
-108
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3800
SELECT ALL + + AVG ( DISTINCT + - CAST ( NULL AS INTEGER ) ) AS col2 FROM tab1 AS cor0
+----
+NULL
query III rowsort
SELECT * FROM tab1 WHERE col1 IS NOT NULL OR NOT NULL IS NULL
@@ -24226,10 +24244,13 @@ SELECT ALL col2 * - + CAST ( + 52 AS INTEGER ) AS col0 FROM tab1
-3536
-4992
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3979
SELECT DISTINCT AVG ( DISTINCT 22 ) AS col1 FROM tab0 WHERE NOT ( + - CAST ( NULL AS INTEGER ) + + 47 + + col2 ) NOT BETWEEN + 13 AND + 74
+----
+NULL
query I rowsort
SELECT - col0 AS col1 FROM tab0 WHERE NULL IN ( + + col0 / col0 / ( + 67 * 85 ) + col2 )
@@ -46226,10 +46247,13 @@ SELECT ALL + COUNT ( * ) - - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT - 66 ) FROM tab2 AS cor0 WHERE NULL < ( col1 - - col1 * - 19 )
+----
+NULL
query I rowsort
SELECT - col1 + + 56 AS col1 FROM tab1 AS cor0
@@ -54849,10 +54873,13 @@ SELECT DISTINCT - 83 + col0 AS col0 FROM tab0
14
4
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9000
SELECT DISTINCT ( - AVG ( DISTINCT 21 ) ) + - SUM ( DISTINCT + col1 ) * - AVG ( DISTINCT 25 + col0 ) col0 FROM tab0 WHERE NULL IN ( + col1 - + col0 )
+----
+NULL
query I rowsort
SELECT DISTINCT 6 * - col0 FROM tab1
@@ -59783,10 +59810,13 @@ SELECT ALL + 23 * + + 64 + - - COUNT ( * ) col1 FROM tab2 WHERE NOT + col0 IS NO
----
1472
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9811
SELECT ALL + AVG ( DISTINCT + col2 ) / - + COUNT ( * ) * COUNT ( * ) AS col1 FROM tab1 WHERE NOT ( 41 ) NOT BETWEEN NULL AND - col1
+----
+NULL
query I rowsort
SELECT DISTINCT - col2 * - + col0 AS col1 FROM tab0 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_106.slt b/data/sqlite/random/aggregates/slt_good_106.slt
index 269618b..9ae4b91 100644
--- a/data/sqlite/random/aggregates/slt_good_106.slt
+++ b/data/sqlite/random/aggregates/slt_good_106.slt
@@ -1474,10 +1474,13 @@ SELECT DISTINCT SUM ( + + 66 ) FROM tab1 cor0
----
198
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-230
SELECT - + SUM ( - + col2 ) * COUNT ( * ) / + + MAX ( DISTINCT col1 ) * - AVG ( DISTINCT col2 ) AS col2 FROM tab2 AS cor0 WHERE NOT NULL >= col0
+----
+NULL
query I rowsort
SELECT DISTINCT - col1 col2 FROM tab1 AS cor0 WHERE NULL IS NULL
@@ -8464,10 +8467,13 @@ SELECT ALL - + COUNT ( col1 ), - 37 AS col0 FROM tab2 AS cor0
-3
-37
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - 78 * AVG ( DISTINCT - 33 ) FROM tab1 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort
SELECT DISTINCT - - col2 FROM tab1 AS cor0 WHERE ( NULL ) > - + 63
@@ -8788,15 +8794,21 @@ SELECT - - col1 * + + col1 + + col0 col0 FROM tab0 AS cor0
6576
98
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1452
SELECT - AVG ( DISTINCT - 58 ) FROM tab1 AS cor0 WHERE NOT - CAST ( 67 AS INTEGER ) = NULL
+----
+NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1453
SELECT AVG ( DISTINCT + + CAST ( NULL AS INTEGER ) ) FROM tab0
+----
+NULL
query I rowsort
SELECT ( + ( + 49 ) ) FROM tab2
@@ -16420,10 +16432,13 @@ query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab0 WHERE + + col2 + + col1 IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2731
SELECT DISTINCT AVG ( DISTINCT 17 ) + - COUNT ( * ) + - - 27 AS col0 FROM tab2 WHERE NOT 33 NOT IN ( - 92 + + + col0 * - 8 )
+----
+NULL
query I rowsort
SELECT DISTINCT 37 + 73 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
@@ -25040,10 +25055,10 @@ SELECT ALL - SUM ( DISTINCT - col0 ) AS col2 FROM tab2
----
185
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -66
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-4154
SELECT ALL - CAST ( + AVG ( DISTINCT + - ( + - col0 ) ) AS INTEGER ) AS col1 FROM tab0
+----
+-66
query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT + col0 > - col2
@@ -33821,10 +33836,13 @@ SELECT DISTINCT - COUNT ( * ) + - COUNT ( * ) AS col1 FROM tab0 AS cor0 CROSS JO
----
-18
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + ( AVG ( DISTINCT + ( - - col2 ) ) ) FROM tab0 WHERE NOT ( col1 ) * - ( + - ( + ( + + col0 ) ) ) IS NOT NULL
+----
+NULL
query I rowsort label-5582
SELECT DISTINCT + COUNT ( * ) col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
@@ -35990,10 +36008,13 @@ SELECT ALL ( - 84 ) + 85 + - - col2 AS col1 FROM tab0
11
48
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5936
SELECT + COUNT ( * ) + + COUNT ( * ) * AVG ( DISTINCT - + 80 ) AS col1 FROM tab2 AS cor0 WHERE NULL = + col0
+----
+NULL
query I rowsort label-5937
SELECT DISTINCT + CAST ( + + 43 AS INTEGER ) + + col0 + col0 AS col0 FROM tab1 AS cor0
@@ -37318,10 +37339,13 @@ SELECT + MAX ( + - 27 ) AS col1 FROM tab2 AS cor0
----
-27
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6146
SELECT COUNT ( * ) + - AVG ( DISTINCT - col0 ) AS col2 FROM tab0 AS cor0 WHERE NOT NULL IS NULL
+----
+NULL
query III rowsort
SELECT DISTINCT * FROM tab0 cor0 WHERE NOT col1 * + - 74 IS NOT NULL
diff --git a/data/sqlite/random/aggregates/slt_good_107.slt b/data/sqlite/random/aggregates/slt_good_107.slt
index c100c0f..15b92ca 100644
--- a/data/sqlite/random/aggregates/slt_good_107.slt
+++ b/data/sqlite/random/aggregates/slt_good_107.slt
@@ -18159,10 +18159,10 @@ SELECT COUNT ( * ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab0
----
9
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -58
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-3019
SELECT DISTINCT - CAST ( AVG ( DISTINCT 58 ) AS INTEGER ) AS col0 FROM tab2
+----
+-58
query I rowsort label-3020
SELECT ALL + ( COUNT ( * ) ) FROM tab1 AS cor0 CROSS JOIN tab0
@@ -24285,10 +24285,13 @@ SELECT DISTINCT COUNT ( * ) / + 17 + - - COUNT ( * ) col0 FROM tab1
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4049
SELECT ALL COUNT ( * ) / + AVG ( DISTINCT - CAST ( NULL AS FLOAT8 ) ) AS col1 FROM tab2
+----
+NULL
query I rowsort label-4050
SELECT DISTINCT - + CAST ( COUNT ( - 60 ) AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab1 cor1
@@ -57282,10 +57285,13 @@ SELECT COUNT ( * ) * 33 FROM tab0
----
99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9541
SELECT AVG ( DISTINCT + - CAST ( NULL AS INTEGER ) ) FROM tab2
+----
+NULL
query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab2 WHERE NULL NOT IN ( col1 )
diff --git a/data/sqlite/random/aggregates/slt_good_108.slt b/data/sqlite/random/aggregates/slt_good_108.slt
index 82f45ba..da3ba37 100644
--- a/data/sqlite/random/aggregates/slt_good_108.slt
+++ b/data/sqlite/random/aggregates/slt_good_108.slt
@@ -25550,10 +25550,13 @@ SELECT ALL ( + - 52 ) FROM tab2
-52
-52
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4185
SELECT - COUNT ( * ) * + AVG ( DISTINCT + col2 ) AS col0 FROM tab1 WHERE NOT ( 41 * ( col0 ) ) > - col2
+----
+NULL
query I rowsort label-4186
SELECT col0 * 62 / - col2 AS col2 FROM tab1
@@ -28874,10 +28877,13 @@ SELECT DISTINCT + 48 + COUNT ( * ) AS col0 FROM tab2
----
51
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL + AVG ( DISTINCT + 72 ) FROM tab1 WHERE NOT 80 IS NOT NULL
+----
+NULL
query I rowsort label-4725
SELECT MAX ( ALL - col1 ) / COUNT ( * ) AS col2 FROM tab1
@@ -35270,10 +35276,13 @@ SELECT ALL + MAX ( ALL - 95 ) AS col1 FROM tab1
----
-95
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5782
SELECT - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col2 FROM tab0
+----
+NULL
query II rowsort
SELECT DISTINCT + 38, col2 FROM tab0
@@ -44341,11 +44350,14 @@ SELECT - + COUNT ( DISTINCT + - col1 ) AS col1 FROM tab1 AS cor0
----
-3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -12
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-7283
SELECT - 12 AS col0, AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) * + - ( + ( + COUNT ( * ) ) ) AS col1 FROM tab2 AS cor0
+----
+-12
+NULL
query I rowsort label-7284
SELECT + MAX ( ALL col1 ) FROM tab1 AS cor0
@@ -59028,10 +59040,13 @@ query III rowsort
SELECT * FROM tab2 WHERE NOT ( - 64 ) IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9680
SELECT ALL + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) / - COUNT ( * ) FROM tab1
+----
+NULL
query III rowsort
SELECT * FROM tab0 WHERE NOT NULL IN ( + 7 )
diff --git a/data/sqlite/random/aggregates/slt_good_109.slt b/data/sqlite/random/aggregates/slt_good_109.slt
index 07b4e8f..5ddebce 100644
--- a/data/sqlite/random/aggregates/slt_good_109.slt
+++ b/data/sqlite/random/aggregates/slt_good_109.slt
@@ -15971,10 +15971,13 @@ query I rowsort
SELECT DISTINCT - 55 FROM tab0 WHERE NULL < ( + 89 ) * - ( - + 49 )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2638
SELECT DISTINCT - AVG ( DISTINCT - ( + CAST ( NULL AS INTEGER ) ) ) + - + COUNT ( * ) * + 19 FROM tab2
+----
+NULL
query I rowsort label-2639
SELECT + COUNT ( * ) * - 44 FROM tab2 AS cor0
@@ -22513,10 +22516,13 @@ SELECT DISTINCT - 54 FROM tab1 WHERE NOT - + ( - - 70 ) IN ( + ( + + col2 ) + -
----
-54
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3720
SELECT - - AVG ( DISTINCT + 92 ) AS col0 FROM tab1 AS cor0 WHERE - CAST ( NULL AS FLOAT8 ) BETWEEN NULL AND NULL
+----
+NULL
query I rowsort
SELECT - col1 FROM tab0 cor0 WHERE + 9 IS NOT NULL
@@ -22815,10 +22821,13 @@ query III rowsort label-3769
SELECT DISTINCT * FROM tab2 AS cor0 WHERE + col2 IN ( col1, CAST ( NULL AS INTEGER ) + - + ( - + 72 ) + + col1 )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( DISTINCT - 16 ) AS col1 FROM tab1 AS cor0 WHERE NOT NULL <= - col0
+----
+NULL
query I rowsort label-3771
SELECT 6 / + col0 FROM tab0 AS cor0
@@ -32789,10 +32798,13 @@ SELECT + 34 - - 55 + col1 FROM tab2 cor0
156
166
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5435
SELECT + - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) - 59 AS col0 FROM tab1 cor0
+----
+NULL
query I rowsort
SELECT - col2 - + + col0 FROM tab0
@@ -32836,10 +32848,10 @@ SELECT ALL - + SUM ( + + col2 ) FROM tab0 AS cor0
----
-156
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 86
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-5443
SELECT - CAST ( - AVG ( DISTINCT + 86 ) AS INTEGER ) FROM tab0 AS cor0
+----
+86
query I rowsort label-5444
SELECT + + MIN ( DISTINCT col1 ) AS col2 FROM tab2 AS cor0
@@ -53306,10 +53318,10 @@ SELECT DISTINCT MIN ( DISTINCT + - col0 ) + 85 + 46 + COUNT ( * ) AS col1 FROM t
----
59
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 198
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-8808
SELECT + CAST ( AVG ( DISTINCT - 29 ) AS INTEGER ) + SUM ( col0 ) col0 FROM tab1
+----
+198
query I rowsort
SELECT + col2 + + + col2 AS col0 FROM tab0
@@ -53879,10 +53891,13 @@ SELECT + SUM ( col0 ) FROM tab2 cor0 WHERE NOT NULL IN ( col2 )
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8907
SELECT + AVG ( DISTINCT + + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2 AS cor0
+----
+NULL
query II rowsort
SELECT DISTINCT + 55, - col0 FROM tab1 WHERE + col2 IS NULL
diff --git a/data/sqlite/random/aggregates/slt_good_11.slt b/data/sqlite/random/aggregates/slt_good_11.slt
index a7a5143..4d8cfe6 100644
--- a/data/sqlite/random/aggregates/slt_good_11.slt
+++ b/data/sqlite/random/aggregates/slt_good_11.slt
@@ -6889,10 +6889,13 @@ SELECT col1 * - 92 AS col0 FROM tab1
-4324
-460
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT - + 59 ) FROM tab1 WHERE - + col1 NOT BETWEEN NULL AND + col0
+----
+NULL
query I rowsort
SELECT + + 79 * - 3 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
@@ -30726,10 +30729,13 @@ SELECT DISTINCT - + col0 - + col1 * 2 FROM tab2 AS cor0
-209
-218
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5048
SELECT DISTINCT COUNT ( * ) - - AVG ( DISTINCT + col1 ) + COUNT ( * ) FROM tab0 AS cor0 WHERE col2 IN ( + - 0 )
+----
+NULL
query I rowsort
SELECT DISTINCT col1 FROM tab2 cor0 WHERE NOT NULL IS NULL
@@ -47271,10 +47277,10 @@ SELECT DISTINCT + + 19 * 42 AS col2 FROM tab1 AS cor0
----
798
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-7779
SELECT ALL - CAST ( - + AVG ( DISTINCT - - CAST ( NULL AS INTEGER ) ) AS INTEGER ) col1 FROM tab0
+----
+NULL
query I rowsort label-7780
SELECT - CAST ( - 76 AS INTEGER ) FROM tab1
@@ -53898,10 +53904,13 @@ query I rowsort
SELECT - 59 FROM tab0 AS cor0 WHERE NULL <= ( NULL )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8853
SELECT ALL + AVG ( DISTINCT - + 67 ) + COUNT ( * ) FROM tab2 AS cor0 WHERE NOT ( NULL ) <= col0
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - -92
diff --git a/data/sqlite/random/aggregates/slt_good_110.slt b/data/sqlite/random/aggregates/slt_good_110.slt
index 15adf05..a372a18 100644
--- a/data/sqlite/random/aggregates/slt_good_110.slt
+++ b/data/sqlite/random/aggregates/slt_good_110.slt
@@ -6335,11 +6335,14 @@ SELECT ALL + ( + + col1 ) FROM tab1
47
5
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - 0
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]I
+# Datafusion - [Actual ] [R]I
+query RI rowsort label-1044
SELECT AVG ( DISTINCT col1 ), - COUNT ( * ) + - COUNT ( * ) AS col2 FROM tab2 cor0 WHERE NOT NULL IS NULL
+----
+NULL
+0
query I rowsort
SELECT ALL + - ( + + 50 ) AS col2 FROM tab0 AS cor0
@@ -19099,10 +19102,10 @@ SELECT DISTINCT * FROM tab2 AS cor0 WHERE 73 IS NOT NULL
----
9 values hashing to 75c998aa53ac83218cbf2feb962d0a49
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 0
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-3168
SELECT - - COUNT ( * ) / CAST ( - AVG ( DISTINCT ( + - col1 ) ) AS INTEGER ) / SUM ( ALL + + 45 ) AS col1 FROM tab1 AS cor0
+----
+0
query I rowsort
SELECT ( + - 16 ) AS col0 FROM tab1 AS cor0
@@ -23083,10 +23086,10 @@ query I rowsort
SELECT ALL 78 FROM tab2 AS cor0 JOIN tab0 AS cor1 ON ( NULL ) < NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 96
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-3820
SELECT - CAST ( + AVG ( DISTINCT - 96 ) AS INTEGER ) FROM ( tab1 cor0 CROSS JOIN tab2 AS cor1 )
+----
+96
query III rowsort
SELECT * FROM tab0 WHERE NOT ( NOT - 20 <> NULL )
@@ -26148,10 +26151,13 @@ SELECT DISTINCT - col1 * col2 + 29 AS col0 FROM tab2 AS cor0
-3051
-3857
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT AVG ( DISTINCT + + 61 ) FROM tab1 WHERE col0 IS NULL AND col0 NOT IN ( 99 )
+----
+NULL
query I rowsort
SELECT ALL + 29 + + ( - 75 ) + - 23 + + 76 * - 46 AS col1 FROM tab2
@@ -27721,10 +27727,13 @@ SELECT ALL - 47 + + COUNT ( * ) FROM tab1
----
-44
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4590
SELECT - AVG ( DISTINCT + - CAST ( NULL AS INTEGER ) ) FROM tab0
+----
+NULL
query I rowsort
SELECT DISTINCT - col1 * col0 + - + ( + - col1 ) col2 FROM tab1
@@ -30322,10 +30331,13 @@ SELECT - col0 + col1 - - + col2 + - - col1 * + + ( 91 ) * + 29 * + col1 + - col1
17314511
2641
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5028
SELECT DISTINCT + - COUNT ( * ) + AVG ( DISTINCT - col0 ) * - - 0 AS col1 FROM tab1 cor0 WHERE NOT col0 IS NOT NULL
+----
+NULL
query I rowsort
SELECT DISTINCT 2 + + col2 FROM tab0 AS cor0
@@ -31746,10 +31758,13 @@ SELECT - COUNT ( * ) + - 6 FROM tab1 AS cor0 WHERE ( NULL ) IS NULL
----
-9
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL - AVG ( DISTINCT + ( - 65 ) ) AS col0 FROM tab2 AS cor0 WHERE NOT - col0 IS NOT NULL
+----
+NULL
query I rowsort
SELECT ALL + - col2 * + col1 AS col2 FROM tab1 AS cor0 WHERE NOT 78 IS NULL
@@ -34466,10 +34481,13 @@ SELECT ALL COUNT ( 18 ) AS col0 FROM tab0
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL - + 10 + - AVG ( DISTINCT - 4 ) * + + 81 AS col0 FROM tab1 WHERE + - 64 < NULL
+----
+NULL
query I rowsort label-5707
SELECT DISTINCT col1 / - 3 FROM tab0 AS cor0
@@ -37504,10 +37522,13 @@ SELECT ALL - + col1 * - col1 * + col1 FROM tab1 AS cor0
125
2744
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6211
SELECT 24 + + + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col0 FROM tab2 cor0
+----
+NULL
query I rowsort label-6212
SELECT COUNT ( * ) + - + COUNT ( * ) FROM tab0 AS cor0
@@ -37692,10 +37713,13 @@ SELECT DISTINCT MAX ( - col2 ) / - CAST ( NULL AS INTEGER ) FROM tab1 WHERE - 99
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT AVG ( DISTINCT - 57 ) FROM tab1 WHERE - col1 IS NULL
+----
+NULL
query I rowsort
SELECT DISTINCT + 33 * col2 FROM tab2 WHERE NOT ( col1 ) = col2
@@ -43608,10 +43632,13 @@ SELECT MAX ( 14 ) FROM tab2
----
14
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7225
SELECT ALL + COUNT ( * ) + - AVG ( DISTINCT col2 ) FROM tab2 WHERE NOT + + col2 / + + 6 + - - col2 + + - col2 * - col2 + + col0 * + col0 IS NOT NULL
+----
+NULL
query I rowsort label-7226
SELECT + col0 / 13 - col2 FROM tab2 WHERE + col2 IS NOT NULL
@@ -56796,10 +56823,10 @@ SELECT DISTINCT COUNT ( * ) AS col1 FROM tab1 AS cor0 WHERE col1 * - + ( - col0
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 25
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-9414
SELECT DISTINCT ( + COUNT ( * ) ) + + CAST ( - - AVG ( DISTINCT col1 ) AS INTEGER ) AS col2 FROM tab1
+----
+25
query I rowsort
SELECT ALL + 36 + - col0 AS col2 FROM tab0
diff --git a/data/sqlite/random/aggregates/slt_good_111.slt b/data/sqlite/random/aggregates/slt_good_111.slt
index 211435b..1fe0156 100644
--- a/data/sqlite/random/aggregates/slt_good_111.slt
+++ b/data/sqlite/random/aggregates/slt_good_111.slt
@@ -6043,10 +6043,13 @@ query I rowsort
SELECT ALL - + col1 AS col0 FROM tab0 AS cor0 WHERE - col0 = - col2
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-980
SELECT DISTINCT + COUNT ( * ) + - AVG ( ALL + col0 ) + + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query I rowsort label-981
SELECT ALL + + col1 + - 21 + - CAST ( NULL AS INTEGER ) * - col2 col2 FROM tab2 AS cor0
@@ -17352,10 +17355,13 @@ SELECT DISTINCT ( + 41 ) FROM tab0
----
41
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2832
SELECT 81 + COUNT ( * ) * + 9 * - AVG ( DISTINCT - CAST ( CAST ( NULL AS INTEGER ) AS INTEGER ) ) AS col0 FROM tab0
+----
+NULL
query I rowsort label-2833
SELECT ALL ( - + MIN ( + col1 ) ) FROM tab2
@@ -31466,10 +31472,13 @@ SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT - col1 = - 3
----
9 values hashing to 75c998aa53ac83218cbf2feb962d0a49
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT - - col1 ) AS col2 FROM tab0 AS cor0 WHERE NOT NULL < 60
+----
+NULL
query I rowsort label-5141
SELECT + MIN ( ALL + 26 ) AS col0 FROM tab0 AS cor0
@@ -36682,10 +36691,13 @@ SELECT 20 * - col0 FROM tab2
-1500
-920
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6000
SELECT DISTINCT - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) / COUNT ( * ) + COUNT ( * ) FROM tab0 AS cor0
+----
+NULL
query I rowsort label-6001
SELECT MIN ( ALL + ( + 79 ) ) FROM tab2 AS cor0
@@ -39611,10 +39623,13 @@ SELECT ALL - - MAX ( ALL - col1 ) AS col0 FROM tab0 cor0
----
-1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6482
SELECT - + ( - ( - - COUNT ( * ) ) ) + - AVG ( DISTINCT + + col2 ) * - 21 FROM tab0 WHERE NOT + col1 IS NOT NULL
+----
+NULL
query I rowsort
SELECT DISTINCT 55 AS col0 FROM tab0, tab1 AS cor0
@@ -44901,10 +44916,13 @@ SELECT DISTINCT * FROM tab0 cor0 WHERE NOT ( + col2 ) * + - col2 + + 87 BETWEEN
----
9 values hashing to c4b42765dff94eaaa46040e537fb43b7
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT - ( - col2 ) ) AS col1 FROM tab1 AS cor0 WHERE NOT 44 IS NOT NULL
+----
+NULL
query I rowsort
SELECT ALL ( - + 25 ) FROM tab2, tab2 AS cor0
@@ -48779,10 +48797,13 @@ SELECT ALL CAST ( + - col1 AS INTEGER ) * 8 + - + ( 18 ) / + col0 AS col1 FROM t
-536
-616
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7976
SELECT ALL + COUNT ( * ) + - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT + + 20 * 63 AS col0 FROM tab1 cor0
@@ -52705,10 +52726,13 @@ SELECT DISTINCT 83 * - col2 FROM tab2 AS cor0
-3320
-4814
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT AVG ( DISTINCT - 53 ) AS col0 FROM tab2 AS cor0 WHERE NULL NOT BETWEEN - col0 AND + col1 + col1
+----
+NULL
query I rowsort
SELECT DISTINCT ( - col0 ) * + 96 FROM tab1 AS cor0
@@ -54241,10 +54265,13 @@ SELECT ( + col2 ) * + + col2 * + 47 * - 39 + - ( + col1 ) AS col2, - col2 + - 63
-969708
3190
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL - 97 * + AVG ( DISTINCT 38 ) FROM tab0 AS cor0 WHERE NOT NULL <= NULL
+----
+NULL
query I rowsort
SELECT DISTINCT + 53 col0 FROM tab2 AS cor0
@@ -56178,11 +56205,11 @@ SELECT ALL col1 * - 13 AS col2 FROM tab1 AS cor0
-611
-65
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -30
-# Datafusion - Expected - -3
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query II rowsort label-9195
SELECT + CAST ( + AVG ( DISTINCT - - CAST ( - 30 AS INTEGER ) ) AS INTEGER ) AS col1, - COUNT ( * ) FROM tab0 AS cor0
+----
+-30
+-3
query I rowsort
SELECT DISTINCT + + 39 AS col1 FROM tab2 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_112.slt b/data/sqlite/random/aggregates/slt_good_112.slt
index 99db912..be11cfd 100644
--- a/data/sqlite/random/aggregates/slt_good_112.slt
+++ b/data/sqlite/random/aggregates/slt_good_112.slt
@@ -5123,10 +5123,13 @@ SELECT DISTINCT SUM ( + 28 ) AS col0 FROM tab2
----
84
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-854
SELECT ALL + AVG ( DISTINCT - col0 ) * MIN ( DISTINCT col0 ) + + 48 FROM tab1 WHERE NOT ( - col2 ) = NULL
+----
+NULL
query I rowsort label-855
SELECT + 33 - COUNT ( * ) AS col1 FROM tab2
@@ -5903,10 +5906,13 @@ SELECT + ( - + 97 ) * ( - - ( + col2 ) ) + - col2 AS col0 FROM tab1 AS cor0
-6664
-9408
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT - 59 ) + AVG ( ALL + - ( - col2 ) ) AS col0 FROM tab1 AS cor0 WHERE NOT ( NULL ) BETWEEN NULL AND NULL
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - 14
@@ -7263,10 +7269,13 @@ SELECT 82 / + + col0 + col0 AS col1 FROM tab2 AS cor0
65
76
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1209
SELECT - AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) FROM tab1 AS cor0
+----
+NULL
query I rowsort label-1210
SELECT - + CAST ( 36 AS INTEGER ) FROM tab2 AS cor0
@@ -11293,10 +11302,13 @@ query I rowsort
SELECT ALL col2 * + col1 AS col1 FROM tab0 WHERE NOT + col1 > - 52
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1867
SELECT ALL + COUNT ( * ) * - + COUNT ( * ) + - AVG ( DISTINCT col1 ) AS col2 FROM tab0 WHERE NULL < NULL
+----
+NULL
query I rowsort label-1868
SELECT - 20 * CAST ( - COUNT ( * ) AS INTEGER ) * + 98 AS col1 FROM tab0 AS cor0
@@ -15757,10 +15769,13 @@ SELECT MIN ( ALL col2 ) col1 FROM tab1 AS cor0
----
59
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2608
SELECT + + AVG ( DISTINCT col0 ) * + COUNT ( * ) AS col0 FROM tab1 AS cor0 WHERE NOT ( NULL ) <> + - col2
+----
+NULL
query I rowsort label-2609
SELECT DISTINCT - COUNT ( * ) * - 56 FROM tab0 AS cor0
@@ -17508,10 +17523,13 @@ SELECT CAST ( - 45 AS INTEGER ) col1 FROM tab2 WHERE + col1 <> ( - + 59 )
-45
-45
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2893
SELECT - + COUNT ( * ) - + ( AVG ( DISTINCT - col1 ) ) AS col0 FROM tab0 WHERE NULL <> col1 + + + 5
+----
+NULL
query III rowsort
SELECT * FROM tab0 WHERE - col2 + + 87 BETWEEN + 46 AND NULL
@@ -30611,10 +30629,13 @@ SELECT ALL ( col2 ) - 5 * - col2 AS col2 FROM tab1 AS cor0
408
576
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT - 69 ) AS col0 FROM tab0 AS cor0 WHERE + col1 IS NULL
+----
+NULL
query III rowsort
SELECT * FROM tab0 cor0 WHERE 60 IS NULL
@@ -50208,10 +50229,13 @@ query I rowsort
SELECT ALL col0 - - ( + - 37 ) FROM tab1 WHERE NULL IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8281
SELECT ALL MIN ( ALL col1 ) + - - AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) + 38 AS col1 FROM tab0
+----
+NULL
query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + + 25 * + col1 IS NOT NULL
@@ -60237,10 +60261,13 @@ SELECT + 8 / col2 AS col2 FROM tab0 AS cor0
0
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( DISTINCT ( 85 ) ) AS col0 FROM tab1 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort
SELECT ALL + 26 AS col0 FROM tab0 cor0
diff --git a/data/sqlite/random/aggregates/slt_good_113.slt b/data/sqlite/random/aggregates/slt_good_113.slt
index eac823d..33df064 100644
--- a/data/sqlite/random/aggregates/slt_good_113.slt
+++ b/data/sqlite/random/aggregates/slt_good_113.slt
@@ -11535,10 +11535,13 @@ query I rowsort
SELECT ALL - 25 FROM tab0 AS cor0 WHERE NOT ( NULL ) IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1912
SELECT + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab0 AS cor0
+----
+NULL
query I rowsort label-1913
SELECT DISTINCT - - SUM ( + col2 ) FROM tab1 AS cor0
@@ -17812,10 +17815,10 @@ SELECT - 55 * - 61 AS col0 FROM tab0 cor0
3355
3355
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -94
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-2950
SELECT - CAST ( + + AVG ( DISTINCT + 94 ) AS INTEGER ) FROM tab2 AS cor0
+----
+-94
query I rowsort label-2951
SELECT + 74 * SUM ( CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0 WHERE NULL BETWEEN NULL AND NULL
@@ -19266,10 +19269,13 @@ query I rowsort
SELECT 98 FROM tab1 cor0 WHERE NULL IN ( + col0 - + 72 * + 9 )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT - 76 ) AS col0 FROM tab0 AS cor0 WHERE col2 IS NULL
+----
+NULL
query I rowsort
SELECT - col0 FROM tab0 AS cor0 WHERE NULL <= ( NULL )
@@ -29632,10 +29638,13 @@ SELECT DISTINCT - 60 * - col0 FROM tab0
5820
900
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT - + AVG ( DISTINCT + 6 ) FROM tab2 WHERE NULL IS NOT NULL
+----
+NULL
query II rowsort
SELECT col0 AS col2, 4 FROM tab1
@@ -36112,10 +36121,13 @@ SELECT ALL 56 * ( - col0 ) col2 FROM tab1 AS cor0
-4760
-5096
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5950
SELECT ALL AVG ( DISTINCT col2 ) + 4 * SUM ( DISTINCT CAST ( col1 AS INTEGER ) ) AS col2 FROM tab1 AS cor0 WHERE NOT ( NULL ) IN ( + col2 )
+----
+NULL
query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT - col1 >= ( - col1 )
@@ -51854,10 +51866,13 @@ query III rowsort
SELECT DISTINCT * FROM tab0 cor0 WHERE ( + + col1 ) BETWEEN NULL AND 53
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT + ( + + 47 ) ) FROM tab0 WHERE NOT - col0 IS NOT NULL
+----
+NULL
query I rowsort label-8535
SELECT DISTINCT COUNT ( * ) + - COUNT ( * ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
@@ -54663,10 +54678,10 @@ SELECT ALL - - COUNT ( ALL col1 ) FROM tab2 cor0
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -14
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-9000
SELECT ALL + 44 + CAST ( - AVG ( DISTINCT + 58 ) AS INTEGER ) FROM tab0 cor0
+----
+-14
query I rowsort label-9001
SELECT col0 / + - 47 - + col2 AS col1 FROM tab2 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_114.slt b/data/sqlite/random/aggregates/slt_good_114.slt
index 86260b5..08c8645 100644
--- a/data/sqlite/random/aggregates/slt_good_114.slt
+++ b/data/sqlite/random/aggregates/slt_good_114.slt
@@ -1080,11 +1080,14 @@ query I rowsort
SELECT DISTINCT + + col2 / col0 FROM tab0 WHERE NOT NULL <> + col1
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 76
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-175
SELECT DISTINCT 76, AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col0 FROM tab2 AS cor0
+----
+76
+NULL
query I rowsort
SELECT 54 * - col0 FROM tab2 WHERE NOT ( - - 64 ) IS NOT NULL
@@ -25063,10 +25066,13 @@ SELECT - col0 * CAST ( col1 AS INTEGER ) FROM tab2
-4928
-5025
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL AVG ( DISTINCT + 31 ) FROM tab2 WHERE NOT col1 * + col2 IS NOT NULL
+----
+NULL
query I rowsort label-4136
SELECT DISTINCT + 57 / col2 AS col0 FROM tab1
@@ -25832,10 +25838,13 @@ SELECT DISTINCT + col1, 6 FROM tab2 AS cor0
77
6
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4270
SELECT ALL - AVG ( DISTINCT + ( + + CAST ( NULL AS INTEGER ) ) ) FROM tab1 cor0
+----
+NULL
query II rowsort
SELECT DISTINCT - - col0 AS col0, 90 AS col2 FROM tab0 AS cor0
@@ -27570,10 +27579,13 @@ SELECT ALL - - 55 + - col0, - col2 + 37 AS col1 FROM tab1 cor0
4
-59
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4554
SELECT AVG ( DISTINCT + CAST ( NULL AS FLOAT8 ) ) FROM tab2 AS cor0 WHERE ( NULL ) IS NULL
+----
+NULL
query III rowsort
SELECT * FROM tab1 AS cor0 WHERE col2 + col1 IS NOT NULL
@@ -30772,10 +30784,13 @@ SELECT DISTINCT COUNT ( 47 ) FROM tab0 AS cor0 WHERE NOT + 11 NOT BETWEEN NULL A
----
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT - ( + 8 ) ) FROM tab0 AS cor0 WHERE NOT col0 NOT IN ( 56 * 55 )
+----
+NULL
query I rowsort label-5086
SELECT ALL - SUM ( col1 ) FROM tab2 cor0
@@ -47826,10 +47841,13 @@ SELECT + 68 AS col1, col1 AS col0 FROM tab1 WHERE col2 + col1 * + + col1 * col1
68
5
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7919
SELECT DISTINCT AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) FROM tab1
+----
+NULL
query I rowsort
SELECT DISTINCT col0 + + 34 AS col2 FROM tab0
@@ -54449,10 +54467,13 @@ SELECT - MIN ( DISTINCT - 27 ) * - + 15 FROM tab0 AS cor0
----
-405
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9008
SELECT + AVG ( DISTINCT + col0 ) * COUNT ( * ) AS col1 FROM tab0 AS cor0 WHERE NOT ( - col1 IS NOT NULL ) OR NOT NULL IS NULL
+----
+NULL
query I rowsort label-9009
SELECT - - 56 * - COUNT ( * ) FROM tab0 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_115.slt b/data/sqlite/random/aggregates/slt_good_115.slt
index 903ad03..d51fb95 100644
--- a/data/sqlite/random/aggregates/slt_good_115.slt
+++ b/data/sqlite/random/aggregates/slt_good_115.slt
@@ -16909,10 +16909,13 @@ query I rowsort
SELECT 71 FROM tab1 WHERE ( col1 * + 57 ) IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( + ( - col2 ) ) + + AVG ( DISTINCT col1 ) AS col1 FROM tab0 WHERE ( col1 ) IS NULL
+----
+NULL
query III rowsort
SELECT ALL * FROM tab1 WHERE col0 < col0
@@ -25183,10 +25186,13 @@ SELECT col2 / - col2 FROM tab2 AS cor0 WHERE NOT ( - col2 ) IS NULL
-1
-1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4169
SELECT DISTINCT MAX ( col2 ) + + 49 + 46 + + + COUNT ( * ) - + AVG ( DISTINCT + 62 ) AS col0 FROM tab1 AS cor0 WHERE - 24 IS NULL
+----
+NULL
query I rowsort label-4170
SELECT DISTINCT + COUNT ( ALL - 70 ) AS col0 FROM tab2 AS cor0
@@ -28050,10 +28056,13 @@ query II rowsort
SELECT 28 + col1 + - 88 AS col0, col1 + + 72 - col0 * col1 / - + col1 + - - col2 col1 FROM tab0 WHERE NOT NULL IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4639
SELECT + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab0 WHERE ( col1 ) IS NULL
+----
+NULL
query I rowsort
SELECT col1 * - ( + col2 ) * col1 AS col1 FROM tab1
@@ -28747,11 +28756,14 @@ SELECT ALL col1 * - 93 + 83 AS col1, 79 FROM tab2
-7078
79
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 0
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-4755
SELECT DISTINCT - COUNT ( * ) col0, - AVG ( DISTINCT + col2 ) * COUNT ( * ) / + SUM ( 49 ) col1 FROM tab1 WHERE NULL = NULL
+----
+0
+NULL
query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( - 88, - col2, - col1 )
@@ -37126,10 +37138,13 @@ SELECT DISTINCT + 67 AS col0, - col2 AS col2 FROM tab2 AS cor0
67
-58
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT - 24 ) AS col2 FROM tab1 AS cor0 WHERE NULL <= 8
+----
+NULL
query I rowsort label-6142
SELECT - - MIN ( - - col1 ) FROM tab1 AS cor0
@@ -41938,10 +41953,13 @@ SELECT ALL - COUNT ( * ) - + COUNT ( * ) AS col0 FROM tab1 AS cor0
----
-6
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL + AVG ( DISTINCT + ( 16 ) ) * - 67 FROM tab0 AS cor0 WHERE NOT NULL IS NULL
+----
+NULL
query I rowsort
SELECT ALL - + 62 col0 FROM tab0 AS cor0
@@ -41950,10 +41968,13 @@ SELECT ALL - + 62 col0 FROM tab0 AS cor0
-62
-62
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6946
SELECT DISTINCT - - AVG ( DISTINCT + col1 ) * + COUNT ( * ) AS col2 FROM tab2 AS cor0 WHERE col0 * - col0 IS NULL
+----
+NULL
query I rowsort
SELECT + col1 AS col2 FROM tab2 AS cor0 WHERE ( 14 <> + col2 )
@@ -48117,10 +48138,13 @@ SELECT * FROM tab0 cor0 WHERE + col2 > + col0
1
99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7964
SELECT DISTINCT - COUNT ( * ) * + - SUM ( DISTINCT - 76 ) + - AVG ( DISTINCT - 49 ) FROM tab0 AS cor0 WHERE NOT - 29 IS NOT NULL
+----
+NULL
query I rowsort label-7965
SELECT CAST ( + 94 AS INTEGER ) FROM tab2
@@ -55678,10 +55702,13 @@ query III rowsort
SELECT ALL * FROM tab2 WHERE ( - 33 ) > col2
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9225
SELECT DISTINCT ( - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) ) FROM tab2
+----
+NULL
query II rowsort
SELECT col0 AS col1, + 74 AS col2 FROM tab1
@@ -57023,10 +57050,13 @@ query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT + 6 IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9444
SELECT DISTINCT - + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) * SUM ( ALL - 72 ) FROM tab1 AS cor0
+----
+NULL
query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NULL BETWEEN col2 / 83 AND + - col0 * - ( - + 37 )
diff --git a/data/sqlite/random/aggregates/slt_good_116.slt b/data/sqlite/random/aggregates/slt_good_116.slt
index de917c1..e343579 100644
--- a/data/sqlite/random/aggregates/slt_good_116.slt
+++ b/data/sqlite/random/aggregates/slt_good_116.slt
@@ -6675,10 +6675,13 @@ SELECT * FROM tab2 WHERE 69 * + 43 - + col0 IS NOT NULL
----
9 values hashing to 75c998aa53ac83218cbf2feb962d0a49
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1097
SELECT DISTINCT AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab1
+----
+NULL
query I rowsort
SELECT 95 + - ( - - ( - 54 ) ) * - col2 FROM tab2
@@ -11898,10 +11901,13 @@ SELECT DISTINCT ( - 82 ) FROM tab1
----
-82
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL - - AVG ( DISTINCT - - 54 ) AS col2 FROM tab2 AS cor0 WHERE + col2 IS NULL
+----
+NULL
query I rowsort label-1978
SELECT - SUM ( DISTINCT - ( - - col2 ) ) FROM tab1 cor0 WHERE NOT NULL IS NULL
@@ -13422,10 +13428,13 @@ query III rowsort label-2227
SELECT * FROM tab2 AS cor0 WHERE CAST ( - col1 AS INTEGER ) > + 92
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2228
SELECT ALL - COUNT ( * ) * - + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT DISTINCT - + col1 + - 10 + col2 FROM tab1 AS cor0
@@ -20547,10 +20556,13 @@ SELECT ALL - ( - MIN ( + col1 ) ) AS col1 FROM tab0
----
1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3389
SELECT DISTINCT + 89 / + AVG ( DISTINCT - ( + CAST ( NULL AS INTEGER ) ) ) + MIN ( DISTINCT - ( - col0 ) ) FROM tab0 AS cor0 WHERE 77 + + + col2 IS NULL
+----
+NULL
query I rowsort label-3390
SELECT DISTINCT COUNT ( * ) / + 15 AS col2 FROM tab1 AS cor0 WHERE NOT 28 * col0 + ( - col0 ) >= - 60 * + col1 - col2 * col1
@@ -36558,10 +36570,13 @@ SELECT - COUNT ( * ) FROM tab0 AS cor0 WHERE NOT + col2 IS NULL
----
-3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6044
SELECT + + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col2 FROM tab0 AS cor0
+----
+NULL
query I rowsort
SELECT 44 * - + 47 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
@@ -41673,10 +41688,13 @@ SELECT ALL ( ( 42 ) ) * 28 + - 62 FROM tab2
1114
1114
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT 78 ) FROM tab1 WHERE NOT + 22 <> ( 40 )
+----
+NULL
query III rowsort
SELECT * FROM tab0 WHERE NOT 75 BETWEEN NULL AND ( - col2 - - 77 / + col2 )
@@ -50881,10 +50899,13 @@ SELECT - 2 * + - col2 AS col2 FROM tab0
20
94
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8397
SELECT DISTINCT + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab0 WHERE NOT - col1 IS NULL
+----
+NULL
query I rowsort
SELECT + col1 * - 70 + + col0 AS col0 FROM tab1
@@ -57484,10 +57505,13 @@ SELECT ALL + - CAST ( NULL AS FLOAT8 ), COUNT ( + col0 ) / - + ( - + COUNT ( * )
NULL
1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9493
SELECT - - AVG ( DISTINCT - col2 ) * - COUNT ( * ) FROM tab1 AS cor0 WHERE NOT NULL BETWEEN - 30 * - + col1 AND NULL
+----
+NULL
query II rowsort
SELECT DISTINCT col1 AS col1, + 95 FROM tab0 cor0
diff --git a/data/sqlite/random/aggregates/slt_good_117.slt b/data/sqlite/random/aggregates/slt_good_117.slt
index 88551fb..a22bcdf 100644
--- a/data/sqlite/random/aggregates/slt_good_117.slt
+++ b/data/sqlite/random/aggregates/slt_good_117.slt
@@ -2749,10 +2749,13 @@ SELECT CAST ( + 84 AS INTEGER ) * + SUM ( DISTINCT + col0 ) + MIN ( - col0 ) AS
----
15465
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-442
SELECT + AVG ( DISTINCT - - CAST ( NULL AS INTEGER ) ) AS col1 FROM tab0
+----
+NULL
query I rowsort
SELECT ALL ( col2 ) col0 FROM tab2 WHERE NOT NULL IS NULL
@@ -9805,10 +9808,13 @@ query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL < 89
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT AVG ( DISTINCT + 56 ) col1 FROM tab2 AS cor0 WHERE NOT NULL IS NULL
+----
+NULL
query I rowsort label-1607
SELECT DISTINCT + + SUM ( - 3 ) AS col1 FROM tab1 AS cor0
@@ -10101,10 +10107,13 @@ SELECT + 93, + ( col2 ) / + 46 + + 34 AS col1 FROM tab2 AS cor0
93
35
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1656
SELECT + + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab1 cor0
+----
+NULL
query I rowsort label-1657
SELECT col1 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 WHERE NOT - 39 >= - col2
@@ -16646,10 +16655,13 @@ SELECT DISTINCT - ( + ( col1 ) ) - col2 FROM tab1 AS cor0
-115
-64
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2740
SELECT DISTINCT AVG ( DISTINCT CAST ( 56 AS INTEGER ) ) FROM tab0 AS cor0 WHERE col2 * - 71 > + col0
+----
+NULL
query III rowsort
SELECT ALL * FROM tab1 cor0 WHERE ( - col1 ) BETWEEN NULL AND ( col2 + 7 )
@@ -24929,10 +24941,13 @@ SELECT + ( col1 ) + 82 AS col1 FROM tab2
149
159
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL 97 / - AVG ( DISTINCT - 73 ) AS col0 FROM tab0 AS cor0 WHERE col1 > + col1 + + col2
+----
+NULL
query I rowsort
SELECT 22 + + col0 * - col2 FROM tab2 AS cor0
@@ -33211,10 +33226,13 @@ SELECT col2 + - 87 * + 61 AS col2 FROM tab2 AS cor0
-5267
-5284
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5490
SELECT DISTINCT + AVG ( DISTINCT - 25 ) * COUNT ( * ) AS col0 FROM tab0 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort
SELECT DISTINCT + col1 - col1 col1 FROM tab0 AS cor0
@@ -39652,10 +39670,13 @@ SELECT ALL * FROM tab2 AS cor0 WHERE NOT 11 + col2 IS NULL
----
9 values hashing to 75c998aa53ac83218cbf2feb962d0a49
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT + - 29 ) FROM tab0 AS cor0 WHERE 40 * col2 * + col0 <= + - col0
+----
+NULL
query I rowsort
SELECT ( 62 ) FROM tab0 AS cor0 WHERE NULL IS NOT NULL
@@ -40331,10 +40352,13 @@ SELECT DISTINCT col0 * ( + col1 ) col0 FROM tab1
4277
714
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6663
SELECT DISTINCT - AVG ( DISTINCT col1 ) / - - COUNT ( * ) + 6 FROM tab2 WHERE NOT + 58 IS NOT NULL
+----
+NULL
query I rowsort
SELECT + 32 + col0 AS col2 FROM tab1
@@ -51647,11 +51671,14 @@ SELECT COUNT ( + 71 ) AS col1 FROM tab0
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 0
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-8525
SELECT ALL + + COUNT ( * ) AS col2, + AVG ( DISTINCT col0 ) * 37 AS col0 FROM tab0 WHERE NOT NULL IN ( + + col0, - ( + - col1 ) / 75, CAST ( NULL AS INTEGER ) * + col1 )
+----
+0
+NULL
query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT col1 - + 34 NOT IN ( + + 37 )
@@ -54768,10 +54795,13 @@ SELECT - CAST ( NULL AS FLOAT8 ) / - MIN ( ALL - 75 ) AS col1 FROM tab2
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT AVG ( DISTINCT - + 40 ) AS col2 FROM tab0 AS cor0 WHERE ( NULL ) IS NOT NULL
+----
+NULL
query I rowsort
SELECT - col2 * - 77 * + 96 FROM tab1
diff --git a/data/sqlite/random/aggregates/slt_good_118.slt b/data/sqlite/random/aggregates/slt_good_118.slt
index ab58a3a..3ffb554 100644
--- a/data/sqlite/random/aggregates/slt_good_118.slt
+++ b/data/sqlite/random/aggregates/slt_good_118.slt
@@ -17660,10 +17660,13 @@ query III rowsort
SELECT DISTINCT * FROM tab0 cor0 WHERE - col2 + - col0 <> NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2953
SELECT + ( + + 12 ) * - AVG ( DISTINCT 65 / + col0 - + 29 * + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2 AS cor0
+----
+NULL
query I rowsort label-2954
SELECT DISTINCT + 71 + COUNT ( * ) + COUNT ( * ) FROM tab1
@@ -20704,10 +20707,13 @@ SELECT + 9 col1 FROM tab1 AS cor0
9
9
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3462
SELECT - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col0 FROM tab1 AS cor0
+----
+NULL
query I rowsort label-3463
SELECT - MAX ( DISTINCT - 41 ) + CAST ( NULL AS INTEGER ) FROM tab2 WHERE NOT NULL IS NOT NULL
@@ -32261,10 +32267,13 @@ SELECT col2 col1, col2 FROM tab2
58
58
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5378
SELECT + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col1 FROM tab0
+----
+NULL
query I rowsort label-5379
SELECT - MIN ( ALL - col1 ) FROM tab1
@@ -38026,10 +38035,10 @@ SELECT - COUNT ( * ) / - COUNT ( * ) FROM tab2
----
1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -183
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-6339
SELECT DISTINCT - COUNT ( * ) * - + CAST ( - AVG ( DISTINCT 61 ) AS INTEGER ) FROM tab1
+----
+-183
query I rowsort label-6340
SELECT - ( + + SUM ( ALL + col1 ) ) FROM tab1 AS cor0 WHERE NOT 67 IS NULL
@@ -40969,10 +40978,13 @@ SELECT DISTINCT col0 - - col1 * - 5 AS col2 FROM tab2
-260
-321
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6827
SELECT - MAX ( - 51 ) * - - COUNT ( * ) + + - 31 * - AVG ( DISTINCT col1 ) col1 FROM tab2 WHERE 92 <> NULL
+----
+NULL
query I rowsort label-6828
SELECT ALL 51 * - MIN ( DISTINCT 5 ) AS col2 FROM tab2 AS cor0
@@ -56863,11 +56875,11 @@ query III rowsort
SELECT * FROM tab0 WHERE + 21 = - + col2
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -56
-# Datafusion - Expected - 46
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query II rowsort label-9485
SELECT + CAST ( AVG ( DISTINCT - col2 ) AS INTEGER ) + + 18 col2, MAX ( DISTINCT + + 46 ) FROM tab1
+----
+-56
+46
query I rowsort label-9486
SELECT COUNT ( * ) + + 14 AS col1 FROM tab0
@@ -59547,10 +59559,13 @@ SELECT * FROM tab1 AS cor0 WHERE ( - 43 * - col1 + - 72 ) > 95 + - col1
----
9 values hashing to c6c0a4111b36d04dbc811a11e4d54cad
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9928
SELECT DISTINCT AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col2 FROM tab2 AS cor0 WHERE ( NULL ) < ( NULL )
+----
+NULL
query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT ( NULL ) BETWEEN + col2 AND + 86
diff --git a/data/sqlite/random/aggregates/slt_good_119.slt b/data/sqlite/random/aggregates/slt_good_119.slt
index 029dd67..165a263 100644
--- a/data/sqlite/random/aggregates/slt_good_119.slt
+++ b/data/sqlite/random/aggregates/slt_good_119.slt
@@ -17292,10 +17292,13 @@ query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT ( 66 - + col0 ) IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2827
SELECT ALL - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) * - - 47 * + 2 FROM tab1 AS cor0
+----
+NULL
query I rowsort label-2828
SELECT DISTINCT SUM ( DISTINCT col1 ) AS col0 FROM tab2 AS cor0
@@ -30497,10 +30500,13 @@ query I rowsort
SELECT ALL 99 / + col0 AS col0 FROM tab1 WHERE + - col1 + - 70 + + 6 IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5007
SELECT - 28 * - COUNT ( * ) * + ( + AVG ( DISTINCT + - CAST ( NULL AS INTEGER ) ) ) FROM tab2
+----
+NULL
query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT 61 <> + 87
@@ -36792,10 +36798,10 @@ SELECT + MIN ( - col1 ) FROM tab2 AS cor0
----
-77
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 296
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-6043
SELECT CAST ( - CAST ( AVG ( DISTINCT - col1 ) AS INTEGER ) AS INTEGER ) + 60 + COUNT ( * ) * 57 FROM tab2
+----
+296
query III rowsort
SELECT * FROM tab0 WHERE - col1 BETWEEN + + col2 + - + 71 + + 80 + + col0 * col1 AND ( NULL )
@@ -41964,10 +41970,13 @@ query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT col0 >= col2
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT 44 ) AS col1 FROM tab2 AS cor0 WHERE NOT NULL IS NULL
+----
+NULL
query I rowsort
SELECT - 55 + - col1 FROM tab2
@@ -44538,10 +44547,13 @@ SELECT 89 + - - col2 col0 FROM tab1
157
185
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7333
SELECT ALL 93 + COUNT ( * ) + - 6 * + AVG ( DISTINCT col2 * + CAST ( NULL AS FLOAT8 ) ) FROM tab0
+----
+NULL
query I rowsort
SELECT + col2 + - ( + col1 ) AS col2 FROM tab2
@@ -60588,10 +60600,10 @@ SELECT + col2 + + col0 * + 38 AS col0 FROM tab0 WHERE NOT NULL IS NULL
query error DataFusion error: Schema error: Schema contains qualified field name tab1\.col0 and unqualified field name col0 which would be ambiguous
SELECT DISTINCT col0, - col1 + + + ( + 41 ) / col2 AS col0 FROM tab1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -40
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-9988
SELECT ALL CAST ( AVG ( DISTINCT + - 40 ) AS INTEGER ) FROM tab0
+----
+-40
query I rowsort
SELECT ALL ( + + col1 ) AS col2 FROM tab1 cor0
diff --git a/data/sqlite/random/aggregates/slt_good_12.slt b/data/sqlite/random/aggregates/slt_good_12.slt
index 900bcfc..ec0fbf9 100644
--- a/data/sqlite/random/aggregates/slt_good_12.slt
+++ b/data/sqlite/random/aggregates/slt_good_12.slt
@@ -2667,10 +2667,13 @@ query I rowsort
SELECT - 75 FROM tab1 WHERE NOT - 13 > NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT - AVG ( DISTINCT - - col1 ) AS col1 FROM tab2 WHERE NOT ( - col0 ) IS NOT NULL
+----
+NULL
query I rowsort label-424
SELECT DISTINCT + + SUM ( - col0 ) FROM tab0 AS cor0
@@ -2885,10 +2888,10 @@ SELECT DISTINCT - ( + + col0 ) AS col2 FROM tab0 AS cor0
-87
-97
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-457
SELECT 84 + CAST ( + AVG ( DISTINCT + 64 ) AS INTEGER ) AS col0 FROM tab1 AS cor0 WHERE NOT 36 > + ( - col1 ) * + + 56 - CAST ( NULL AS INTEGER )
+----
+NULL
query I rowsort label-458
SELECT ALL - COUNT ( ALL + col2 ) col2 FROM tab1 AS cor0
@@ -3115,10 +3118,10 @@ query III rowsort
SELECT * FROM tab0 WHERE NOT NULL BETWEEN NULL AND + 46
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 12
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-497
SELECT DISTINCT CAST ( + + AVG ( DISTINCT + 12 ) AS INTEGER ) FROM tab2
+----
+12
query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE col1 BETWEEN NULL AND - ( col2 ) * col1
@@ -22044,10 +22047,13 @@ query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE - col0 = ( NULL )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3608
SELECT + AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) col1 FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT ALL col1 + 33 + + col2 AS col2 FROM tab0 cor0
@@ -25802,10 +25808,10 @@ SELECT col2 * + col0 * col0 AS col1 FROM tab0 AS cor0
75690
931491
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 4526
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-4206
SELECT DISTINCT - 62 * + CAST ( + ( + + AVG ( DISTINCT - 73 ) ) AS INTEGER ) AS col2 FROM tab0
+----
+4526
query I rowsort
SELECT ALL col2 * col0 * col2 FROM tab2
diff --git a/data/sqlite/random/aggregates/slt_good_120.slt b/data/sqlite/random/aggregates/slt_good_120.slt
index 4ce40bd..21e2cd8 100644
--- a/data/sqlite/random/aggregates/slt_good_120.slt
+++ b/data/sqlite/random/aggregates/slt_good_120.slt
@@ -5088,10 +5088,13 @@ SELECT + 79 * - - col1 col0 FROM tab0 AS cor0
6399
79
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT + 58 ) FROM tab0 AS cor0 WHERE NULL NOT BETWEEN ( NULL ) AND - col1
+----
+NULL
query III rowsort label-834
SELECT * FROM tab2 WHERE - col2 / + 60 * CAST ( NULL AS INTEGER ) IS NULL
@@ -7985,10 +7988,13 @@ SELECT + ( - ( - col0 ) ) col2 FROM tab1
85
91
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1314
SELECT DISTINCT AVG ( DISTINCT ( CAST ( NULL AS INTEGER ) ) ) AS col0 FROM tab1
+----
+NULL
query I rowsort label-1315
SELECT - col0 / + - 46 + + + 73 FROM tab1
@@ -10065,10 +10071,13 @@ SELECT 42 * - - col0 + 2 * col2 * 9 * + - col1 * - + col0 + - 72 AS col1, + 57 *
5238798
5187
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1652
SELECT DISTINCT - AVG ( DISTINCT + - col2 ) * COUNT ( * ) FROM tab0 AS cor0 WHERE NOT NULL IS NULL
+----
+NULL
query I rowsort
SELECT + - 27 + 67 FROM tab0 AS cor0
@@ -11058,10 +11067,13 @@ SELECT + 74 * - 99 * - 89 AS col2 FROM tab1 AS cor0
652014
652014
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1809
SELECT DISTINCT - SUM ( DISTINCT - + CAST ( NULL AS FLOAT8 ) ) * + AVG ( DISTINCT + + 22 ) + + + COUNT ( * ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
+----
+NULL
query I rowsort
SELECT 75 - - col1 col1 FROM tab1
@@ -11966,10 +11978,13 @@ query I rowsort
SELECT + ( - 14 ) AS col2 FROM tab1 WHERE NOT ( - 86 + - + col0 * 95 - 83 * + - col1 * col2 * - - col1 ) IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1965
SELECT DISTINCT + AVG ( DISTINCT - CAST ( NULL AS FLOAT8 ) ) AS col0 FROM tab0
+----
+NULL
query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 WHERE ( NULL ) = NULL
@@ -13398,10 +13413,13 @@ SELECT + 7 * - COUNT ( * ) * 84 FROM tab1
----
-1764
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2198
SELECT + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col2 FROM tab0
+----
+NULL
query II rowsort
SELECT col1 AS col1, col0 * + col1 FROM tab0
@@ -20845,10 +20863,13 @@ SELECT + 60 * - - col0 AS col0 FROM tab2
3840
4500
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3436
SELECT ( COUNT ( * ) ) * AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) + COUNT ( * ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 WHERE NOT NULL IS NOT NULL
+----
+NULL
query I rowsort label-3437
SELECT CAST ( + - CAST ( NULL AS INTEGER ) AS INTEGER ) / col0 + col1 col1 FROM tab1
@@ -20868,10 +20889,13 @@ query III rowsort
SELECT DISTINCT * FROM tab1 cor0 WHERE col2 IN ( + - col0 - + + col0, col1 )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3440
SELECT DISTINCT ( - AVG ( DISTINCT - col1 ) ) / - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col0 FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT ALL + + col0 * + col2 + + - col0 FROM tab2 WHERE NULL BETWEEN NULL AND + 62 * + 47 * - 13 + - 31 + + col0
@@ -22325,10 +22349,13 @@ query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL = - - 3
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3675
SELECT AVG ( DISTINCT - - CAST ( NULL AS INTEGER ) ) col0 FROM tab0
+----
+NULL
query I rowsort
SELECT col2 * - + ( col0 ) + + + col2 AS col1 FROM tab1
@@ -27970,10 +27997,10 @@ SELECT 58 + + - MIN ( + - 68 ) AS col1 FROM tab0 AS cor0
----
126
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -5552
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-4604
SELECT + + CAST ( AVG ( DISTINCT 71 ) AS INTEGER ) * - 78 - + 14 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
+----
+-5552
query I rowsort
SELECT DISTINCT + 19 + 67 + - - ( - col1 ) FROM tab1
@@ -44762,10 +44789,13 @@ SELECT DISTINCT - - 94 * 71 + col0 * - + col2 AS col0 FROM tab0 AS cor0
5804
5969
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT - - 51 ) AS col2 FROM tab1 cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort label-7373
SELECT + col0 / - - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 WHERE NOT col1 * - col2 IS NULL
@@ -55468,10 +55498,13 @@ SELECT * FROM tab1 WHERE col0 NOT IN ( 92 * ( + col0 ) )
----
9 values hashing to c6c0a4111b36d04dbc811a11e4d54cad
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9145
SELECT - ( - ( AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) ) ) - 66 AS col1 FROM tab2
+----
+NULL
query I rowsort label-9146
SELECT COUNT ( * ) FROM tab2 WHERE ( NULL ) IS NOT NULL
@@ -55682,10 +55715,13 @@ SELECT col0 * - col1 col1 FROM tab2 cor0
-4928
-5025
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9183
SELECT ALL MIN ( - 64 ) * + 11 - AVG ( DISTINCT + col2 + CAST ( NULL AS INTEGER ) ) col0 FROM tab0 WHERE NOT NULL NOT BETWEEN 63 AND NULL
+----
+NULL
query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( - col0 ) NOT IN ( 94 )
diff --git a/data/sqlite/random/aggregates/slt_good_121.slt b/data/sqlite/random/aggregates/slt_good_121.slt
index 4bf6915..affa980 100644
--- a/data/sqlite/random/aggregates/slt_good_121.slt
+++ b/data/sqlite/random/aggregates/slt_good_121.slt
@@ -4375,10 +4375,13 @@ SELECT - - 50 + - col2 FROM tab1 cor0
query error DataFusion error: Error during planning: Projections require unique expression names but the expression "cor0\.col1 \* Int64\(\-28\) \+ cor0\.col1 AS col0" at position 0 and "Int64\(53\) \+ Int64\(38\) AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\.
SELECT DISTINCT col1 * + - 28 + + + col1 col0, 53 + + 38 AS col0 FROM tab2 AS cor0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-720
SELECT DISTINCT + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2 AS cor0 WHERE NOT col1 IS NULL
+----
+NULL
query I rowsort
SELECT + - 96 + col2 FROM tab2 AS cor0
@@ -16641,10 +16644,13 @@ SELECT ALL 58 * col2 FROM tab0
query error DataFusion error: Schema error: Schema contains qualified field name tab2\.col0 and unqualified field name col0 which would be ambiguous
SELECT col0, 80 + + col1 AS col0 FROM tab2
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2718
SELECT ALL - + AVG ( DISTINCT 5 ) - + COUNT ( * ) FROM tab1 WHERE NULL < NULL
+----
+NULL
query I rowsort label-2719
SELECT - 77 * + - col2 + - + col1 + + 3 + + col2 * + col2 + + col0 + + col1 / - col2 FROM tab2 AS cor0
@@ -20077,10 +20083,13 @@ SELECT DISTINCT 69 AS col2, 42 - - - COUNT ( - + col2 ) - - + CAST ( + COUNT ( *
69
42
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT - AVG ( DISTINCT + 0 ) AS col2 FROM tab1 WHERE NOT - col2 <> 13
+----
+NULL
query III rowsort
SELECT * FROM tab2 AS cor0 WHERE col0 <= - ( - ( - - col0 ) )
@@ -48596,10 +48605,10 @@ SELECT DISTINCT - + col2 + - 91 FROM tab2 cor0
-131
-149
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 42
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-8006
SELECT ALL + CAST ( - AVG ( DISTINCT - 42 ) AS INTEGER ) FROM tab1 cor0
+----
+42
query I rowsort
SELECT 83 + - + col1 * - col1 - - ( - 17 ) - - - col0 FROM tab1
@@ -50738,10 +50747,13 @@ query I rowsort
SELECT ALL + 41 FROM tab0 WHERE NOT NULL IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8362
SELECT AVG ( DISTINCT col0 ) + + MAX ( ALL - - col1 ) FROM tab2 WHERE NULL < NULL
+----
+NULL
query II rowsort
SELECT DISTINCT + col2 * - col2 AS col0, + 14 * col2 FROM tab2
diff --git a/data/sqlite/random/aggregates/slt_good_122.slt b/data/sqlite/random/aggregates/slt_good_122.slt
index b8c21e3..1bab29e 100644
--- a/data/sqlite/random/aggregates/slt_good_122.slt
+++ b/data/sqlite/random/aggregates/slt_good_122.slt
@@ -13162,10 +13162,13 @@ SELECT - ( + 41 ) FROM tab0
-41
-41
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2164
SELECT ALL AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col0 FROM tab2
+----
+NULL
query I rowsort
SELECT DISTINCT + ( - col2 ) + + 21 FROM tab2
@@ -18484,10 +18487,13 @@ SELECT - col0 * 18 AS col0 FROM tab0
-1746
-270
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL 57 * - AVG ( DISTINCT - - col1 ) col0 FROM tab2 WHERE NOT - 11 IS NOT NULL
+----
+NULL
query I rowsort label-3049
SELECT DISTINCT - 15 / - 7 FROM tab1
@@ -24370,10 +24376,13 @@ SELECT DISTINCT ( + COUNT ( * ) ) AS col2 FROM tab0 cor0 WHERE NOT NULL IS NULL
----
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL + AVG ( DISTINCT + 80 ) + - 78 FROM tab0 WHERE NOT ( NULL ) = NULL
+----
+NULL
query III rowsort
SELECT * FROM tab2 WHERE col0 + col1 * + col2 IS NULL
@@ -31612,10 +31621,10 @@ SELECT col1 * - 45 + + col1 FROM tab0 AS cor0
-44
-924
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 0
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-5219
SELECT ALL - - CAST ( - + AVG ( DISTINCT + - ( col2 ) ) AS INTEGER ) / + - 93 * - ( + COUNT ( * ) ) FROM tab0 AS cor0
+----
+0
query I rowsort label-5220
SELECT - COUNT ( * ) FROM tab2 WHERE NOT ( + col0 ) IS NULL
@@ -32267,10 +32276,13 @@ SELECT + COUNT ( * ) FROM tab1 cor0 WHERE + 3 IS NULL
----
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL + AVG ( DISTINCT + 24 ) - + 85 AS col1 FROM tab2 AS cor0 WHERE NOT + 4 IS NOT NULL
+----
+NULL
query II rowsort
SELECT DISTINCT - col0 col1, - col0 AS col2 FROM tab1 cor0
@@ -33854,10 +33866,13 @@ SELECT + CAST ( - 41 AS INTEGER ) * - col2 AS col0 FROM tab0 AS cor0
query error DataFusion error: Error during planning: Projections require unique expression names but the expression "\(\- Int64\(\-52\)\) AS col0" at position 0 and "cor0\.col2 AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\.
SELECT DISTINCT - - 52 AS col0, col2 AS col0 FROM tab0 AS cor0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5592
SELECT DISTINCT - - COUNT ( * ) * - + AVG ( DISTINCT col1 ) * - + ( + MAX ( + + CAST ( NULL AS INTEGER ) ) ) + + 63 AS col0 FROM tab2 AS cor0
+----
+NULL
query I rowsort label-5593
SELECT ALL COUNT ( * ) / CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 WHERE ( NULL ) < + col1 + + col1
@@ -39010,10 +39025,13 @@ SELECT - 22 + - col1 FROM tab2
-89
-99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6436
SELECT ALL COUNT ( * ) + AVG ( DISTINCT - - CAST ( NULL AS INTEGER ) ) + - 6 FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT + col1 * + 23 + - col1 col1 FROM tab2 AS cor0
@@ -45023,10 +45041,13 @@ SELECT DISTINCT - 21 + - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7437
SELECT ALL + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col0 FROM tab0
+----
+NULL
query I rowsort
SELECT ( + ( - - col2 ) ) * col1 FROM tab2
@@ -56337,10 +56358,13 @@ query III rowsort
SELECT DISTINCT * FROM tab0 cor0 WHERE NULL NOT BETWEEN col2 AND - + 56
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9292
SELECT ALL + AVG ( DISTINCT + - 12 ) + - MAX ( DISTINCT + CAST ( ( - 3 ) AS INTEGER ) ) AS col2 FROM tab2 AS cor0 WHERE NULL IN ( - 67, col0 + + + col2, - col2 )
+----
+NULL
query I rowsort label-9293
SELECT ( - + ( ( - COUNT ( * ) ) ) ) FROM tab2 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_123.slt b/data/sqlite/random/aggregates/slt_good_123.slt
index b2a63b1..5f2bb8f 100644
--- a/data/sqlite/random/aggregates/slt_good_123.slt
+++ b/data/sqlite/random/aggregates/slt_good_123.slt
@@ -3398,11 +3398,14 @@ NULL
185
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 43
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-553
SELECT - - 43, - AVG ( DISTINCT + - CAST ( NULL AS INTEGER ) ) AS col0 FROM tab1 WHERE - col2 + - col2 BETWEEN NULL AND NULL
+----
+43
+NULL
query I rowsort label-554
SELECT ALL + ( - - 8 ) / 1 AS col1 FROM tab1
@@ -5400,10 +5403,10 @@ query III rowsort
SELECT ALL * FROM tab1 WHERE ( 18 ) BETWEEN ( + col0 ) AND 32 * + col1
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -118
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-890
SELECT DISTINCT - 32 + CAST ( - AVG ( DISTINCT 86 ) AS INTEGER ) FROM tab2
+----
+-118
query I rowsort label-891
SELECT ALL + CAST ( + col1 AS INTEGER ) + - col1 FROM tab1
@@ -8884,10 +8887,10 @@ query I rowsort label-1453
SELECT + - 41 AS col1 FROM tab0 WHERE NOT + 71 * - CAST ( NULL AS INTEGER ) * - ( col1 ) + - col1 BETWEEN + - 2 - - CAST ( NULL AS INTEGER ) AND NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 87
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-1454
SELECT DISTINCT CAST ( + AVG ( DISTINCT + 87 ) AS INTEGER ) FROM tab1
+----
+87
query I rowsort label-1455
SELECT - MIN ( ALL + 10 ) AS col1 FROM tab1 AS cor0
@@ -10895,10 +10898,13 @@ SELECT + + col0 - + col1 FROM tab0 AS cor0
66
96
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1794
SELECT + MAX ( + 76 ) * - + COUNT ( * ) - - AVG ( DISTINCT + - CAST ( NULL AS INTEGER ) ) col0 FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT + 64 * - + col2 + - 7 AS col1 FROM tab0 AS cor0
@@ -14079,10 +14085,13 @@ SELECT ALL - - COUNT ( * ) * 30 AS col0 FROM tab0 AS cor0
----
90
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2313
SELECT + COUNT ( * ) * + AVG ( DISTINCT - - 43 ) + COUNT ( * ) col1 FROM tab1 cor0 WHERE NOT NULL NOT BETWEEN col2 AND + 89 + + col2
+----
+NULL
query I rowsort
SELECT DISTINCT col0 + - + ( 19 ) AS col0 FROM tab1 AS cor0
@@ -27570,10 +27579,13 @@ SELECT - 10 / - - col0 FROM tab2
0
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT + col2 ) - + AVG ( DISTINCT col0 ) FROM tab1 AS cor0 WHERE NOT - 85 IS NOT NULL
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] [I]
@@ -31807,10 +31819,13 @@ SELECT ALL ( - AVG ( + col1 ) ) FROM tab1 WHERE ( NULL ) > 34 * + col1
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5236
SELECT ALL AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col2 FROM tab1
+----
+NULL
query III rowsort
SELECT ALL * FROM tab0 WHERE 51 * col1 BETWEEN ( NULL ) AND ( NULL )
@@ -31899,10 +31914,13 @@ NULL
NULL
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5253
SELECT + AVG ( DISTINCT - ( CAST ( NULL AS INTEGER ) ) ) AS col0 FROM tab2
+----
+NULL
query I rowsort
SELECT ALL ( - col0 ) + - ( col2 ) FROM tab0
@@ -37430,10 +37448,13 @@ SELECT DISTINCT + ( 73 ) / 4 + col2 / 69 AS col1 FROM tab2
----
18
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL + AVG ( DISTINCT - 0 ) FROM tab1 WHERE col0 * 30 + col2 = NULL
+----
+NULL
query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT IN ( 36 )
@@ -42529,10 +42550,13 @@ SELECT col1 * - CAST ( + ( - + 92 ) AS INTEGER ) - col1 + - 62 * - col0 FROM tab
5725
9919
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6995
SELECT + AVG ( ALL col1 ) * - + CAST ( AVG ( DISTINCT + - 13 ) AS FLOAT8 ) * - 70 * - 80 + - 61 FROM tab1 WHERE - 12 IS NULL
+----
+NULL
query I rowsort
SELECT - 62 - + 60 FROM tab2
@@ -52815,10 +52839,10 @@ SELECT DISTINCT + MIN ( - + 83 ) FROM tab1
----
-83
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 9
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-8692
SELECT ALL + ( + CAST ( AVG ( DISTINCT + + 9 ) AS INTEGER ) ) FROM tab1
+----
+9
query I rowsort label-8693
SELECT + COUNT ( * ) * MAX ( + col2 ) - + ( + - 21 ) FROM tab2 AS cor0
@@ -55305,10 +55329,10 @@ SELECT ALL - 57 * - + 14 + col1 * 12 + col2 AS col1 FROM tab1 AS cor0
1430
917
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 25
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-9112
SELECT ALL + COUNT ( * ) + - + CAST ( - AVG ( DISTINCT col1 ) AS INTEGER ) AS col0 FROM tab1
+----
+25
query I rowsort
SELECT ALL - 77 * col2 * - 50 FROM tab0 AS cor0
@@ -58863,10 +58887,13 @@ SELECT DISTINCT + MIN ( DISTINCT - 40 ) FROM tab1 AS cor0 WHERE - col2 IS NULL
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9693
SELECT DISTINCT ( AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) ) FROM tab1 cor0
+----
+NULL
query I rowsort
SELECT - 45 FROM tab0 AS cor0 WHERE - col0 IS NULL
diff --git a/data/sqlite/random/aggregates/slt_good_124.slt b/data/sqlite/random/aggregates/slt_good_124.slt
index 0f50edb..e72ccd7 100644
--- a/data/sqlite/random/aggregates/slt_good_124.slt
+++ b/data/sqlite/random/aggregates/slt_good_124.slt
@@ -42,10 +42,13 @@ SELECT - + MAX ( DISTINCT - CAST ( + + col0 AS INTEGER ) ) col2 FROM tab0 AS cor
----
15
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1
SELECT ALL - AVG ( DISTINCT + + 78 ) AS col0 FROM tab2 AS cor0 WHERE NOT + CAST ( NULL AS FLOAT8 ) * + + 20 / col1 + - 83 IS NULL
+----
+NULL
query I rowsort
SELECT DISTINCT - col2 + - - col1 FROM tab2 AS cor0
@@ -8270,10 +8273,13 @@ SELECT DISTINCT - + col1 * + 87 AS col0 FROM tab1 AS cor0
-4089
-435
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1370
SELECT DISTINCT + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) + - + 91 FROM tab1 AS cor0
+----
+NULL
query I rowsort
SELECT ALL - col2 AS col0 FROM tab2 cor0 WHERE NOT NULL NOT BETWEEN ( - ( col1 ) ) AND - col0
@@ -9707,10 +9713,13 @@ SELECT ALL + col0 - col2 * - - col1 AS col0 FROM tab0
-2
-3792
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1604
SELECT DISTINCT - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) * + 34 AS col0 FROM tab1
+----
+NULL
query I rowsort
SELECT DISTINCT col0 - + 19 + - - col2 FROM tab1
@@ -13139,10 +13148,13 @@ SELECT ALL - col2 * col2 + + 29 AS col1 FROM tab0 AS cor0
-71
-9772
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - ( - AVG ( DISTINCT 54 ) ) AS col1 FROM tab0 AS cor0 WHERE NOT NULL >= ( + 29 )
+----
+NULL
query III rowsort
SELECT DISTINCT * FROM tab2 cor0 WHERE 2 * + col2 < NULL
@@ -20870,11 +20882,11 @@ SELECT DISTINCT - 79 * + 98 - - - 12 FROM tab0 AS cor0
----
-7754
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 0
-# Datafusion - Expected - -1290
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query II rowsort label-3424
SELECT - 0 * - CAST ( + AVG ( DISTINCT - 2 ) AS INTEGER ) AS col0, 86 * - 15 FROM tab0 AS cor0
+----
+0
+-1290
query I rowsort
SELECT ALL + col0 * col1 * 62 AS col0 FROM tab0 AS cor0
@@ -28357,10 +28369,13 @@ SELECT ALL 92 * + 5 AS col2 FROM tab1
460
460
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4648
SELECT AVG ( DISTINCT + - CAST ( NULL AS INTEGER ) ) FROM tab0
+----
+NULL
query III rowsort
SELECT ALL * FROM tab2 WHERE NULL <> - col2
@@ -28754,10 +28769,13 @@ query IIIIII rowsort label-4712
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab0 AS cor1 WHERE NOT + CAST ( NULL AS INTEGER ) IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL - AVG ( DISTINCT - 77 ) FROM tab2 AS cor0 WHERE NOT 60 NOT IN ( + + col0, col1 )
+----
+NULL
query I rowsort
SELECT ALL - + ( - 75 ) FROM tab2 AS cor0
@@ -29033,10 +29051,13 @@ SELECT - - 88 * + + 68 + - COUNT ( * ) AS col2 FROM tab1 cor0
----
5981
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4757
SELECT - + AVG ( DISTINCT - col0 ) * - COUNT ( * ) FROM tab1 WHERE ( NOT - col1 IS NOT NULL )
+----
+NULL
query I rowsort
SELECT 73 * + 1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
@@ -30024,10 +30045,13 @@ SELECT DISTINCT - col0 * + col2 * + 16 * 72 col2 FROM tab1
-5777280
-7128576
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4920
SELECT - + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col2 FROM tab1 AS cor0
+----
+NULL
query I rowsort label-4921
SELECT col2 / - 73 FROM tab0 AS cor0
@@ -32716,10 +32740,13 @@ SELECT ALL + col0 * + 26 FROM tab1 AS cor0
2210
2366
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5358
SELECT ALL - COUNT ( * ) / - - AVG ( DISTINCT + col1 ) + + + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col1 FROM tab0 AS cor0
+----
+NULL
query II rowsort
SELECT DISTINCT - col0, - col2 col2 FROM tab1 cor0
@@ -33990,10 +34017,13 @@ SELECT - col2 * + 48 FROM tab0 cor0
-4752
-480
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5574
SELECT ALL - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab1 AS cor0
+----
+NULL
query I rowsort
SELECT ( - + 78 ) * + col1 FROM tab1 AS cor0
@@ -35216,10 +35246,13 @@ SELECT ALL 66 / - COUNT ( * ) AS col1 FROM tab0 AS cor0
----
-22
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5770
SELECT + + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0
+----
+NULL
query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT - col1 * ( + col1 ) * - ( - + 10 ) IS NULL
@@ -38912,10 +38945,13 @@ SELECT DISTINCT CAST ( ( - COUNT ( * ) ) AS INTEGER ) AS col1 FROM tab0
----
-3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6379
SELECT DISTINCT AVG ( DISTINCT col0 ) * COUNT ( * ) FROM tab0 WHERE - col0 IS NULL
+----
+NULL
query I rowsort label-6380
SELECT 97 / COUNT ( * ) col0 FROM tab2 WHERE NOT NULL IS NOT NULL
@@ -58997,10 +59033,13 @@ SELECT ALL - col0 / - col0, - col0 AS col0 FROM tab1 AS cor0
1
-91
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9722
SELECT DISTINCT AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab0
+----
+NULL
query I rowsort label-9723
SELECT - MIN ( DISTINCT - 45 ) AS col1 FROM tab0
diff --git a/data/sqlite/random/aggregates/slt_good_125.slt b/data/sqlite/random/aggregates/slt_good_125.slt
index 355a4f4..9c7bd90 100644
--- a/data/sqlite/random/aggregates/slt_good_125.slt
+++ b/data/sqlite/random/aggregates/slt_good_125.slt
@@ -27365,10 +27365,13 @@ SELECT 78 + COUNT ( * ) AS col2 FROM tab1
----
81
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4510
SELECT ALL COUNT ( * ) / AVG ( DISTINCT + ( ( - 7 ) ) * 71 ) FROM tab2 WHERE NOT 98 NOT BETWEEN ( - col0 ) AND ( + col1 )
+----
+NULL
query I rowsort
SELECT - 92 + + col2 * col0 FROM tab0
@@ -30007,10 +30010,13 @@ query I rowsort
SELECT - col0 col1 FROM tab1 AS cor0 WHERE col0 * - 39 BETWEEN - 90 AND NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4952
SELECT ALL AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col2 FROM tab0
+----
+NULL
query I rowsort label-4953
SELECT ALL - 51 / + 87 * + 97 + - - 13 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
diff --git a/data/sqlite/random/aggregates/slt_good_126.slt b/data/sqlite/random/aggregates/slt_good_126.slt
index 41e0f4e..19f8872 100644
--- a/data/sqlite/random/aggregates/slt_good_126.slt
+++ b/data/sqlite/random/aggregates/slt_good_126.slt
@@ -4074,10 +4074,13 @@ SELECT - COUNT ( * ) * + MIN ( col0 ) AS col1 FROM tab1
----
-153
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-675
SELECT + ( - AVG ( DISTINCT + col0 ) ) + COUNT ( * ) AS col0 FROM tab2 WHERE NOT ( NULL <> - col2 )
+----
+NULL
query I rowsort label-676
SELECT DISTINCT + COUNT ( * ) * 28 + - 21 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
@@ -17436,10 +17439,13 @@ SELECT DISTINCT + ( 41 ) - - 45 FROM tab2
----
86
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2884
SELECT SUM ( + CAST ( NULL AS INTEGER ) ) + + COUNT ( * ) + - + AVG ( ALL - col1 ) / + AVG ( DISTINCT + col0 ) AS col0 FROM tab1
+----
+NULL
query I rowsort label-2885
SELECT MAX ( ( col2 ) ) FROM tab0 AS cor0 WHERE NULL < NULL
@@ -30559,10 +30565,13 @@ SELECT - - 1 * 67 + ( - 53 ) AS col2 FROM tab2 AS cor0
14
14
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5055
SELECT - COUNT ( * ) - + AVG ( DISTINCT - 97 ) + - AVG ( DISTINCT - 18 ) * MIN ( + col2 ) FROM tab1 cor0 WHERE ( NOT NULL >= NULL )
+----
+NULL
query I rowsort label-5056
SELECT COUNT ( * ) FROM tab0 AS cor0 WHERE ( - 84 ) IS NOT NULL
@@ -31628,10 +31637,13 @@ SELECT - col1 / 72 AS col1 FROM tab0
0
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5233
SELECT DISTINCT - AVG ( DISTINCT + + CAST ( NULL AS INTEGER ) ) / COUNT ( * ) / + - COUNT ( * ) AS col0 FROM tab1
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] [I]
@@ -40208,10 +40220,13 @@ SELECT ALL + - MIN ( ALL - 29 ) AS col1 FROM tab2 AS cor0
----
29
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6636
SELECT + + 54 * + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) + ( 54 ) col2 FROM tab0 AS cor0 WHERE + col1 BETWEEN NULL AND - 75
+----
+NULL
query I rowsort label-6637
SELECT + - 69 / MIN ( - col1 ) AS col1 FROM tab1 AS cor0
@@ -53861,10 +53876,13 @@ SELECT + - col1 + + ( - col0 ) * + + 40 * - col1 + - col1 / - + col2 AS col1 FRO
200934
93791
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8866
SELECT DISTINCT + + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) + + COUNT ( DISTINCT col0 ) FROM tab2 AS cor0
+----
+NULL
query I rowsort label-8867
SELECT - col2 * 64 + + col1 + col1 / - CAST ( NULL AS INTEGER ) * + ( + 88 ) + col2 col0 FROM tab1 AS cor0
@@ -55444,10 +55462,13 @@ query I rowsort
SELECT - ( + 21 ) FROM tab1 AS cor0 WHERE NOT NULL <> ( NULL )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL - AVG ( DISTINCT - 15 ) AS col2 FROM tab0 AS cor0 WHERE NOT NULL <> ( col0 )
+----
+NULL
query I rowsort
SELECT DISTINCT col1 * 83 FROM tab2
diff --git a/data/sqlite/random/aggregates/slt_good_127.slt b/data/sqlite/random/aggregates/slt_good_127.slt
index 90b0766..6f47960 100644
--- a/data/sqlite/random/aggregates/slt_good_127.slt
+++ b/data/sqlite/random/aggregates/slt_good_127.slt
@@ -9325,10 +9325,13 @@ SELECT ALL 66 - + + SUM ( + - col1 ) AS col1 FROM tab0 AS cor0
----
169
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( DISTINCT + 49 ) col2 FROM tab0 WHERE 28 NOT BETWEEN - 91 AND NULL
+----
+NULL
query I rowsort
SELECT col0 FROM tab0 WHERE - 1 <> NULL
@@ -13421,10 +13424,10 @@ NULL
query error DataFusion error: Error during planning: Projections require unique expression names but the expression "tab0\.col0 \+ tab0\.col1 AS col0" at position 0 and "tab0\.col1 AS col0" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\.
SELECT ALL col0 + + col1 AS col0, + col1 AS col0 FROM tab0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -3
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-2169
SELECT DISTINCT - + ( COUNT ( * ) ) + + - COUNT ( * ) / CAST ( + + AVG ( DISTINCT - col0 ) AS INTEGER ) AS col0 FROM tab0 AS cor0
+----
+-3
query I rowsort
SELECT ALL + 72 - + - col0 FROM tab0 AS cor0
@@ -18547,10 +18550,13 @@ NULL
87
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3021
SELECT DISTINCT AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2
+----
+NULL
query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab2 cor0 WHERE NOT ( - col2 ) NOT IN ( - 90 / - - ( - - ( + - 25 ) ), - col2 / col0 )
@@ -25576,11 +25582,14 @@ SELECT DISTINCT + MAX ( ALL 71 ) FROM tab1 AS cor0
----
71
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -3
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-4168
SELECT - COUNT ( * ), AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col2 FROM tab2 AS cor0
+----
+-3
+NULL
query I rowsort label-4169
SELECT - CAST ( + col2 AS INTEGER ) col0 FROM tab0 AS cor0 WHERE NOT NULL IS NULL
@@ -31568,10 +31577,13 @@ SELECT ALL - col1 * + - col2 * - col0 FROM tab0
-57105
-9603
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL + AVG ( DISTINCT 45 ) AS col1 FROM tab1 WHERE NULL NOT BETWEEN - col2 AND + col2 * - 93
+----
+NULL
query I rowsort label-5162
SELECT - 35 * COUNT ( * ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
@@ -35461,10 +35473,13 @@ SELECT col1 + - - col1 AS col0 FROM tab2
134
154
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL + + AVG ( DISTINCT - + 99 ) FROM tab2 WHERE col2 IS NULL
+----
+NULL
query I rowsort label-5799
SELECT - COUNT ( * ) FROM tab1 WHERE - 21 * col2 * - - 80 >= CAST ( CAST ( NULL AS INTEGER ) AS INTEGER ) * + col0
@@ -37198,10 +37213,10 @@ SELECT - - 56 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -146
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-6086
SELECT ALL - COUNT ( * ) + - 69 + + CAST ( AVG ( DISTINCT - col2 ) AS INTEGER ) AS col0 FROM tab1 AS cor0
+----
+-146
query I rowsort
SELECT ALL - 75 - ( col0 ) AS col0 FROM tab0 cor0
@@ -40633,10 +40648,13 @@ SELECT - 53 - 35 FROM tab2
-88
-88
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6658
SELECT ALL COUNT ( * ) * - + AVG ( DISTINCT + + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2
+----
+NULL
query I rowsort label-6659
SELECT + + COUNT ( * ) / COUNT ( * ) / COUNT ( * ) + 39 + - CAST ( NULL AS INTEGER ) + - 94 - - - 23 * + SUM ( + col0 ) AS col2 FROM tab0 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_128.slt b/data/sqlite/random/aggregates/slt_good_128.slt
index e1b0649..1fdb8b3 100644
--- a/data/sqlite/random/aggregates/slt_good_128.slt
+++ b/data/sqlite/random/aggregates/slt_good_128.slt
@@ -2163,10 +2163,13 @@ query I rowsort
SELECT DISTINCT - ( + col2 ) FROM tab0 WHERE NOT ( col2 + - col1 ) IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL AVG ( DISTINCT - 98 ) * - 38 FROM tab2 WHERE NOT - col1 BETWEEN NULL AND ( col2 * col2 )
+----
+NULL
query I rowsort
SELECT col2 AS col0 FROM tab2 WHERE ( + col1 ) BETWEEN col1 - - 12 AND col2
@@ -5600,10 +5603,13 @@ SELECT * FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 WHERE + 83 IS NOT NULL
----
54 values hashing to 42daa03e48aa6755defd0a3206e51d8e
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-919
SELECT COUNT ( * ) + - + AVG ( DISTINCT col0 ) AS col0 FROM tab0 WHERE - 63 + - col2 IS NULL
+----
+NULL
query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NULL NOT IN ( - col0 * - col0 + + col0 )
@@ -16803,10 +16809,13 @@ SELECT + col2 * - + col0 * + - col0 FROM tab2
326250
48668
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT 30 ) AS col2 FROM tab2 WHERE + ( ( + col0 ) ) IS NULL
+----
+NULL
query I rowsort label-2747
SELECT ALL 34 * 68 + + col0 FROM tab1 WHERE NOT + col1 * + CAST ( - col2 AS FLOAT8 ) IS NULL
@@ -31078,10 +31087,13 @@ SELECT - 52 * - col0 FROM tab1
4420
4732
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT - - col2 ) AS col0 FROM tab2 AS cor0 WHERE NOT NULL = NULL
+----
+NULL
query I rowsort
SELECT DISTINCT + col0 * 88 AS col1 FROM tab1 AS cor0
@@ -44605,10 +44617,13 @@ NULL
NULL
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7316
SELECT - AVG ( DISTINCT + - CAST ( NULL AS INTEGER ) ) * + - AVG ( ALL + 28 ) FROM tab1
+----
+NULL
query I rowsort label-7317
SELECT MIN ( ALL + col2 ) AS col2 FROM tab1 AS cor0
@@ -46181,10 +46196,10 @@ SELECT DISTINCT - ( 73 ) * - COUNT ( * ) FROM tab2
----
219
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -19
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-7578
SELECT DISTINCT + CAST ( - AVG ( DISTINCT col1 ) AS INTEGER ) + + CAST ( + COUNT ( * ) AS INTEGER ) AS col1 FROM tab1
+----
+-19
query I rowsort label-7579
SELECT DISTINCT - ( 88 ) / - col0 + col0 FROM tab1
@@ -48469,10 +48484,13 @@ SELECT ALL * FROM tab1 WHERE + ( + 68 ) * + col2 * + col2 - + - col0 * ( + + col
----
9 values hashing to c6c0a4111b36d04dbc811a11e4d54cad
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7958
SELECT + AVG ( DISTINCT - - CAST ( NULL AS FLOAT8 ) ) + - COUNT ( * ) FROM tab2
+----
+NULL
query I rowsort
SELECT DISTINCT col1 - 16 AS col0 FROM tab0
@@ -52622,10 +52640,13 @@ SELECT ALL - MAX ( ALL + - col1 ) FROM tab0 AS cor0 WHERE col2 IS NOT NULL
----
1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8635
SELECT + - AVG ( DISTINCT - CAST ( NULL AS FLOAT8 ) ) AS col1 FROM tab0 AS cor0
+----
+NULL
query I rowsort label-8636
SELECT SUM ( - CAST ( col2 AS INTEGER ) ) * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
@@ -55323,10 +55344,13 @@ SELECT col0 * + - 98 FROM tab1
-8330
-8918
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9076
SELECT AVG ( DISTINCT + ( CAST ( NULL AS INTEGER ) ) ) AS col1 FROM tab1
+----
+NULL
query III rowsort
SELECT ALL * FROM tab2 WHERE NOT + col0 / 35 * - + 46 + + 87 + - 69 * 40 IS NULL
diff --git a/data/sqlite/random/aggregates/slt_good_13.slt b/data/sqlite/random/aggregates/slt_good_13.slt
index 46434bd..2020100 100644
--- a/data/sqlite/random/aggregates/slt_good_13.slt
+++ b/data/sqlite/random/aggregates/slt_good_13.slt
@@ -9542,10 +9542,10 @@ SELECT - col0, col1 AS col0 FROM tab2
-75
67
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -1
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-1578
SELECT ALL 88 / CAST ( + + AVG ( DISTINCT + - 88 ) AS INTEGER ) FROM tab0, tab0 AS cor0
+----
+-1
# Datafusion - Datafusion expected results:
# Datafusion - Expected - 23
@@ -27732,10 +27732,10 @@ SELECT ALL MAX ( + 46 ) AS col2 FROM tab1 AS cor0
query error DataFusion error: Schema error: Schema contains qualified field name cor0\.col2 and unqualified field name col2 which would be ambiguous
SELECT col2 AS col2, ( + 1 ) AS col2 FROM tab1 AS cor0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -31
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-4615
SELECT - CAST ( - - AVG ( DISTINCT ( 31 ) ) AS INTEGER ) FROM tab2 cor0
+----
+-31
query II rowsort
SELECT - 49, - col1 AS col2 FROM tab2 AS cor0
@@ -45014,10 +45014,13 @@ query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT ( NULL ) BETWEEN NULL AND + col2
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7469
SELECT + AVG ( DISTINCT - col2 ) * COUNT ( * ) AS col0 FROM tab2 AS cor0 WHERE NOT NULL <= NULL
+----
+NULL
query I rowsort
SELECT - col1 FROM tab2 AS cor0 WHERE NOT NULL IS NOT NULL
@@ -45882,10 +45885,13 @@ query I rowsort
SELECT 14 AS col1 FROM tab1 AS cor0 WHERE NOT NULL = ( NULL )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - + ( - - AVG ( DISTINCT 54 ) ) AS col1 FROM tab2 AS cor0 WHERE - col0 * - - col2 / + + col2 + + col2 NOT BETWEEN - col1 AND + + col1
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - -1440
@@ -47296,10 +47302,10 @@ SELECT - COUNT ( * ) + + COUNT ( * ) AS col1 FROM tab2 cor0
----
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -20
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-7856
SELECT DISTINCT - + CAST ( AVG ( DISTINCT + 20 ) AS INTEGER ) col1 FROM tab2 AS cor0
+----
+-20
query I rowsort
SELECT + - 93 * + col1 FROM tab1 AS cor0
@@ -51180,10 +51186,13 @@ SELECT DISTINCT - col1 * col2 FROM tab1 AS cor0 WHERE col0 / + col1 NOT IN ( col
-295
-3196
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8507
SELECT ALL - - AVG ( DISTINCT - + ( CAST ( NULL AS FLOAT8 ) ) ) * - 37 AS col0 FROM tab1 AS cor0
+----
+NULL
query I rowsort
SELECT - col1 * + - col1 + + - col0 AS col2 FROM tab1 AS cor0
@@ -51488,10 +51497,13 @@ query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE 64 * - 58 IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ( - AVG ( DISTINCT - 27 ) ) FROM tab2 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort
SELECT - 92 AS col1 FROM ( tab0 AS cor0 CROSS JOIN tab0 cor1 ) WHERE NULL BETWEEN NULL AND NULL
diff --git a/data/sqlite/random/aggregates/slt_good_14.slt b/data/sqlite/random/aggregates/slt_good_14.slt
index 1513f45..7e61c5b 100644
--- a/data/sqlite/random/aggregates/slt_good_14.slt
+++ b/data/sqlite/random/aggregates/slt_good_14.slt
@@ -50607,11 +50607,14 @@ query III rowsort
SELECT * FROM tab1 WHERE NOT - - col1 * + 11 NOT BETWEEN ( NULL ) AND col2
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 76
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-8294
SELECT MIN ( ALL + + 76 ), AVG ( DISTINCT - - CAST ( NULL AS INTEGER ) ) AS col2 FROM tab2
+----
+76
+NULL
query I rowsort
SELECT 95 * - 53 AS col2 FROM tab2
@@ -52755,10 +52758,13 @@ query I rowsort
SELECT col0 AS col0 FROM tab0 AS cor0 WHERE 31 / ( + + 83 ) + + + 91 BETWEEN ( NULL ) AND col2
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8652
SELECT AVG ( DISTINCT CAST ( NULL AS FLOAT8 ) ) AS col1 FROM tab2 AS cor0
+----
+NULL
query II rowsort label-8653
SELECT DISTINCT - 90 AS col0, + SUM ( + col0 ) FROM tab2 AS cor0 WHERE NULL IS NULL
@@ -53790,10 +53796,13 @@ SELECT - 90 + 12 / + - col2 + - col2 * col1 FROM tab0 AS cor0
-301
-3897
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL AVG ( DISTINCT + + 60 ) FROM tab1 AS cor0 WHERE NULL BETWEEN NULL AND NULL
+----
+NULL
query I rowsort
SELECT col2 + + col1 + + + col0 * - + col0 + + col1 AS col2 FROM tab1 cor0
diff --git a/data/sqlite/random/aggregates/slt_good_15.slt b/data/sqlite/random/aggregates/slt_good_15.slt
index ada97ab..9236940 100644
--- a/data/sqlite/random/aggregates/slt_good_15.slt
+++ b/data/sqlite/random/aggregates/slt_good_15.slt
@@ -23176,10 +23176,13 @@ SELECT - COUNT ( * ) FROM tab0 AS cor0 WHERE ( NULL ) BETWEEN NULL AND NULL
----
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3789
SELECT ALL AVG ( DISTINCT - + ( - + CAST ( NULL AS INTEGER ) ) ) + + 73 FROM tab0 AS cor0
+----
+NULL
query I rowsort
SELECT DISTINCT + col2 + + col2 + + col1 FROM tab2
@@ -26329,10 +26332,13 @@ SELECT DISTINCT CAST ( NULL AS INTEGER ) + + col0 - + col1 AS col1 FROM tab2
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4300
SELECT ALL 80 * - MAX ( DISTINCT - - CAST ( NULL AS FLOAT8 ) ) + - 4 + - 92 * - AVG ( DISTINCT + + 81 ) AS col1 FROM tab1
+----
+NULL
query III rowsort label-4301
SELECT * FROM tab1 WHERE + CAST ( - col2 AS INTEGER ) - - + 90 <> + col2
@@ -43134,10 +43140,13 @@ SELECT ALL - MIN ( 98 ) FROM tab1
----
-98
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7056
SELECT + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0
+----
+NULL
query II rowsort
SELECT ALL - col0, 51 AS col0 FROM tab2 AS cor0
@@ -45470,10 +45479,13 @@ SELECT col0, - col1 * col2 FROM tab0
97
-99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + - AVG ( DISTINCT + 97 ) FROM tab0 AS cor0 WHERE NOT ( 85 ) <> col1
+----
+NULL
query I rowsort
SELECT ALL - 2 AS col2 FROM ( tab2 AS cor0 CROSS JOIN tab2 AS cor1 )
@@ -55174,10 +55186,13 @@ SELECT * FROM tab1 WHERE NOT col2 >= - col1 / col2 + + 89 * col0
----
9 values hashing to c6c0a4111b36d04dbc811a11e4d54cad
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9050
SELECT AVG ( DISTINCT 95 ) AS col0 FROM tab0 WHERE NOT ( - col1 ) NOT BETWEEN + 6 + col1 AND CAST ( NULL AS INTEGER ) * col1 + + 26
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] [I]
@@ -58348,10 +58363,13 @@ SELECT DISTINCT - col2 + col0 / + col2 AS col0 FROM tab1 AS cor0
-67
-96
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9576
SELECT DISTINCT AVG ( DISTINCT - col2 ) / + COUNT ( * ) AS col2 FROM tab0 WHERE NOT - col2 IS NOT NULL
+----
+NULL
query IIIIII rowsort label-9577
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 WHERE + CAST ( NULL AS INTEGER ) IS NOT NULL
diff --git a/data/sqlite/random/aggregates/slt_good_16.slt b/data/sqlite/random/aggregates/slt_good_16.slt
index 4929462..11fd29b 100644
--- a/data/sqlite/random/aggregates/slt_good_16.slt
+++ b/data/sqlite/random/aggregates/slt_good_16.slt
@@ -6733,10 +6733,13 @@ SELECT DISTINCT - CAST ( - col1 AS INTEGER ) * - col1 * + 54 AS col0 FROM tab1 A
-119286
-1350
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT 40 ) FROM tab1 AS cor0 WHERE NOT NULL >= ( NULL )
+----
+NULL
query I rowsort label-1110
SELECT DISTINCT col2 / + - col2 AS col0 FROM tab2 cor0
@@ -13229,10 +13232,13 @@ SELECT + - CAST ( col0 AS INTEGER ) AS col1 FROM tab1 AS cor0 WHERE NOT ( + CAST
-85
-91
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2174
SELECT AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) FROM tab1
+----
+NULL
query III rowsort label-2175
SELECT * FROM tab0 WHERE NOT - col2 + CAST ( NULL AS FLOAT8 ) * + CAST ( NULL AS INTEGER ) IS NOT NULL
@@ -21163,10 +21169,13 @@ SELECT - 65 * + - 22 * col2 + - CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
14290
67163
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3474
SELECT - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query I rowsort label-3475
SELECT DISTINCT COUNT ( * ) * + 42 AS col2 FROM tab1
@@ -31049,11 +31058,11 @@ SELECT ALL + COUNT ( 56 ) FROM tab2 AS cor0
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -80
-# Datafusion - Expected - 4
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query II rowsort label-5106
SELECT ALL + CAST ( - AVG ( DISTINCT + 80 ) AS INTEGER ) AS col2, 4 AS col1 FROM tab1
+----
+-80
+4
# Datafusion - Datafusion expected results:
# Datafusion - Expected - -10
@@ -31313,10 +31322,10 @@ query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE - ( + 89 ) IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 2
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-5150
SELECT DISTINCT + + CAST ( + - AVG ( DISTINCT + - 2 ) AS INTEGER ) FROM tab2 AS cor0
+----
+2
query I rowsort label-5151
SELECT ALL col2 / - + 66 AS col0 FROM tab0 AS cor0
@@ -38110,10 +38119,10 @@ SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - col1 AS col0 FROM tab2 AS cor0
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 85
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-6276
SELECT ( - CAST ( - AVG ( DISTINCT - 98 ) AS INTEGER ) ) + COUNT ( * ) * MIN ( - - 61 ) col1 FROM tab2 AS cor0
+----
+85
query II rowsort label-6277
SELECT + - 23 col2, + COUNT ( * ) AS col0 FROM tab1 AS cor0
@@ -53061,10 +53070,13 @@ SELECT + col1 * col1 + + ( + 24 ) FROM tab2 AS cor0
4513
5953
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL AVG ( DISTINCT - 30 ) AS col2 FROM tab0 AS cor0 WHERE - 83 IS NULL
+----
+NULL
query I rowsort
SELECT ALL - 93 + 91 FROM tab2 cor0
diff --git a/data/sqlite/random/aggregates/slt_good_17.slt b/data/sqlite/random/aggregates/slt_good_17.slt
index d0545e4..167a193 100644
--- a/data/sqlite/random/aggregates/slt_good_17.slt
+++ b/data/sqlite/random/aggregates/slt_good_17.slt
@@ -3862,10 +3862,13 @@ SELECT DISTINCT col1 AS col0, + 44 FROM tab1
query error DataFusion error: Schema error: Schema contains qualified field name tab1\.col0 and unqualified field name col0 which would be ambiguous
SELECT DISTINCT col0, col2 * col0 + + 33 AS col0 FROM tab1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-632
SELECT - 56 * + ( + 59 * ( AVG ( DISTINCT 31 ) / + MIN ( DISTINCT ( + 98 ) + + col0 ) ) ) AS col0 FROM tab2 WHERE NOT - + ( col1 ) * - col0 IS NOT NULL
+----
+NULL
query III rowsort
SELECT * FROM tab0 WHERE NOT col2 <> ( - - col1 )
@@ -3878,10 +3881,13 @@ SELECT - 82 * - 53 FROM tab2
4346
4346
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-635
SELECT ALL - AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0
+----
+NULL
query I rowsort
SELECT - ( 90 ) AS col1 FROM tab1 AS cor0
@@ -22093,10 +22099,13 @@ SELECT DISTINCT 38 AS col0 FROM tab2 AS cor0 WHERE NOT 18 = col0
----
38
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - ( AVG ( DISTINCT - 21 ) ) FROM tab1 AS cor0 WHERE - ( - + col2 ) IS NULL
+----
+NULL
query III rowsort
SELECT * FROM tab1 WHERE + 54 NOT IN ( + col2, - 50 + - 4 )
@@ -24471,10 +24480,13 @@ SELECT - - ( + + 31 ) FROM tab1 AS cor0
31
31
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4002
SELECT - AVG ( DISTINCT - - CAST ( NULL AS FLOAT8 ) ) FROM tab2 AS cor0
+----
+NULL
query I rowsort label-4003
SELECT + MIN ( DISTINCT - 7 ) FROM tab1 AS cor0
@@ -33848,10 +33860,13 @@ SELECT COUNT ( * ) * + COUNT ( * ) FROM tab2 AS cor0 WHERE NULL NOT IN ( - col2
----
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT 52 ) FROM tab0 AS cor0 WHERE NOT NULL BETWEEN NULL AND NULL
+----
+NULL
query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT col2 + col2 < ( + col2 + 23 )
@@ -34405,10 +34420,13 @@ query III rowsort
SELECT * FROM tab0 WHERE - - 36 * - + 14 * + col1 + - - col1 IN ( col0 + 40 )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5649
SELECT ALL - AVG ( DISTINCT ( - CAST ( NULL AS INTEGER ) ) ) + + COUNT ( * ) FROM tab1
+----
+NULL
query I rowsort
SELECT ALL + col1 * - - 43 * col2 AS col1 FROM tab2
@@ -37350,11 +37368,14 @@ SELECT DISTINCT + col1 - col2 - + 42 + + col1 FROM tab1 AS cor0
-16
-91
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 82
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-6136
SELECT + + 82 AS col2, ( - AVG ( DISTINCT + ( - col0 ) ) ) + + - COUNT ( * ) FROM tab2 AS cor0 WHERE NOT + col0 = NULL
+----
+82
+NULL
query I rowsort label-6137
SELECT - ( - MAX ( ALL - - 12 ) ) AS col2 FROM tab1
@@ -39382,10 +39403,13 @@ SELECT ( COUNT ( * ) ) + - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6470
SELECT DISTINCT + COUNT ( * ) + - AVG ( DISTINCT + col2 ) * 67 FROM tab0 WHERE NOT ( NULL ) IN ( + col2 * - 24 )
+----
+NULL
query I rowsort
SELECT - col2 FROM tab1 WHERE NOT ( 89 ) IS NOT NULL
@@ -51019,10 +51043,13 @@ SELECT ALL 85 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL + AVG ( DISTINCT + - 37 ) FROM tab1 WHERE NULL IS NOT NULL
+----
+NULL
query II rowsort
SELECT - 49, col2 FROM tab2
@@ -52869,10 +52896,13 @@ query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT - 74 NOT IN ( - col0 )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8676
SELECT DISTINCT AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) + - 31 AS col0 FROM tab0
+----
+NULL
query I rowsort label-8677
SELECT ALL + 76 / - COUNT ( * ) AS col2 FROM tab0, tab0 AS cor0
@@ -56432,10 +56462,13 @@ SELECT ALL + - col2 AS col0, + 82 AS col2 FROM tab2 AS cor0
-58
82
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT AVG ( DISTINCT 21 ) AS col2 FROM tab1 AS cor0 WHERE NOT ( NOT NULL BETWEEN + + col2 AND NULL )
+----
+NULL
query I rowsort
SELECT - col2 AS col1 FROM tab1 WHERE - - col2 IS NOT NULL
@@ -58637,10 +58670,13 @@ SELECT - MIN ( - col0 ) AS col1 FROM tab2
----
75
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9634
SELECT - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) / COUNT ( * ) FROM tab0
+----
+NULL
query I rowsort
SELECT col2 * - 75 * - - col1 FROM tab0
diff --git a/data/sqlite/random/aggregates/slt_good_18.slt b/data/sqlite/random/aggregates/slt_good_18.slt
index 946196e..a31fbcb 100644
--- a/data/sqlite/random/aggregates/slt_good_18.slt
+++ b/data/sqlite/random/aggregates/slt_good_18.slt
@@ -17481,10 +17481,10 @@ query I rowsort
SELECT - + 8 AS col2 FROM tab1 AS cor0 WHERE NOT col1 NOT BETWEEN - + col0 + - col0 AND - col0
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -82
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-2898
SELECT DISTINCT CAST ( - AVG ( DISTINCT + + 82 ) AS INTEGER ) FROM tab2 AS cor0
+----
+-82
query II rowsort label-2899
SELECT + ( - - COUNT ( * ) ) AS col1, 67 AS col0 FROM tab1 AS cor0
@@ -38109,10 +38109,13 @@ SELECT col2 + 23 + + 72 FROM tab2
135
153
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT + 96 ) FROM tab0 AS cor0 WHERE NOT ( NULL ) >= + 92
+----
+NULL
query I rowsort
SELECT ALL - col1 * - 64 AS col0 FROM tab0 AS cor0 WHERE NOT ( - col0 ) = ( - 88 )
@@ -58370,10 +58373,13 @@ SELECT - - MAX ( - 10 ) FROM tab1 AS cor0
----
-10
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9633
SELECT - MIN ( CAST ( NULL AS INTEGER ) ) + + + AVG ( DISTINCT - 25 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
+----
+NULL
query I rowsort label-9634
SELECT ALL + 28 * - + COUNT ( * ) AS col2 FROM tab0
diff --git a/data/sqlite/random/aggregates/slt_good_19.slt b/data/sqlite/random/aggregates/slt_good_19.slt
index 85fae8b..3776f07 100644
--- a/data/sqlite/random/aggregates/slt_good_19.slt
+++ b/data/sqlite/random/aggregates/slt_good_19.slt
@@ -1908,10 +1908,13 @@ query III rowsort
SELECT * FROM tab2 WHERE NOT col0 - - - col0 IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-303
SELECT DISTINCT - 62 * - + ( - AVG ( DISTINCT + ( - ( 97 ) ) ) ) * + COUNT ( * ) * - COUNT ( * ) / - MIN ( col2 ) AS col0 FROM tab2 WHERE NOT NULL < - 47
+----
+NULL
query I rowsort label-304
SELECT ALL - - 32 + + COUNT ( * ) / 78 FROM tab2 cor0 WHERE + col0 IS NOT NULL
@@ -4174,10 +4177,10 @@ SELECT ALL - col0 AS col1, col2 FROM tab1
-91
68
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -22
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-679
SELECT ALL + CAST ( - AVG ( DISTINCT - + ( - col1 ) ) AS INTEGER ) FROM tab1
+----
+-22
query I rowsort
SELECT - - 26 * 95 FROM tab2 WHERE NOT NULL <> 59
@@ -16696,10 +16699,13 @@ query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT + ( - - col2 ) * - 74 * + 35 - + col0 NOT BETWEEN + + col0 + + 64 AND NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - + AVG ( DISTINCT - 4 ) FROM tab2 WHERE col1 IS NULL
+----
+NULL
query I rowsort label-2739
SELECT 23 + COUNT ( * ) + - - SUM ( + 36 ) AS col2 FROM tab0
@@ -40549,10 +40555,13 @@ SELECT - COUNT ( DISTINCT - - 96 ) AS col1 FROM tab0 AS cor0
----
-1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6665
SELECT ALL + CAST ( - - COUNT ( DISTINCT + - ( + + col2 ) ) AS INTEGER ) * + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab0 WHERE NOT + - col0 = + col0 + - - col2
+----
+NULL
query II rowsort
SELECT ALL - col0 AS col2, - col2 AS col0 FROM tab1
@@ -49740,10 +49749,13 @@ SELECT DISTINCT * FROM tab1 AS cor0 WHERE NOT CAST ( NULL AS INTEGER ) + 54 IS N
----
9 values hashing to c6c0a4111b36d04dbc811a11e4d54cad
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8191
SELECT - AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) * - MAX ( - col0 ) AS col1 FROM tab1
+----
+NULL
query II rowsort
SELECT col0 AS col1, - 96 FROM tab0
diff --git a/data/sqlite/random/aggregates/slt_good_2.slt b/data/sqlite/random/aggregates/slt_good_2.slt
index f752838..c892935 100644
--- a/data/sqlite/random/aggregates/slt_good_2.slt
+++ b/data/sqlite/random/aggregates/slt_good_2.slt
@@ -11648,11 +11648,14 @@ SELECT ALL ( - + col2 ) + + 83 AS col0 FROM tab0 AS cor0
36
73
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - -27
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]I
+# Datafusion - [Actual ] [R]I
+query RI rowsort label-1920
SELECT AVG ( DISTINCT + 32 ) / + COUNT ( * ) AS col2, - ( + 27 ) FROM tab0 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
+-27
query I rowsort
SELECT + 52 + col0 FROM tab0 AS cor0
@@ -13031,10 +13034,13 @@ SELECT DISTINCT * FROM tab1 WHERE col0 / col1 - 88 * + col1 IS NOT NULL
----
9 values hashing to c6c0a4111b36d04dbc811a11e4d54cad
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2154
SELECT ALL - COUNT ( * ) * - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col2 FROM tab0
+----
+NULL
query I rowsort
SELECT DISTINCT + ( 75 ) * col1 AS col1 FROM tab0 AS cor0
@@ -25577,10 +25583,13 @@ SELECT DISTINCT + col0 + - col2 AS col2, 66 AS col0 FROM tab1 AS cor0
26
66
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4237
SELECT AVG ( DISTINCT + + 96 ) / + 12 - - SUM ( DISTINCT CAST ( NULL AS FLOAT8 ) ) + - COUNT ( DISTINCT + col1 ) col1 FROM tab1 cor0
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - -3
@@ -36728,10 +36737,10 @@ SELECT - 2 * + 19 AS col2 FROM tab1 WHERE - col1 * 14 NOT IN ( - + 95 + + + col1
-38
-38
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 37
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-6096
SELECT - COUNT ( * ) + CAST ( + AVG ( DISTINCT + col2 ) AS INTEGER ) FROM tab2
+----
+37
query I rowsort
SELECT col0 FROM tab1 WHERE - - 21 IS NOT NULL
@@ -48074,10 +48083,13 @@ SELECT col0 * col0 AS col0 FROM tab0 WHERE NULL IS NULL
7569
9409
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7983
SELECT + COUNT ( * ) * 26 + COUNT ( * ) * + ( AVG ( DISTINCT + 22 ) ) AS col2 FROM tab1 WHERE + CAST ( NULL AS FLOAT8 ) IS NOT NULL
+----
+NULL
query I rowsort
SELECT + col1 * col0 - 98 AS col1 FROM tab1
@@ -49060,10 +49072,13 @@ SELECT + 64 * + COUNT ( * ) FROM tab2 WHERE NOT 58 * - - col0 * + col2 IS NULL
----
192
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8155
SELECT ALL - COUNT ( col0 ) + - - AVG ( DISTINCT col1 ) FROM tab2 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort
SELECT DISTINCT 77 + col0 + 76 AS col1 FROM tab0 AS cor0
@@ -49288,10 +49303,13 @@ SELECT * FROM tab0 AS cor0 WHERE 93 NOT BETWEEN + + col2 AND NULL
1
99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8193
SELECT 25 + AVG ( DISTINCT - CAST ( - + 39 AS INTEGER ) ) AS col1 FROM tab1 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort label-8194
SELECT DISTINCT - COUNT ( * ) + + 60 FROM tab1 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_20.slt b/data/sqlite/random/aggregates/slt_good_20.slt
index 208a569..4a00f15 100644
--- a/data/sqlite/random/aggregates/slt_good_20.slt
+++ b/data/sqlite/random/aggregates/slt_good_20.slt
@@ -5006,10 +5006,10 @@ SELECT - MIN ( - - col2 ) FROM tab2 AS cor0
----
-23
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 364
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-811
SELECT + 23 / COUNT ( CAST ( + col0 AS INTEGER ) ) * + CAST ( CAST ( AVG ( DISTINCT + col2 ) AS INTEGER ) AS INTEGER ) AS col2 FROM tab0 cor0 WHERE ( NULL ) IS NULL
+----
+364
query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE ( col2 * + col2 ) IS NOT NULL
@@ -11468,10 +11468,13 @@ query I rowsort
SELECT DISTINCT 42 FROM tab2 WHERE + col0 IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1876
SELECT ALL - AVG ( DISTINCT - 87 ) * + COUNT ( * ) FROM tab2 WHERE - col1 * 76 IS NULL
+----
+NULL
query I rowsort label-1877
SELECT - MAX ( DISTINCT col2 ) * COUNT ( * ) AS col2 FROM tab1
@@ -20427,10 +20430,13 @@ SELECT ALL + ( MAX ( + 10 ) ) FROM tab1
----
10
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + - AVG ( DISTINCT - 1 ) AS col0 FROM tab1 AS cor0 WHERE NOT - ( + + 72 ) + - - 51 - + col1 IS NOT NULL
+----
+NULL
query I rowsort
SELECT ALL ( + - 83 ) FROM tab1 AS cor0
@@ -28775,11 +28781,14 @@ SELECT DISTINCT - - 23 - + 66 AS col0 FROM tab0 AS cor0
----
-43
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 8
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-4708
SELECT 8 AS col0, AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2 AS cor0 WHERE ( NULL ) IS NULL
+----
+8
+NULL
query I rowsort label-4709
SELECT ALL - - ( col0 ) - ( - CAST ( NULL AS INTEGER ) ) * + col0 + col0 + - col0 + + col1 AS col1 FROM tab2 AS cor0
@@ -38982,10 +38991,13 @@ SELECT ALL 45 - - ( - col1 ) AS col2 FROM tab1 AS cor0
31
40
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6396
SELECT ALL + AVG ( DISTINCT col1 ) * 78 + MIN ( + CAST ( NULL AS INTEGER ) ) * - SUM ( ALL - col2 ) AS col2 FROM tab1 AS cor0
+----
+NULL
query III rowsort label-6397
SELECT * FROM tab0 WHERE - 69 + - + ( - - CAST ( NULL AS FLOAT8 ) ) + + col1 IS NOT NULL
@@ -44241,11 +44253,14 @@ SELECT DISTINCT + col1 * - col1, col2 FROM tab1
-25
59
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-7273
SELECT ALL - CAST ( NULL AS INTEGER ) + + COUNT ( + + col2 ) AS col1, 75 * - AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col0 FROM tab1 WHERE NULL IS NULL
+----
+NULL
+NULL
query I rowsort
SELECT + col1 * col2 * - - 25 AS col1 FROM tab2
@@ -50492,10 +50507,13 @@ SELECT DISTINCT - 94 * - col1 + + - col1 col1 FROM tab0
7533
93
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8312
SELECT COUNT ( * ) + AVG ( DISTINCT + col1 ) FROM tab1 WHERE 74 IS NULL
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] [I]
@@ -57178,10 +57196,13 @@ NULL
NULL
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9390
SELECT 46 * - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query II rowsort label-9391
SELECT CAST ( - - ( - - col1 ) AS INTEGER ), 45 col0 FROM tab0 cor0
diff --git a/data/sqlite/random/aggregates/slt_good_21.slt b/data/sqlite/random/aggregates/slt_good_21.slt
index a3654be..15d638a 100644
--- a/data/sqlite/random/aggregates/slt_good_21.slt
+++ b/data/sqlite/random/aggregates/slt_good_21.slt
@@ -6493,10 +6493,13 @@ SELECT ALL + + CAST ( + CAST ( - - 8 AS INTEGER ) AS INTEGER ) AS col2 FROM tab2
8
8
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL + - 34 * AVG ( DISTINCT - 0 ) FROM tab1 AS cor0 WHERE NOT col0 + + col2 <= NULL
+----
+NULL
query I rowsort
SELECT - 32 AS col1 FROM tab0 cor0 WHERE ( NOT - + 67 + col1 > 70 )
@@ -19717,10 +19720,13 @@ SELECT + + ( - - col1 ) * 43 * - + col2 FROM tab2 AS cor0
-167098
-50439
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3256
SELECT + 75 / - AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) * + 50 FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT ( + 48 ) FROM tab0 AS cor0
@@ -21294,10 +21300,13 @@ SELECT COUNT ( * ) * - - MAX ( DISTINCT + + col0 ) AS col0 FROM tab2 AS cor0
----
225
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3511
SELECT + + ( - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) ) FROM tab1 AS cor0
+----
+NULL
query I rowsort label-3512
SELECT + COUNT ( * ) / 48 FROM tab2 cor0
@@ -23408,10 +23417,10 @@ SELECT + + col1, 99 FROM tab0 AS cor0
81
99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 74
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-3864
SELECT CAST ( + AVG ( DISTINCT - - col2 ) AS INTEGER ) FROM tab1 AS cor0
+----
+74
query II rowsort
SELECT DISTINCT - - col0 AS col2, 87 FROM tab1 AS cor0
@@ -27790,10 +27799,10 @@ SELECT DISTINCT + 59 * - col0 - - col1 AS col1 FROM tab0
-5722
-804
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -113
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-4582
SELECT ALL - 73 / + COUNT ( * ) + - CAST ( + AVG ( DISTINCT + ( + 89 ) ) AS INTEGER ) AS col0 FROM tab1
+----
+-113
query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE ( ( + - 69 ) > + col0 + + col1 )
@@ -36418,10 +36427,13 @@ SELECT DISTINCT - 35 + + 59 + + ( - col0 ), + 58 AS col2 FROM tab1 AS cor0
-67
58
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6026
SELECT + AVG ( DISTINCT 2 ) FROM tab1 AS cor0 WHERE 79 IN ( - col2 * - + 3 + - col2 + - col1 + + col2, CAST ( - 89 AS INTEGER ), + + 53, + + 73 )
+----
+NULL
query III rowsort
SELECT DISTINCT * FROM tab0 WHERE - ( - + col1 ) >= + + col2
@@ -50702,10 +50714,13 @@ SELECT * FROM tab0 WHERE + col1 + + ( + ( + ( - - col2 ) ) ) * ( col1 ) * + col1
----
9 values hashing to c4b42765dff94eaaa46040e537fb43b7
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT - AVG ( DISTINCT 11 ) FROM tab1 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort
SELECT ALL - 27 - - col2 FROM tab1 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_22.slt b/data/sqlite/random/aggregates/slt_good_22.slt
index 8b65d23..8952396 100644
--- a/data/sqlite/random/aggregates/slt_good_22.slt
+++ b/data/sqlite/random/aggregates/slt_good_22.slt
@@ -2658,10 +2658,13 @@ query I rowsort label-431
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 WHERE NOT 47 + + col2 IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-432
SELECT DISTINCT + MIN ( - 32 ) - - + AVG ( DISTINCT + 76 ) FROM tab2 AS cor0 WHERE - col0 + + 37 >= NULL
+----
+NULL
query I rowsort
SELECT - col0 FROM tab1 cor0 WHERE NOT NULL = - 58
@@ -9344,10 +9347,13 @@ query I rowsort
SELECT + - 86 * + 94 col0 FROM tab2 AS cor0 WHERE + col1 / - col0 > NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT + - 81 ) FROM tab2 AS cor0 WHERE - col2 + - col2 BETWEEN col2 AND NULL
+----
+NULL
query I rowsort
SELECT ALL - col0 + 43 FROM tab1 cor0
@@ -18555,10 +18561,13 @@ query III rowsort
SELECT * FROM tab1 WHERE NOT NULL < - + 61
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL - ( ( + AVG ( DISTINCT - ( 58 ) ) ) ) FROM tab2 WHERE NOT ( + - col0 ) IS NOT NULL
+----
+NULL
query I rowsort label-3074
SELECT DISTINCT - 40 col1 FROM tab2 WHERE NULL NOT BETWEEN CAST ( NULL AS INTEGER ) AND ( + col0 )
@@ -19708,10 +19717,13 @@ SELECT + + COUNT ( * ) / - ( COUNT ( * ) ) col0 FROM tab2 AS cor0
----
-1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3258
SELECT ALL + + MAX ( DISTINCT + + col0 ) + + 90 + + AVG ( DISTINCT col1 ) AS col1 FROM tab0 WHERE - col2 BETWEEN NULL AND + 55 + - + col2
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - 51
@@ -25993,10 +26005,13 @@ SELECT ALL + COUNT ( ALL - col0 ) AS col2, COUNT ( * ) FROM tab0 AS cor0
3
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4282
SELECT DISTINCT - AVG ( DISTINCT - - CAST ( - 29 AS INTEGER ) ) FROM tab2 AS cor0 WHERE ( NULL ) = ( NULL )
+----
+NULL
query II rowsort
SELECT - col2 + ( - - col1 ) AS col0, + 30 FROM tab0 cor0
@@ -31128,10 +31143,13 @@ query I rowsort
SELECT + + 71 FROM tab1 AS cor0 WHERE NULL < - 92
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5124
SELECT DISTINCT - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) + SUM ( DISTINCT + ( + 25 ) ) col0 FROM tab0 cor0
+----
+NULL
query I rowsort label-5125
SELECT - COUNT ( DISTINCT 56 ) FROM tab0
@@ -36747,10 +36765,13 @@ query I rowsort label-6042
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0 WHERE NOT NULL IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6043
SELECT DISTINCT - COUNT ( * ) * - COUNT ( * ) * - AVG ( DISTINCT + col2 ) FROM tab1 cor0 WHERE NOT NULL IS NULL
+----
+NULL
query II rowsort
SELECT + 32, col0 * col0 AS col0 FROM tab1 AS cor0
@@ -44629,10 +44650,13 @@ SELECT 31 + - SUM ( DISTINCT - col0 ) FROM tab1
----
258
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7341
SELECT AVG ( DISTINCT - - CAST ( NULL AS FLOAT8 ) ) + - + COUNT ( * ) AS col0 FROM tab1
+----
+NULL
query II rowsort
SELECT ALL + 42 + - 50 - + - 94 * 72 col0, col1 AS col1 FROM tab2
@@ -45297,10 +45321,13 @@ SELECT ALL 91 AS col1 FROM tab2, tab0 AS cor0
query error DataFusion error: Schema error: Schema contains qualified field name tab1\.col0 and unqualified field name col0 which would be ambiguous
SELECT col0, + 44 AS col0 FROM tab1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7449
SELECT - MAX ( DISTINCT col1 ) + AVG ( DISTINCT - + ( - - col2 ) ) AS col0 FROM tab2 WHERE NOT 90 * + - col1 <> NULL
+----
+NULL
query I rowsort label-7450
SELECT ( - - COUNT ( * ) ) AS col2 FROM tab0 WHERE NOT ( + col0 ) - - col0 IS NOT NULL
@@ -48182,10 +48209,13 @@ SELECT DISTINCT * FROM tab1 AS cor0 WHERE CAST ( col1 AS INTEGER ) + col1 * + 42
----
9 values hashing to c6c0a4111b36d04dbc811a11e4d54cad
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7921
SELECT MAX ( col1 ) * AVG ( DISTINCT col2 * + CAST ( NULL AS INTEGER ) ) + + 56 AS col1 FROM tab1 AS cor0
+----
+NULL
query I rowsort
SELECT ALL 77 + + col1 AS col0 FROM tab2 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_23.slt b/data/sqlite/random/aggregates/slt_good_23.slt
index 63dbfc7..e382f1c 100644
--- a/data/sqlite/random/aggregates/slt_good_23.slt
+++ b/data/sqlite/random/aggregates/slt_good_23.slt
@@ -6362,10 +6362,13 @@ SELECT DISTINCT col1 + - - col1 + + + 30 AS col1 FROM tab1
40
58
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1056
SELECT DISTINCT AVG ( DISTINCT - 9 ) AS col0 FROM tab1 WHERE + ( CAST ( NULL AS INTEGER ) ) IS NOT NULL
+----
+NULL
query II rowsort
SELECT + col2, 14 FROM tab2 AS cor0
@@ -8162,10 +8165,13 @@ SELECT DISTINCT + COUNT ( * ) + + 0 AS col1 FROM tab2
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1347
SELECT + AVG ( DISTINCT - - col1 ) - - 72 + + CAST ( - SUM ( + - 11 ) AS INTEGER ) / - 21 * 51 AS col1 FROM tab2 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort
SELECT col1 * - 89 FROM tab1 cor0
@@ -8433,11 +8439,14 @@ SELECT + 35 + - - 5 AS col0 FROM tab2 AS cor0
40
40
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - 35
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]I
+# Datafusion - [Actual ] [R]I
+query RI rowsort label-1390
SELECT + CAST ( - - AVG ( DISTINCT + 85 ) AS FLOAT8 ), 35 + COUNT ( * ) AS col1 FROM tab1 AS cor0 WHERE col1 IS NULL
+----
+NULL
+35
query I rowsort
SELECT + - 93 + + + col2 - col1 FROM tab1 cor0
@@ -9122,10 +9131,13 @@ SELECT DISTINCT col1 * - 19 * - + col1, + col0 AS col1, col2 AS col0 FROM tab2
----
9 values hashing to 9e500723d903cbc859485d88979d0574
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1507
SELECT + COUNT ( * ) + AVG ( DISTINCT + col1 ) / - 34 AS col2 FROM tab0 WHERE + - col0 IS NULL
+----
+NULL
query II rowsort
SELECT - 60, - col2 AS col0 FROM tab1
@@ -18702,10 +18714,13 @@ SELECT ALL - col2 * + ( - + col0 ) - + 23 - 76 * + col2 FROM tab1
508
997
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT + 17 ) FROM tab0 WHERE NOT + col1 NOT BETWEEN NULL AND NULL
+----
+NULL
# Datafusion - Types were automatically converted from:
# Datafusion - [Expected] [I]
@@ -18978,10 +18993,13 @@ SELECT COUNT ( ALL - 26 ) FROM tab0
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3141
SELECT DISTINCT AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col2 FROM tab2
+----
+NULL
query II rowsort label-3142
SELECT ALL 21 AS col1, + COUNT ( * ) AS col0 FROM tab1
@@ -23360,10 +23378,13 @@ SELECT + col2 col2, - 0 AS col1 FROM tab2
58
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3866
SELECT - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab0
+----
+NULL
query I rowsort
SELECT ALL + 19 + 66 AS col2 FROM tab0 AS cor0 WHERE NOT - 69 + 57 IN ( + + col1, 25 )
@@ -24312,10 +24333,13 @@ SELECT DISTINCT ( 1 ) FROM tab0
----
1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4021
SELECT ALL - AVG ( DISTINCT 74 ) / COUNT ( * ) AS col2 FROM tab2 WHERE NOT NULL IS NULL
+----
+NULL
query III rowsort
SELECT * FROM tab1 WHERE NOT ( - col2 ) = + col1
@@ -25467,10 +25491,13 @@ SELECT DISTINCT + + col0 + + - 91 - + + 57 * - - 28 * + 85 * - + col1 AS col0 FR
6918615
9089204
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4212
SELECT MIN ( ALL 81 ) * AVG ( DISTINCT + + CAST ( NULL AS FLOAT8 ) ) * - COUNT ( * ) * - COUNT ( * ) FROM tab0 cor0
+----
+NULL
query I rowsort
SELECT ALL - col1 FROM tab1 AS cor0 WHERE + col2 NOT IN ( - + 33 * ( - col2 ) )
@@ -34305,10 +34332,13 @@ SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS c
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5663
SELECT AVG ( DISTINCT + CAST ( NULL AS FLOAT8 ) ) AS col1 FROM tab2
+----
+NULL
query II rowsort label-5664
SELECT DISTINCT - COUNT ( * ) AS col2, ( - + COUNT ( * ) ) * + + 38 + - COUNT ( * ) FROM tab1
diff --git a/data/sqlite/random/aggregates/slt_good_24.slt b/data/sqlite/random/aggregates/slt_good_24.slt
index 5772eac..6881c24 100644
--- a/data/sqlite/random/aggregates/slt_good_24.slt
+++ b/data/sqlite/random/aggregates/slt_good_24.slt
@@ -22845,10 +22845,13 @@ SELECT DISTINCT - 72 + + MIN ( - col0 ) FROM tab1 AS cor0
----
-163
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3772
SELECT + MAX ( DISTINCT + - 78 ) + AVG ( DISTINCT + col0 + + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2 AS cor0
+----
+NULL
query I rowsort label-3773
SELECT DISTINCT ( + COUNT ( * ) ) + - + 43 AS col0 FROM tab2
@@ -23104,10 +23107,13 @@ query I rowsort
SELECT - col1 col0 FROM tab0 cor0 WHERE col0 > + 83 + + col0
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3816
SELECT - AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
+----
+NULL
query III rowsort
SELECT * FROM tab0 AS cor0 WHERE ( NOT ( col0 - + 71 ) <= + col1 )
@@ -34862,10 +34868,10 @@ SELECT ALL 89 * + + 93 FROM tab2 AS cor0
8277
8277
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-5776
SELECT DISTINCT - CAST ( - AVG ( DISTINCT - - col0 ) AS INTEGER ) FROM tab1 AS cor0 WHERE ( - col2 IS NULL )
+----
+NULL
query I rowsort
SELECT ALL - - 63 * - 77 - - 66 - - col2 FROM tab1 AS cor0
@@ -37989,10 +37995,10 @@ SELECT * FROM tab0 AS cor0 WHERE NOT - col2 / + col1 * - 76 IS NULL
----
9 values hashing to c4b42765dff94eaaa46040e537fb43b7
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -16
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-6294
SELECT - - CAST ( AVG ( DISTINCT - 16 ) AS INTEGER ) FROM tab0 AS cor0
+----
+-16
query II rowsort
SELECT DISTINCT + col0, + col1 AS col2 FROM tab0
@@ -39244,10 +39250,13 @@ SELECT - COUNT ( * ) FROM tab2 AS cor0 WHERE NOT col1 / col1 + - 34 + + 18 IS NU
----
-3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT 68 ) AS col1 FROM tab1 AS cor0 WHERE NOT - col2 IS NOT NULL
+----
+NULL
query I rowsort label-6500
SELECT CAST ( NULL AS INTEGER ) + + COUNT ( * ) - - + 65 FROM tab1 AS cor0
@@ -43097,10 +43106,10 @@ SELECT ALL - 31 AS col2 FROM tab2 cor0
-31
-31
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -54
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-7136
SELECT CAST ( - AVG ( DISTINCT 54 ) AS INTEGER ) AS col0 FROM tab2
+----
+-54
query I rowsort label-7137
SELECT ALL + CAST ( - col0 AS INTEGER ) AS col2 FROM tab0
@@ -51675,10 +51684,13 @@ SELECT ALL col0 + col2 + + col1 FROM tab1
161
206
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8561
SELECT DISTINCT - ( AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) ) FROM tab1
+----
+NULL
query II rowsort label-8562
SELECT DISTINCT CAST ( - 27 AS INTEGER ) AS col0, col0 AS col1 FROM tab0
@@ -54379,10 +54391,13 @@ query I rowsort label-9006
SELECT - col1 AS col2 FROM tab1 AS cor0 WHERE + CAST ( + col1 AS INTEGER ) + col2 + CAST ( + col0 AS INTEGER ) < NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9007
SELECT ALL - AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) col2 FROM tab1 AS cor0
+----
+NULL
query I rowsort
SELECT DISTINCT + col0 + + 35 + + - 10 + - + 93 - - col2 * - col1 AS col1 FROM tab0 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_25.slt b/data/sqlite/random/aggregates/slt_good_25.slt
index 2c63169..17a3d02 100644
--- a/data/sqlite/random/aggregates/slt_good_25.slt
+++ b/data/sqlite/random/aggregates/slt_good_25.slt
@@ -14441,10 +14441,13 @@ SELECT DISTINCT ( - 87 ) FROM tab2 AS cor0
----
-87
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2389
SELECT DISTINCT COUNT ( * ) * + AVG ( DISTINCT - - CAST ( NULL AS INTEGER ) ) AS col0 FROM tab0
+----
+NULL
query I rowsort
SELECT ALL - + 99 + - - col2 col0 FROM tab1 AS cor0
@@ -22141,10 +22144,13 @@ SELECT ALL 68 - + col1 / - col0 col0 FROM tab0 AS cor0
68
73
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3665
SELECT DISTINCT - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT DISTINCT + + col1 * col2 - - col0 FROM tab1 cor0
diff --git a/data/sqlite/random/aggregates/slt_good_26.slt b/data/sqlite/random/aggregates/slt_good_26.slt
index 91e497f..8fecdc0 100644
--- a/data/sqlite/random/aggregates/slt_good_26.slt
+++ b/data/sqlite/random/aggregates/slt_good_26.slt
@@ -26684,10 +26684,13 @@ SELECT - - 24 * + 45, + col2 AS col0 FROM tab0 cor0
1080
99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4406
SELECT ALL + - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query II rowsort label-4407
SELECT ALL + col2, col0 / - 46 FROM tab2 AS cor0
@@ -32743,10 +32746,13 @@ SELECT + 71 * + col1 AS col1 FROM tab0
5751
71
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT + 38 ) FROM tab2 WHERE NOT + col2 IS NOT NULL
+----
+NULL
query I rowsort
SELECT DISTINCT - col1 + + - 5 FROM tab1
@@ -42000,10 +42006,13 @@ SELECT 19 * + - COUNT ( * ) AS col2 FROM tab2
----
-57
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT - AVG ( DISTINCT - 21 ) AS col2 FROM tab0 AS cor0 WHERE NOT ( ( + - col2 ) ) NOT BETWEEN col1 AND NULL
+----
+NULL
query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT ( NOT ( NULL BETWEEN NULL AND ( + col2 / - 32 ) ) )
@@ -52751,10 +52760,13 @@ SELECT 81 + + 87 AS col1 FROM tab2
168
168
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8712
SELECT ALL AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) AS col2 FROM tab1 AS cor0
+----
+NULL
query II rowsort
SELECT + 18 + - - ( + - ( 81 ) ), - col1 AS col2 FROM tab0
@@ -59009,10 +59021,13 @@ query I rowsort
SELECT + ( - ( ( + col2 ) ) ) FROM tab1 WHERE - col0 + - 4 > + col1
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9745
SELECT ALL + + COUNT ( * ) / - AVG ( DISTINCT - col2 ) FROM tab2 AS cor0 WHERE NOT ( NULL ) BETWEEN NULL AND NULL
+----
+NULL
query I rowsort
SELECT + 56 - col0 col1 FROM tab0 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_27.slt b/data/sqlite/random/aggregates/slt_good_27.slt
index 0c24926..0151863 100644
--- a/data/sqlite/random/aggregates/slt_good_27.slt
+++ b/data/sqlite/random/aggregates/slt_good_27.slt
@@ -4688,10 +4688,13 @@ SELECT ALL 85 * - col0 * - + col2 AS col0 FROM tab0
73950
816255
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-773
SELECT - COUNT ( * ) * + AVG ( DISTINCT - col1 ) FROM tab2 WHERE - col0 + + 74 < - col0
+----
+NULL
query II rowsort
SELECT + col2 * - 70 * + col2 AS col2, - col2 FROM tab0
@@ -17512,10 +17515,13 @@ SELECT + col1 * + col2 + - col0 FROM tab1 AS cor0
210
3105
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2889
SELECT + + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col2 FROM tab2 AS cor0
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - -14
@@ -20470,10 +20476,13 @@ SELECT * FROM tab2 cor0 WHERE + col2 / - col0 IS NOT NULL
----
9 values hashing to 75c998aa53ac83218cbf2feb962d0a49
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT ( - 71 ) ) col0 FROM tab0 AS cor0 WHERE - col2 IS NULL
+----
+NULL
query I rowsort label-3380
SELECT + col0 * + CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
@@ -22498,11 +22507,14 @@ SELECT * FROM tab2 WHERE 39 + + + col2 * - 22 IS NOT NULL
----
9 values hashing to 75c998aa53ac83218cbf2feb962d0a49
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - 0
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]I
+# Datafusion - [Actual ] [R]I
+query RI rowsort label-3704
SELECT 27 * - AVG ( DISTINCT col2 ) AS col1, COUNT ( * ) FROM tab2 WHERE 34 + + 88 + - col1 = - col0
+----
+NULL
+0
query II rowsort
SELECT DISTINCT 88 - - 15, - col0 + + col0 AS col1 FROM tab2
@@ -25368,10 +25380,13 @@ SELECT + col0 AS col1, col0 AS col2 FROM tab2
75
75
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4186
SELECT DISTINCT - + COUNT ( * ) * - AVG ( DISTINCT 23 ) AS col0 FROM tab2 WHERE col1 - col2 IS NULL
+----
+NULL
query I rowsort label-4187
SELECT DISTINCT COUNT ( * ) + 11 AS col0 FROM tab2
@@ -26605,10 +26620,13 @@ query I rowsort
SELECT + - col0 FROM tab1 WHERE NULL NOT BETWEEN NULL AND + - col1
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4395
SELECT - - AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col0 FROM tab2 AS cor0
+----
+NULL
query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE NOT 79 NOT BETWEEN - col0 AND NULL
@@ -29150,10 +29168,13 @@ SELECT - col1 + + + col0 FROM tab2
-5
8
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4809
SELECT AVG ( DISTINCT + + CAST ( NULL AS INTEGER ) ) AS col2 FROM tab2
+----
+NULL
query I rowsort
SELECT - 81 FROM tab1 AS cor0 WHERE NULL NOT IN ( col1 * + - col0 )
@@ -30092,10 +30113,13 @@ SELECT DISTINCT + 57 + 33 * + col0 + + 29 FROM tab0 cor0
3287
581
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4966
SELECT ALL - + AVG ( DISTINCT + CAST ( NULL AS FLOAT8 ) ) FROM tab1 cor0
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - 58
@@ -32226,10 +32250,13 @@ SELECT DISTINCT - 47, COUNT ( * ) AS col2 FROM tab2 AS cor0
-47
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5318
SELECT AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab1 AS cor0
+----
+NULL
query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT ( NULL ) >= + - col0 * - 20
@@ -33074,10 +33101,13 @@ SELECT - col1 + - + col2 AS col1 FROM tab1 cor0
-115
-64
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5455
SELECT ALL - AVG ( DISTINCT + - CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0
+----
+NULL
query I rowsort label-5456
SELECT - CAST ( + 71 AS INTEGER ) + - 8 FROM tab2
@@ -43578,10 +43608,13 @@ SELECT - 57 AS col1, col2 FROM tab1 cor0
-57
96
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7212
SELECT ( + COUNT ( * ) ) / + - AVG ( DISTINCT + col0 ) FROM tab1 WHERE col2 NOT BETWEEN NULL AND NULL AND NOT ( NULL ) IS NOT NULL
+----
+NULL
query I rowsort label-7213
SELECT + 1 * COUNT ( * ) * - 2 + 97 + - 1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
@@ -48316,10 +48349,10 @@ SELECT DISTINCT 75 + - MAX ( DISTINCT + col2 ) FROM tab0
----
-24
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 195
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-7990
SELECT ALL CAST ( AVG ( DISTINCT col1 ) AS INTEGER ) * + COUNT ( * ) FROM tab2 AS cor0
+----
+195
query I rowsort
SELECT ALL - + ( - + col2 ) - - col0 FROM tab2 cor0
@@ -52075,10 +52108,13 @@ SELECT DISTINCT + 55 * - + 3 AS col2 FROM tab1 WHERE - + col0 IS NOT NULL
----
-165
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8608
SELECT - 81 * - COUNT ( * ) + - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col0 FROM tab2
+----
+NULL
query III rowsort
SELECT * FROM tab0 AS cor0 WHERE - col0 + - - ( + 6 ) * + col0 NOT BETWEEN - + 2 + 19 AND NULL
diff --git a/data/sqlite/random/aggregates/slt_good_28.slt b/data/sqlite/random/aggregates/slt_good_28.slt
index a177cfe..adbd87a 100644
--- a/data/sqlite/random/aggregates/slt_good_28.slt
+++ b/data/sqlite/random/aggregates/slt_good_28.slt
@@ -18385,10 +18385,13 @@ SELECT DISTINCT - 55 + - col0 FROM tab2
-119
-130
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL AVG ( DISTINCT + 78 ) FROM tab1 WHERE NULL IN ( - + col2, 26 )
+----
+NULL
query I rowsort
SELECT DISTINCT ( - - col2 ) * - - col2 * - col1 * - col0 + + - col2 FROM tab2
@@ -23561,10 +23564,13 @@ SELECT ALL ( col1 ) col1 FROM tab2 cor0
67
77
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3870
SELECT COUNT ( DISTINCT CAST ( NULL AS INTEGER ) ) * - + 70 + + AVG ( - CAST ( NULL AS INTEGER ) ) + AVG ( DISTINCT col1 ) col2 FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT DISTINCT 51 AS col2 FROM tab2 AS cor0 WHERE NOT ( 18 * 53 * - 75 + col0 + ( col0 ) * + col1 ) IS NULL
@@ -24919,10 +24925,13 @@ SELECT + col1 * - - 74 FROM tab0 AS cor0
5994
74
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT - - col2 ) FROM tab2 AS cor0 WHERE NOT - col2 IS NOT NULL
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - -3673
@@ -26055,10 +26064,13 @@ query III rowsort
SELECT * FROM tab2 WHERE NOT NULL = 82
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT - 35 ) AS col1 FROM tab1 WHERE NOT - 29 + - 97 <= - col2
+----
+NULL
query I rowsort
SELECT ALL + 98 * ( - 58 ) FROM tab0
@@ -26098,10 +26110,13 @@ SELECT + + COUNT ( * ) * COUNT ( * ) + COUNT ( * ) * 15 FROM tab0 AS cor0
----
54
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4290
SELECT DISTINCT ( AVG ( DISTINCT 82 ) ) - + COUNT ( DISTINCT col0 - 56 / col0 ) AS col0 FROM tab1 cor0 WHERE NOT ( - col2 ) NOT BETWEEN NULL AND ( NULL )
+----
+NULL
query I rowsort label-4291
SELECT DISTINCT - MIN ( + col0 ) AS col0 FROM tab2 AS cor0
@@ -32927,10 +32942,13 @@ NULL
NULL
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5404
SELECT AVG ( DISTINCT - CAST ( CAST ( NULL AS FLOAT8 ) AS INTEGER ) ) + + MAX ( DISTINCT - col2 ) AS col0 FROM tab2 AS cor0
+----
+NULL
query I rowsort label-5405
SELECT DISTINCT + + CAST ( - col0 AS INTEGER ) * + 5 FROM tab1 AS cor0
@@ -47264,11 +47282,14 @@ SELECT DISTINCT - - col1 + 51 * + col1 col1 FROM tab2 AS cor0
3484
4004
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - 0
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]I
+# Datafusion - [Actual ] [R]I
+query RI rowsort label-7771
SELECT ALL + - AVG ( DISTINCT + col2 ) AS col2, + COUNT ( * ) FROM tab2 cor0 WHERE 29 / - 3 IS NULL
+----
+NULL
+0
query I rowsort
SELECT + + 82 + col2 - - col0 AS col2 FROM tab1 AS cor0
@@ -49972,10 +49993,13 @@ SELECT ALL - + SUM ( + ( col0 ) ) col0 FROM tab1 AS cor0
----
-227
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT - - ( ( - + col1 ) ) ) FROM tab1 AS cor0 WHERE NOT NULL IS NULL
+----
+NULL
query I rowsort label-8216
SELECT + col0 + + - ( col2 ) + + + col2 / CAST ( NULL AS INTEGER ) + - col0 * + col0 * - col2 + 62 col0 FROM tab2 AS cor0 WHERE NOT 7 IS NULL
diff --git a/data/sqlite/random/aggregates/slt_good_29.slt b/data/sqlite/random/aggregates/slt_good_29.slt
index ec6818d..717a20e 100644
--- a/data/sqlite/random/aggregates/slt_good_29.slt
+++ b/data/sqlite/random/aggregates/slt_good_29.slt
@@ -12028,10 +12028,13 @@ SELECT ALL AVG ( 42 ) FROM tab1 AS cor0 WHERE NOT col1 IS NOT NULL
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT AVG ( DISTINCT + 96 ) FROM tab0 AS cor0 WHERE NOT col0 * 74 IS NOT NULL
+----
+NULL
query I rowsort label-1990
SELECT + 67 / 66 AS col0 FROM tab0 AS cor0
@@ -18145,10 +18148,13 @@ query I rowsort
SELECT col0 FROM tab0 AS cor0 WHERE ( NULL ) BETWEEN + 91 AND + col2 - - + 10
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT + 83 ) AS col0 FROM tab0 cor0 WHERE - col0 / 38 >= NULL
+----
+NULL
query I rowsort label-2999
SELECT ALL - CAST ( - + col2 AS INTEGER ) + - + col0 / - 55 AS col0 FROM tab0 AS cor0
@@ -35630,10 +35636,13 @@ SELECT ALL + 81 AS col0, + col1 FROM tab0
81
81
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5856
SELECT AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) FROM tab0
+----
+NULL
query I rowsort
SELECT ALL 58 col0 FROM tab0 WHERE - col1 + + + ( col0 ) NOT BETWEEN NULL AND NULL
@@ -45949,10 +45958,13 @@ SELECT * FROM tab0 AS cor0 WHERE NOT + col1 + + col2 IS NULL
----
9 values hashing to c4b42765dff94eaaa46040e537fb43b7
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7559
SELECT ALL - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col0 FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT + col2 * - - 93 FROM tab0 AS cor0
@@ -50221,10 +50233,10 @@ SELECT * FROM tab1 cor0 WHERE NOT ( col0 * col2 ) IS NULL
----
9 values hashing to c6c0a4111b36d04dbc811a11e4d54cad
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 69
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-8268
SELECT CAST ( AVG ( DISTINCT + 69 ) AS INTEGER ) AS col1 FROM tab1 AS cor0
+----
+69
query I rowsort
SELECT - col0 * - col1 * - col2 AS col0 FROM tab2 AS cor0
@@ -51170,10 +51182,13 @@ SELECT ALL + 60 * - 90 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to fa267ac295745fdbd2b5c9b18f522d6a
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8426
SELECT ALL AVG ( DISTINCT - CAST ( NULL AS FLOAT8 ) ) AS col2 FROM tab1
+----
+NULL
query I rowsort label-8427
SELECT ALL - COUNT ( * ) AS col2 FROM tab0 WHERE NULL <> NULL
@@ -55998,10 +56013,13 @@ SELECT DISTINCT + col0 + 88 FROM tab1 WHERE NOT - + col2 IS NULL
173
179
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9225
SELECT - AVG ( DISTINCT - - CAST ( NULL AS FLOAT8 ) ) col2 FROM tab2
+----
+NULL
query I rowsort
SELECT DISTINCT ( + + col2 ) - + + col2 AS col1 FROM tab2 WHERE NOT 57 * - + 0 IS NOT NULL
diff --git a/data/sqlite/random/aggregates/slt_good_3.slt b/data/sqlite/random/aggregates/slt_good_3.slt
index a512b01..28c5fc3 100644
--- a/data/sqlite/random/aggregates/slt_good_3.slt
+++ b/data/sqlite/random/aggregates/slt_good_3.slt
@@ -6434,10 +6434,13 @@ SELECT + col2 * - 92 FROM tab1
-6256
-8832
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1041
SELECT - AVG ( DISTINCT + - CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2 AS cor0
+----
+NULL
query I rowsort label-1042
SELECT - 81 / + + col2 AS col2 FROM tab0 AS cor0
@@ -9929,10 +9932,13 @@ SELECT ALL - 40 col1 FROM tab0 AS cor0
-40
-40
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1613
SELECT DISTINCT - + AVG ( DISTINCT - col2 ) + AVG ( DISTINCT - + CAST ( NULL AS FLOAT8 ) ) AS col0 FROM tab0 AS cor0
+----
+NULL
query I rowsort
SELECT + - 74 FROM tab1 AS cor0 WHERE - col2 BETWEEN col0 AND + col2
@@ -13031,10 +13037,13 @@ SELECT 83 + - col1 FROM tab2
32
6
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2116
SELECT 6 * 67 * + - AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) * - ( + - ( + - COUNT ( * ) ) ) FROM tab2 AS cor0
+----
+NULL
query II rowsort label-2117
SELECT ALL - COUNT ( * ) AS col0, MIN ( DISTINCT + 66 ) AS col2 FROM tab1 AS cor0 WHERE NOT NULL IS NULL
@@ -23958,10 +23967,13 @@ query I rowsort
SELECT ALL - col2 AS col0 FROM tab2 WHERE NOT - + 85 IS NOT NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3927
SELECT ALL + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query II rowsort label-3928
SELECT ALL + 61 + col2 * + - col2, + 60 * - col0 + + col2 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 WHERE 65 IN ( - 33 )
@@ -37580,11 +37592,14 @@ SELECT col1 * - + 77 AS col0 FROM tab1 AS cor0
-3619
-385
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - 3
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]I
+# Datafusion - [Actual ] [R]I
+query RI rowsort label-6168
SELECT - ( - - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) ) AS col2, COUNT ( * ) AS col0 FROM tab2 AS cor0
+----
+NULL
+3
query II rowsort
SELECT DISTINCT + 93 - + col0 + + + col1 * col1 + - - 59 * + - col1 col1, 49 FROM tab0
diff --git a/data/sqlite/random/aggregates/slt_good_30.slt b/data/sqlite/random/aggregates/slt_good_30.slt
index 73c57b7..a3efc42 100644
--- a/data/sqlite/random/aggregates/slt_good_30.slt
+++ b/data/sqlite/random/aggregates/slt_good_30.slt
@@ -4178,10 +4178,13 @@ SELECT - 82 * CAST ( + - col1 AS INTEGER ) FROM tab2 AS cor0
5494
6314
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-672
SELECT ALL + AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) AS col0 FROM tab1 AS cor0
+----
+NULL
query I rowsort label-673
SELECT ALL + SUM ( + CAST ( col1 AS INTEGER ) ) AS col0 FROM tab0
@@ -6718,10 +6721,13 @@ SELECT ALL COUNT ( * ) * - COUNT ( * ) * + 30 AS col0 FROM tab1 AS cor0
----
-270
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1093
SELECT ALL - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) / - COUNT ( * ) AS col0 FROM tab0 AS cor0
+----
+NULL
query I rowsort
SELECT ALL + 66 FROM tab2 AS cor0 WHERE col0 * + + col1 / 29 IS NULL
@@ -16050,10 +16056,13 @@ query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( NULL NOT BETWEEN col1 AND ( NULL ) )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL - + AVG ( DISTINCT - 78 ) FROM tab0 AS cor0 WHERE NOT ( NULL ) <> + col0 * col1 * col2
+----
+NULL
query III rowsort
SELECT * FROM tab1 cor0 WHERE NOT NULL IN ( - col2, col0, + col2 / + col2 + - ( - col1 ) )
@@ -18869,11 +18878,14 @@ SELECT + col2 - + 61 FROM tab1
35
7
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-# Datafusion - Expected - 0
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]I
+# Datafusion - [Actual ] [R]I
+query RI rowsort label-3109
SELECT DISTINCT COUNT ( * ) * + + COUNT ( * ) * + AVG ( DISTINCT col2 ) * - COUNT ( + 39 ) AS col1, COUNT ( * ) AS col2 FROM tab1 AS cor0 WHERE + 64 IS NULL
+----
+NULL
+0
query I rowsort label-3110
SELECT + CAST ( - col1 AS INTEGER ) AS col0 FROM tab1 AS cor0
@@ -24249,10 +24261,13 @@ SELECT CAST ( + - ( - + COUNT ( * ) ) AS INTEGER ) FROM tab2 AS cor0
----
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3994
SELECT ALL + + MAX ( ALL - CAST ( NULL AS INTEGER ) ) + + + ( - AVG ( DISTINCT col0 ) ) col1 FROM tab0 AS cor0
+----
+NULL
query II rowsort
SELECT DISTINCT - col0, - col2 AS col1 FROM tab1 AS cor0
@@ -43279,10 +43294,13 @@ SELECT ALL - col2 * - 66 * + col1 FROM tab2
256476
77418
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7157
SELECT + AVG ( DISTINCT - CAST ( NULL AS FLOAT8 ) ) AS col0 FROM tab0
+----
+NULL
query I rowsort
SELECT - - col1 FROM tab0 AS cor0 WHERE - col2 * 33 * 13 + - 38 IS NOT NULL
@@ -60201,10 +60219,10 @@ SELECT 27 FROM tab0 AS cor0 WHERE NOT NULL IS NOT NULL
27
27
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -90
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-9956
SELECT CAST ( - AVG ( DISTINCT - - 90 ) AS INTEGER ) AS col1 FROM tab1
+----
+-90
query I rowsort
SELECT col2 * - ( - col1 ) AS col0 FROM tab0
diff --git a/data/sqlite/random/aggregates/slt_good_31.slt b/data/sqlite/random/aggregates/slt_good_31.slt
index 9ba802a..b121309 100644
--- a/data/sqlite/random/aggregates/slt_good_31.slt
+++ b/data/sqlite/random/aggregates/slt_good_31.slt
@@ -29577,10 +29577,13 @@ SELECT + 12, COUNT ( * ) AS col1 FROM tab1
12
3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4867
SELECT + AVG ( DISTINCT - CAST ( NULL AS FLOAT8 ) ) FROM tab0
+----
+NULL
query I rowsort label-4868
SELECT DISTINCT - ( + - CAST ( - COUNT ( * ) AS INTEGER ) ) FROM tab2
@@ -33322,10 +33325,13 @@ SELECT ALL 21 + + 23 AS col0 FROM tab1
44
44
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5485
SELECT + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) * CAST ( + SUM ( ( col1 ) ) AS INTEGER ) * - 99 FROM tab0 AS cor0
+----
+NULL
query I rowsort label-5486
SELECT DISTINCT - 49 - - + COUNT ( * ) FROM tab2 AS cor0
@@ -38114,10 +38120,13 @@ query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT col1 + + + col1 <> NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6263
SELECT + + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query III rowsort label-6264
SELECT ALL * FROM tab1 AS cor0 WHERE + col1 + CAST ( NULL AS INTEGER ) IS NULL
@@ -41657,10 +41666,13 @@ SELECT ALL ( - 42 ) AS col2 FROM tab0 AS cor0
query error DataFusion error: Error during planning: Projections require unique expression names but the expression "tab0\.col0 AS col1" at position 0 and "\(\- tab0\.col2\) \* tab0\.col1 AS col1" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\.
SELECT DISTINCT + col0 AS col1, - col2 * + col1 AS col1 FROM tab0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6853
SELECT - COUNT ( * ) + - - 22 + AVG ( DISTINCT + 5 ) * + MAX ( DISTINCT CAST ( NULL AS INTEGER ) ) - 5 - 8 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
+----
+NULL
query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT + 61 * - + 63 IS NOT NULL
@@ -44181,11 +44193,14 @@ query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( - + col1 / 26 ) IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 18
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-7275
SELECT DISTINCT 18, - ( - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) ) AS col1 FROM tab1
+----
+18
+NULL
query I rowsort label-7276
SELECT DISTINCT COUNT ( DISTINCT CAST ( NULL AS INTEGER ) ) AS col1 FROM tab1
@@ -44338,10 +44353,13 @@ SELECT - 68 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5febf382d36d6e0191889c41b928786f
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7301
SELECT DISTINCT - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) - - + COUNT ( * ) * + - 85 - 60 AS col0 FROM tab2
+----
+NULL
query IIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab2 AS cor1 WHERE NOT + 73 IS NULL
@@ -54375,10 +54393,13 @@ query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT NULL BETWEEN + 82 AND col1
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8946
SELECT + COUNT ( * ) + AVG ( DISTINCT col2 ) AS col1 FROM tab0 AS cor0 WHERE NOT ( - CAST ( NULL AS INTEGER ) ) IN ( col2 * + col0 )
+----
+NULL
query I rowsort
SELECT - 86 / col0 FROM tab0 AS cor0 WHERE NOT - ( - ( + 74 ) ) / 34 IS NOT NULL
diff --git a/data/sqlite/random/aggregates/slt_good_32.slt b/data/sqlite/random/aggregates/slt_good_32.slt
index 00b86fa..5e38a44 100644
--- a/data/sqlite/random/aggregates/slt_good_32.slt
+++ b/data/sqlite/random/aggregates/slt_good_32.slt
@@ -11244,10 +11244,13 @@ SELECT DISTINCT - COUNT ( * ) * MIN ( + 18 ) FROM tab1 AS cor0
----
-54
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + AVG ( DISTINCT - - col0 ) FROM tab1 AS cor0 WHERE ( NULL ) IS NOT NULL
+----
+NULL
query I rowsort
SELECT 32 * - 26 FROM tab2
@@ -16513,10 +16516,13 @@ SELECT ALL - 8 + - COUNT ( * ) FROM tab2 AS cor0
----
-11
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2720
SELECT + COUNT ( * ) * - AVG ( DISTINCT - - col2 ) + SUM ( + - 40 ) FROM tab1 AS cor0 WHERE NULL <= CAST ( - - col2 AS INTEGER ) + - + col0
+----
+NULL
query I rowsort
SELECT - col2 + + + 14 AS col2 FROM tab1 AS cor0
diff --git a/data/sqlite/random/aggregates/slt_good_33.slt b/data/sqlite/random/aggregates/slt_good_33.slt
index 9c2be80..e501dc2 100644
--- a/data/sqlite/random/aggregates/slt_good_33.slt
+++ b/data/sqlite/random/aggregates/slt_good_33.slt
@@ -3461,10 +3461,13 @@ SELECT ALL + 72 + - 90 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-585
SELECT AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) col1 FROM tab2
+----
+NULL
query I rowsort label-586
SELECT ALL + COUNT ( * ) FROM tab1 WHERE ( - 91 ) IS NULL
@@ -7296,10 +7299,13 @@ SELECT - 12, + col1 AS col1 FROM tab0 cor0
-12
81
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT 4 ) AS col1 FROM tab0 AS cor0 WHERE NOT col2 NOT BETWEEN NULL AND NULL
+----
+NULL
query II rowsort label-1226
SELECT + MAX ( DISTINCT - + ( col2 ) ) AS col2, 42 - + 89 AS col0 FROM tab2 AS cor0
@@ -16417,10 +16423,13 @@ SELECT DISTINCT * FROM tab1 AS cor0 WHERE NOT ( + 5 ) IS NULL
----
9 values hashing to c6c0a4111b36d04dbc811a11e4d54cad
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2737
SELECT + COUNT ( * ) + AVG ( DISTINCT col1 + + col1 ) FROM tab1 cor0 WHERE NOT ( NULL ) IS NULL
+----
+NULL
query I rowsort label-2738
SELECT 67 * ( COUNT ( * ) ) AS col0 FROM tab1 AS cor0 WHERE NOT + 66 IS NULL
@@ -21616,10 +21625,13 @@ SELECT ALL + ( + 50 ) FROM tab2
50
50
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3594
SELECT - AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) FROM tab1
+----
+NULL
query I rowsort label-3595
SELECT 60 * COUNT ( * ) + - ( 73 ) FROM tab2
@@ -21779,10 +21791,13 @@ SELECT ALL + + COUNT ( * ) * - 72 AS col0 FROM tab0 cor0
----
-216
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3624
SELECT DISTINCT - AVG ( DISTINCT + 65 ) FROM tab1 WHERE NULL BETWEEN ( + CAST ( - col2 AS INTEGER ) + col2 ) AND ( col1 ) * col2
+----
+NULL
query I rowsort
SELECT + 34 * 69 AS col2 FROM tab1
@@ -21938,10 +21953,13 @@ SELECT col0 * CAST ( + 53 AS INTEGER ) * + col2 AS col0 FROM tab0
46110
508959
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( DISTINCT - - col2 ) FROM tab1 WHERE NULL > NULL
+----
+NULL
query I rowsort
SELECT + 87 * - 68 AS col0 FROM tab2
@@ -23108,11 +23126,14 @@ SELECT + col2 * - + 36 * + 87 AS col0 FROM tab1 AS cor0
-212976
-300672
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 0
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-3845
SELECT DISTINCT ( COUNT ( * ) ), - AVG ( DISTINCT col2 ) col0 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND - col2 + - 39
+----
+0
+NULL
query I rowsort label-3846
SELECT ALL + CAST ( - - col0 AS INTEGER ) FROM tab1 AS cor0
@@ -27772,10 +27793,13 @@ NULL
NULL
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL AVG ( DISTINCT 67 ) - - 51 AS col1 FROM tab1 WHERE NOT NULL >= ( NULL )
+----
+NULL
query I rowsort label-4624
SELECT ALL - col1 / - 69 FROM tab1
@@ -29236,10 +29260,10 @@ SELECT ALL + 65 + + 6 AS col1 FROM tab1
71
71
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 11760
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-4852
SELECT DISTINCT - CAST ( AVG ( DISTINCT CAST ( col2 AS FLOAT8 ) ) AS INTEGER ) * - + COUNT ( * ) * 98 col1 FROM tab2
+----
+11760
query I rowsort
SELECT ( + + 21 ) + ( + - col0 ) AS col2 FROM tab1 AS cor0
@@ -34394,10 +34418,13 @@ SELECT ALL + - SUM ( ALL + + col2 ) AS col0 FROM tab2 WHERE col0 IS NULL
----
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5709
SELECT DISTINCT AVG ( DISTINCT + + col2 ) * + - MAX ( DISTINCT - CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0
+----
+NULL
query I rowsort
SELECT ALL + - col0 AS col2 FROM tab0 AS cor0 WHERE 9 IS NULL
@@ -54543,10 +54570,10 @@ SELECT COUNT ( DISTINCT col1 ) * - COUNT ( * ) AS col0 FROM tab1 AS cor0
----
-9
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -77
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-9044
SELECT + CAST ( - + AVG ( DISTINCT + 77 ) AS INTEGER ) FROM tab1
+----
+-77
query I rowsort
SELECT 45 * + - col2 FROM tab0
@@ -59903,10 +59930,13 @@ SELECT + col0 col2, col0 FROM tab1
91
91
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT + + AVG ( DISTINCT - + 54 ) FROM tab0 WHERE NOT NULL BETWEEN 22 AND NULL
+----
+NULL
query III rowsort
SELECT * FROM tab0 WHERE NOT + + 89 IS NOT NULL
diff --git a/data/sqlite/random/aggregates/slt_good_34.slt b/data/sqlite/random/aggregates/slt_good_34.slt
index 837e076..fdf392c 100644
--- a/data/sqlite/random/aggregates/slt_good_34.slt
+++ b/data/sqlite/random/aggregates/slt_good_34.slt
@@ -20562,10 +20562,13 @@ query I rowsort
SELECT + 36 FROM tab1 AS cor0 WHERE NOT + col0 + + col0 <> NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL AVG ( DISTINCT + - 9 ) FROM tab0 AS cor0 WHERE NULL IS NOT NULL
+----
+NULL
query I rowsort label-3395
SELECT - SUM ( - CAST ( NULL AS INTEGER ) ) * + 36 AS col1 FROM tab1 AS cor0
@@ -22158,11 +22161,14 @@ SELECT ALL - col2 AS col1, col1 + col1 AS col2 FROM tab0
-99
2
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 3
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort label-3662
SELECT COUNT ( * ) AS col0, + 43 + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) + 44 * - SUM ( DISTINCT - 33 ) FROM tab1
+----
+3
+NULL
query III rowsort
SELECT * FROM tab1 cor0 WHERE NOT col1 * + col1 IS NULL
@@ -23560,10 +23566,13 @@ SELECT ALL 10 / + - 75 FROM tab2
0
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3897
SELECT ALL MAX ( DISTINCT col1 ) / - AVG ( DISTINCT - 14 ) FROM tab1 WHERE NOT + CAST ( NULL AS INTEGER ) + + + 57 * + + col2 + - col0 < ( NULL )
+----
+NULL
query I rowsort
SELECT 6 FROM tab0 WHERE NOT - + ( - col2 ) IS NULL
@@ -32792,10 +32801,13 @@ SELECT DISTINCT 31 + - + COUNT ( * ) AS col1 FROM tab0
----
28
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL - AVG ( DISTINCT 76 ) AS col2 FROM tab2 WHERE NOT NULL IS NULL
+----
+NULL
query I rowsort label-5437
SELECT COUNT ( * ) FROM tab0 AS cor0 CROSS JOIN tab1 cor1 WHERE NOT ( NOT ( NULL IS NOT NULL ) )
@@ -48659,10 +48671,13 @@ NULL
NULL
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT ALL + AVG ( DISTINCT - 89 ) FROM tab1 AS cor0 WHERE ( 4 * col1 ) IS NULL
+----
+NULL
query III rowsort
SELECT * FROM tab2 AS cor0 WHERE ( + 70 * + col2 ) IS NOT NULL
diff --git a/data/sqlite/random/aggregates/slt_good_35.slt b/data/sqlite/random/aggregates/slt_good_35.slt
index 0e361df..16bd55c 100644
--- a/data/sqlite/random/aggregates/slt_good_35.slt
+++ b/data/sqlite/random/aggregates/slt_good_35.slt
@@ -13764,10 +13764,13 @@ SELECT ALL - CAST ( + col0 AS INTEGER ) + + 82 FROM tab0 AS cor0
-5
67
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2299
SELECT ALL + AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) AS col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
+----
+NULL
query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab1 AS cor0 WHERE ( NULL ) IS NULL
@@ -17939,10 +17942,13 @@ query III rowsort
SELECT ALL * FROM tab2 WHERE ( 2 ) BETWEEN + col0 AND ( + 41 )
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( DISTINCT - 83 ) AS col2 FROM tab1 WHERE - + col2 >= ( + col2 + - 58 )
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - 104
@@ -50782,10 +50788,13 @@ SELECT col2 * + - col1 FROM tab0 AS cor0
-3807
-99
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8460
SELECT + AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col1 FROM tab1 AS cor0
+----
+NULL
query I rowsort
SELECT - ( - col1 ) * 7 * - col2 * - col2 AS col2 FROM tab1
@@ -52850,10 +52859,13 @@ SELECT DISTINCT - 95 * + col1 + col1 col2 FROM tab2
-6298
-7238
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT ( AVG ( DISTINCT 30 ) ) col0 FROM tab0 WHERE NULL NOT IN ( + 20 )
+----
+NULL
query I rowsort label-8804
SELECT COUNT ( * ) AS col2 FROM tab0 WHERE ( NULL ) NOT BETWEEN NULL AND - col0
diff --git a/data/sqlite/random/aggregates/slt_good_36.slt b/data/sqlite/random/aggregates/slt_good_36.slt
index 5c0d94c..f8f8c23 100644
--- a/data/sqlite/random/aggregates/slt_good_36.slt
+++ b/data/sqlite/random/aggregates/slt_good_36.slt
@@ -3528,10 +3528,13 @@ SELECT DISTINCT col2 * - - 49 + + + col0 FROM tab0 AS cor0
4948
577
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-573
SELECT - AVG ( DISTINCT + + CAST ( NULL AS INTEGER ) ) AS col2 FROM tab2
+----
+NULL
query I rowsort label-574
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - col1 AS col2 FROM tab0
@@ -40549,10 +40552,13 @@ SELECT DISTINCT + COUNT ( * ) + + 46 * 31 AS col2 FROM tab2
----
1429
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6726
SELECT DISTINCT COUNT ( * ) * - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) + - 70 * - 91 FROM tab0 WHERE NOT ( NULL ) IS NULL
+----
+NULL
query I rowsort
SELECT DISTINCT col1 + + 69 AS col2 FROM tab2 AS cor0
@@ -42753,10 +42759,13 @@ query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE col1 * - col2 IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-7087
SELECT + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT DISTINCT col2 + + 16 FROM tab0
diff --git a/data/sqlite/random/aggregates/slt_good_37.slt b/data/sqlite/random/aggregates/slt_good_37.slt
index cab8193..6630a6b 100644
--- a/data/sqlite/random/aggregates/slt_good_37.slt
+++ b/data/sqlite/random/aggregates/slt_good_37.slt
@@ -3446,10 +3446,13 @@ NULL
NULL
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( DISTINCT - 4 ) AS col2 FROM tab0 AS cor0 WHERE NULL BETWEEN + col2 AND NULL
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - 14
@@ -24291,10 +24294,13 @@ query I rowsort
SELECT DISTINCT - ( col2 ) * - col1 FROM tab0 AS cor0 WHERE + col0 IS NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4024
SELECT DISTINCT + + AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) FROM tab0 cor0
+----
+NULL
query I rowsort
SELECT DISTINCT + 22 * + col1 FROM tab2
@@ -24705,10 +24711,13 @@ query III rowsort
SELECT * FROM tab2 cor0 WHERE NOT ( NULL ) NOT BETWEEN - col0 + 21 AND + + 66
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT - AVG ( DISTINCT 66 ) AS col1 FROM tab0 AS cor0 WHERE NOT - col2 NOT IN ( + + col2 * - + col2 + + + 22 )
+----
+NULL
query III rowsort
SELECT * FROM tab2 WHERE NOT - 24 + + col1 IS NULL
@@ -28294,10 +28303,13 @@ SELECT DISTINCT + ( + col0 ) * col1 AS col2 FROM tab2
4928
5025
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4697
SELECT ALL + AVG ( DISTINCT + CAST ( NULL AS INTEGER ) ) col0 FROM tab1 AS cor0
+----
+NULL
query I rowsort label-4698
SELECT - 53 / - MAX ( col2 ) AS col2 FROM tab2 AS cor0
@@ -30001,10 +30013,13 @@ SELECT DISTINCT + col2 + col1 FROM tab2 WHERE + 0 IS NOT NULL
125
74
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4975
SELECT ALL - AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) FROM tab2
+----
+NULL
query III rowsort
SELECT * FROM tab0 WHERE NOT 66 <> 81 * col2
@@ -39053,10 +39068,13 @@ NULL
NULL
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6481
SELECT ALL AVG ( DISTINCT 79 ) AS col1 FROM tab1 AS cor0 WHERE ( NULL ) > col1 / - CAST ( NULL AS INTEGER ) / col1 + - 17
+----
+NULL
query I rowsort
SELECT ALL - - col2 + + 90 * - col2 FROM tab0 AS cor0
@@ -60388,10 +60406,13 @@ SELECT ALL CAST ( + + col2 AS INTEGER ) col0 FROM tab2
40
58
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9992
SELECT ALL AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) + - 77 + - COUNT ( ALL + col0 ) * - + MIN ( DISTINCT + col1 ) * ( + COUNT ( * ) ) AS col1 FROM tab1
+----
+NULL
query I rowsort
SELECT - 71 + + + 74 FROM tab1
diff --git a/data/sqlite/random/aggregates/slt_good_38.slt b/data/sqlite/random/aggregates/slt_good_38.slt
index c6a4ba9..ed644b4 100644
--- a/data/sqlite/random/aggregates/slt_good_38.slt
+++ b/data/sqlite/random/aggregates/slt_good_38.slt
@@ -1700,10 +1700,13 @@ query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( + col2 ) > NULL
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-276
SELECT ALL AVG ( DISTINCT CAST ( NULL AS FLOAT8 ) ) FROM tab1
+----
+NULL
query III rowsort
SELECT * FROM tab2 WHERE - col0 >= + col1 - col2
@@ -13859,11 +13862,14 @@ query I rowsort
SELECT - col2 AS col1 FROM tab2 AS cor0 WHERE NOT NULL >= col2
----
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - 1
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] I[I]
+# Datafusion - [Actual ] I[R]
+query IR rowsort
SELECT ALL 1, - AVG ( DISTINCT 89 ) AS col0 FROM tab2 AS cor0 WHERE NOT NULL IS NULL
+----
+1
+NULL
query I rowsort
SELECT ALL col2 * - + 62 AS col1 FROM tab1 AS cor0
@@ -39495,10 +39501,13 @@ SELECT col2 / - - col0 AS col2 FROM tab2
0
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + - AVG ( DISTINCT + 23 ) FROM tab2 WHERE NOT NULL IS NULL
+----
+NULL
query III rowsort
SELECT ALL * FROM tab2 WHERE NOT - col1 <> NULL
@@ -45932,10 +45941,13 @@ SELECT - + COUNT ( ALL + col2 ) AS col0 FROM tab1 AS cor0
----
-3
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT - AVG ( DISTINCT + 95 ) AS col1 FROM tab1 AS cor0 WHERE col0 IS NULL
+----
+NULL
query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE - 29 IS NOT NULL
@@ -52396,10 +52408,13 @@ SELECT DISTINCT - + CAST ( + + ( - + col1 ) AS INTEGER ) FROM tab2 AS cor0
67
77
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT DISTINCT + AVG ( DISTINCT - 34 ) FROM tab1 AS cor0 WHERE + 16 <= ( 94 / + + col1 + - col0 )
+----
+NULL
query I rowsort
SELECT ALL - col1 FROM tab2 WHERE NOT NULL IS NOT NULL
@@ -53059,10 +53074,13 @@ SELECT - COUNT ( * ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 WHERE NOT ( NULL
----
0
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8788
SELECT ALL 46 + - SUM ( - col2 ) + - COUNT ( * ) * + AVG ( DISTINCT + col1 ) FROM tab0 AS cor0 WHERE ( NULL ) = - + col2
+----
+NULL
query I rowsort label-8789
SELECT - col2 / ( - col2 ) FROM tab2 cor0
diff --git a/data/sqlite/random/aggregates/slt_good_39.slt b/data/sqlite/random/aggregates/slt_good_39.slt
index d1b69aa..1b17ba6 100644
--- a/data/sqlite/random/aggregates/slt_good_39.slt
+++ b/data/sqlite/random/aggregates/slt_good_39.slt
@@ -1876,10 +1876,10 @@ SELECT DISTINCT + MAX ( - + col0 ) FROM tab2
----
-46
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -98
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query I rowsort label-314
SELECT DISTINCT + CAST ( - AVG ( DISTINCT + 98 ) AS INTEGER ) AS col2 FROM tab2
+----
+-98
query II rowsort label-315
SELECT ALL MAX ( DISTINCT + 33 ) AS col1, - 71 AS col0 FROM tab2
@@ -20661,10 +20661,13 @@ SELECT DISTINCT col2 / 50 AS col0 FROM tab1 WHERE NOT + col0 <= ( + col0 * - 56
----
1
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-3388
SELECT MIN ( DISTINCT col2 ) + 37 / AVG ( DISTINCT col2 * - 54 ) AS col0 FROM tab2 AS cor0 WHERE col2 + - 30 IS NULL
+----
+NULL
query I rowsort
SELECT ALL 20 * - 48 + + col1 AS col0 FROM tab2 AS cor0
@@ -30602,10 +30605,13 @@ SELECT - ( col2 ) / - col2 AS col1, - 84 AS col0 FROM tab0 cor0
1
-84
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-5014
SELECT - ( AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) ) FROM tab2 AS cor0
+----
+NULL
query II rowsort
SELECT col0, ( + col0 ) AS col2 FROM tab0
@@ -34751,10 +34757,13 @@ SELECT DISTINCT + - ( + - 68 ) FROM tab2 cor0
----
68
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort
SELECT AVG ( DISTINCT + - 81 ) FROM tab1 AS cor0 WHERE + col1 > NULL
+----
+NULL
query I rowsort
SELECT DISTINCT - 16 + - + col0 + - col1 FROM tab1 AS cor0
@@ -53246,10 +53255,13 @@ SELECT ALL - 76, - ( - - col1 ) AS col0 FROM tab0
-76
-81
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-8736
SELECT ALL AVG ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS col2 FROM tab2
+----
+NULL
query I rowsort
SELECT ALL + col0 + - col0 * + 49 AS col1 FROM tab1
@@ -55116,10 +55128,13 @@ SELECT * FROM tab1 cor0 CROSS JOIN tab2 AS cor1 WHERE NOT ( NULL ) IS NOT NULL
----
54 values hashing to c419dc2a653bccd84f7a2da103315187
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-9042
SELECT COUNT ( * ) * + AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) + - - 67 FROM tab2 AS cor0
+----
+NULL
# Datafusion - Datafusion expected results:
# Datafusion - Expected - 705
diff --git a/data/sqlite/random/aggregates/slt_good_4.slt b/data/sqlite/random/aggregates/slt_good_4.slt
index 8256df9..1726e19 100644
--- a/data/sqlite/random/aggregates/slt_good_4.slt
+++ b/data/sqlite/random/aggregates/slt_good_4.slt
@@ -1537,10 +1537,13 @@ SELECT ALL ( 28 ) col2 FROM tab2 AS cor0
28
28
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-240
SELECT + COUNT ( DISTINCT col1 ) + AVG ( DISTINCT + 63 ) * - 17 col0 FROM tab2 cor0 WHERE NOT col0 + - col2 IS NOT NULL
+----
+NULL
query I rowsort label-241
SELECT + COUNT ( ALL 48 ) AS col1 FROM tab2 AS cor0
@@ -8702,10 +8705,13 @@ NULL
NULL
NULL
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-1406
SELECT DISTINCT + AVG ( DISTINCT - + CAST ( NULL AS INTEGER ) ) FROM tab2
+----
+NULL
query I rowsort
SELECT + 43 FROM tab0 AS cor0 WHERE NOT NULL IS NULL
@@ -12677,10 +12683,13 @@ SELECT 96 * - COUNT ( * ) AS col0 FROM tab1
----
-288
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2067
SELECT + AVG ( DISTINCT col2 ) + - COUNT ( * ) FROM tab1 WHERE NULL NOT IN ( col1 )
+----
+NULL
query I rowsort label-2068
SELECT ALL - ( 93 ) FROM tab0 WHERE NOT ( col0 * + CAST ( + col0 AS INTEGER ) + 47 ) IS NOT NULL
@@ -13325,11 +13334,11 @@ SELECT * FROM tab2 WHERE NOT ( - col0 ) IN ( + col1, ( - col2 ), + 52 )
----
9 values hashing to 75c998aa53ac83218cbf2feb962d0a49
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - -1628
-# Datafusion - Expected - 3
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+query II rowsort label-2172
SELECT ALL + CAST ( - - AVG ( DISTINCT col2 ) AS INTEGER ) * - 22 AS col1, + COUNT ( * ) AS col0 FROM tab1
+----
+-1628
+3
query I rowsort label-2173
SELECT ALL + COUNT ( * ) + + 33 FROM tab2 WHERE NOT NULL < + + col1 - + - 58
@@ -18241,10 +18250,13 @@ SELECT col0 + - 57 FROM tab0
30
40
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-2982
SELECT ALL ( - 8 ) + AVG ( + 91 ) * - AVG ( DISTINCT 7 ) col2 FROM tab2 WHERE NOT NULL BETWEEN + 50 - + col0 + 63 AND 50 * col0 + + CAST ( + col0 AS INTEGER )
+----
+NULL
query I rowsort
SELECT DISTINCT + col0 * col2 * + col1 FROM tab1
@@ -27981,10 +27993,13 @@ SELECT ALL + + 99 + - col2 FROM tab0 AS cor0
52
89
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-4571
SELECT DISTINCT + + AVG ( DISTINCT + ( + CAST ( NULL AS INTEGER ) ) ) FROM tab2 AS cor0
+----
+NULL
query I rowsort
SELECT - 8 + + col0 AS col2 FROM tab0 AS cor0
@@ -37483,10 +37498,13 @@ SELECT DISTINCT - - 87 FROM tab1 cor0
----
87
-# Datafusion - Datafusion expected results:
-# Datafusion - Expected - NULL
-query error DataFusion error: Execution error: avg\(DISTINCT\) aggregations are not available
+# Datafusion - Types were automatically converted from:
+# Datafusion - [Expected] [I]
+# Datafusion - [Actual ] [R]
+query R rowsort label-6164
SELECT AVG ( DISTINCT CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0
+----
+NULL
query I rowsort label-6165
SELECT ALL + MIN ( ALL col0 ) FROM tab0 AS cor0
@@ -38343,10 +38361,13 @@ SELECT ( col1 ) * - + col2 AS col2 FROM tab1
... 75860 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org