Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX : Ensure that BETWEEN expression related SQLite tests are not skipped #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

getChan
Copy link

@getChan getChan commented Jan 5, 2025

apache/datafusion#13976 will be fixed by apache/datafusion#14007

As a result, make changes to ensure that related SQLite tests are not skipped.


After changes, the following 83 test failures occurred.

[SQL] SELECT * FROM tab0 cor0 WHERE NULL BETWEEN NULL AND 76 + + 37 + 25
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_13.slt:8827

External error: query columns mismatch:
[SQL] SELECT DISTINCT + col1 * + col3 AS col5 FROM tab0 AS cor0 WHERE NOT ( NULL ) BETWEEN NULL AND - + col0 * + 95
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_10.slt:917

External error: query columns mismatch:
[SQL] SELECT ALL * FROM tab0 AS cor0 WHERE NULL BETWEEN NULL AND - 20
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_14.slt:2582

External error: query columns mismatch:
[SQL] SELECT ALL * FROM tab0 AS cor0 WHERE NULL NOT BETWEEN NULL AND + ( - col3 ) + - 75
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_11.slt:3717

External error: query columns mismatch:
[SQL] SELECT ALL * FROM tab0 cor0 WHERE NOT ( NULL BETWEEN NULL AND - 38 )
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_5.slt:627

External error: query columns mismatch:
[SQL] SELECT ALL col5 AS col5 FROM tab0 WHERE NULL NOT BETWEEN NULL AND + 47 + - - col0
[Expected] [I]
[Actual  ] [T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_12.slt:6937

External error: query columns mismatch:
[SQL] SELECT ALL * FROM tab0 WHERE NULL BETWEEN NULL AND + 76
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_4.slt:3422

External error: query columns mismatch:
[SQL] SELECT * FROM tab0 cor0 WHERE ( NOT NULL BETWEEN ( NULL ) AND 6 )
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_3.slt:1212

External error: query columns mismatch:
[SQL] SELECT * FROM tab0 WHERE NULL BETWEEN NULL AND - - 81 * ( col3 )
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_2.slt:1792

External error: query columns mismatch:
[SQL] SELECT * FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND + - 21
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_7.slt:6712

External error: query columns mismatch:
[SQL] SELECT + + col3 * - + ( + col4 ) AS col3 FROM tab0 AS cor0 WHERE ( NOT NULL BETWEEN NULL AND 39 )
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_1.slt:917

External error: query columns mismatch:
[SQL] SELECT * FROM tab0 cor0 WHERE NOT NULL NOT BETWEEN NULL AND - 51
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_9.slt:532

External error: query columns mismatch:
[SQL] SELECT ALL * FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND - - 2
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_6.slt:15137

External error: query columns mismatch:
[SQL] SELECT * FROM tab0 AS cor0 WHERE NULL NOT BETWEEN NULL AND - 82
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_0.slt:11032

External error: query columns mismatch:
[SQL] SELECT + col1 + + 44 FROM tab0 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND - 3
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/index/random/10/slt_good_8.slt:8712

External error: query columns mismatch:
[SQL] SELECT * FROM tab0 WHERE NULL NOT BETWEEN NULL AND - - 30
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/100/slt_good_1.slt:4012

External error: query columns mismatch:
[SQL] SELECT - col1 * - col0 FROM tab0 AS cor0 WHERE NULL NOT BETWEEN NULL AND - col3 + - 86
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/index/random/100/slt_good_0.slt:14402

External error: query columns mismatch:
[SQL] SELECT - col1 * - col0 FROM tab0 AS cor0 WHERE NULL NOT BETWEEN NULL AND - col3 + - 86
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/index/random/1000/slt_good_5.slt:9367

External error: query columns mismatch:
[SQL] SELECT + col4 AS col1 FROM tab0 WHERE NULL NOT BETWEEN NULL AND - + 2
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/index/random/1000/slt_good_7.slt:10117

External error: query columns mismatch:
[SQL] SELECT ALL + 55 * + CAST ( NULL AS REAL ) AS col1 FROM tab2 cor0 WHERE NOT NULL BETWEEN ( NULL ) AND - - 35 + + - col2 + - - col2
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_13.slt:16667

External error: query columns mismatch:
[SQL] SELECT * FROM tab0 AS cor0 WHERE NOT NULL NOT BETWEEN ( NULL ) AND 83
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/1000/slt_good_8.slt:6717

External error: query columns mismatch:
[SQL] SELECT * FROM tab0 AS cor0 WHERE NULL NOT BETWEEN ( NULL ) AND 38
[Expected] III[I][I][I][I]
[Actual  ] II[R][T]I[R][T]
at ../../datafusion-testing/data/sqlite/index/random/1000/slt_good_6.slt:13492

External error: query columns mismatch:
[SQL] SELECT DISTINCT - - AVG ( + + CAST ( NULL AS INTEGER ) ) AS col0, 22 AS col1 FROM tab0 WHERE NULL NOT BETWEEN ( NULL ) AND + 12 / col0 + col2
[Expected] [I]I
[Actual  ] [R]I
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_10.slt:26069

External error: query columns mismatch:
[SQL] SELECT ALL CAST ( NULL AS REAL ) + + col1 FROM tab2 cor0 WHERE NOT NULL NOT BETWEEN NULL AND ( + 62 )
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_39.slt:48438

External error: query columns mismatch:
[SQL] SELECT DISTINCT ( AVG ( - + 9 ) ) AS col0 FROM tab0 WHERE NOT NULL BETWEEN ( NULL ) AND - - 59 * + col1 * 49 AND ( + col1 ) IS NOT NULL
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_70.slt:40347

External error: query columns mismatch:
[SQL] SELECT 7 + AVG ( 15 ) AS col2 FROM tab0 WHERE NOT NULL NOT BETWEEN ( NULL ) AND + 3
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_109.slt:45339

External error: query columns mismatch:
[SQL] SELECT ALL ( ( AVG ( 62 ) ) ) * MIN ( DISTINCT col2 ) FROM tab1 WHERE ( NULL ) BETWEEN ( NULL ) AND 50
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_65.slt:2729

External error: query columns mismatch:
[SQL] SELECT + CAST ( col0 AS REAL ) * - 51 * 82 FROM tab2 AS cor0 WHERE NOT NULL BETWEEN NULL AND + col0 + + ( 51 )
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_73.slt:31617

External error: query columns mismatch:
[SQL] SELECT + CAST ( NULL AS REAL ) FROM tab2 AS cor0 WHERE NOT NULL IS NOT NULL OR NOT NULL BETWEEN NULL AND ( + + col0 * - col1 + 38 + + - col0 * - 51 * - ( + + col2 ) )
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_122.slt:16342

External error: query failed: DataFusion error: Execution error: avg(DISTINCT) aggregations are not available
[SQL] SELECT - AVG ( DISTINCT - - col1 ) AS col2, 4 FROM tab2 WHERE NULL BETWEEN NULL AND - col2 * 43
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_99.slt:11153

External error: query columns mismatch:
[SQL] SELECT AVG ( col0 ) + - 46 FROM tab2 AS cor0 WHERE NULL BETWEEN NULL AND ( - 32 )
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_6.slt:57250

External error: query columns mismatch:
[SQL] SELECT DISTINCT col1 - + CAST ( + 14 + 79 AS REAL ) AS col0 FROM tab0 WHERE NOT ( NULL ) BETWEEN ( NULL ) AND 47
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_62.slt:7042

External error: query columns mismatch:
[SQL] SELECT DISTINCT - ( + AVG ( + col2 ) ) FROM tab0 WHERE ( NULL ) BETWEEN NULL AND + col1 + + 45
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_7.slt:18337

External error: query columns mismatch:
[SQL] SELECT ALL + AVG ( ALL + col1 ) FROM tab0 AS cor0 WHERE NULL NOT BETWEEN NULL AND + 33
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_2.slt:23129

External error: query columns mismatch:
[SQL] SELECT AVG ( - 81 ) FROM tab0 AS cor0 WHERE NOT ( NULL ) NOT BETWEEN NULL AND 30
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_75.slt:39108

External error: query columns mismatch:
[SQL] SELECT DISTINCT AVG ( DISTINCT - col2 ) + - - ( 94 ) AS col0 FROM tab0 AS cor0 WHERE ( NULL ) NOT BETWEEN NULL AND - 13
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_118.slt:2094

External error: query columns mismatch:
[SQL] SELECT AVG ( - + ( col1 ) ) FROM tab1 WHERE NULL BETWEEN NULL AND - col0 + - 5
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_60.slt:32011

External error: query failed: DataFusion error: External error: Arrow error: Divide by zero error
[SQL] SELECT + - COUNT ( ALL col0 ) * COUNT ( * ) AS col1 FROM tab2 AS cor0 WHERE NOT NULL BETWEEN NULL AND - col1 / + - ( + 0 )
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_124.slt:58772

External error: query failed: DataFusion error: Execution error: avg(DISTINCT) aggregations are not available
[SQL] SELECT ( + AVG ( DISTINCT col1 ) ) - - COUNT ( - col0 ) FROM tab1 WHERE ( NULL ) NOT BETWEEN ( NULL ) AND ( + 79 )
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_48.slt:47351

External error: query columns mismatch:
[SQL] SELECT + SUM ( - - CAST ( NULL AS REAL ) ) FROM tab2 WHERE NULL NOT BETWEEN NULL AND + 95
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_114.slt:32748

External error: query columns mismatch:
[SQL] SELECT - + ( CAST ( NULL AS REAL ) ) FROM tab0 AS cor0 WHERE NULL BETWEEN NULL AND ( - + 6 ) + - - col1
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_115.slt:25456

External error: query columns mismatch:
[SQL] SELECT + AVG ( col1 ) col1 FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN NULL AND ( + 28 )
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_50.slt:395

External error: query columns mismatch:
[SQL] SELECT + 33 * + col1 AS col2, col2 * + CAST ( - col0 AS REAL ) AS col0 FROM tab2 AS cor0 WHERE NULL BETWEEN NULL AND + 25
[Expected] I[I]
[Actual  ] I[R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_78.slt:45258

External error: query result mismatch:
[SQL] SELECT DISTINCT + col2 * + col2 * - col2 * col2 * + col2 / + col2 + col0 AS col2 FROM tab0
[Diff] (-expected|+actual)
    -4879666
-   -96059504
+   -9292487
    -9913
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_102.slt:15279

External error: query columns mismatch:
[SQL] SELECT + 43 / AVG ( ALL - + col1 ) AS col2 FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND + col2 - - 45
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_47.slt:5703

External error: query columns mismatch:
[SQL] SELECT + ( + CAST ( NULL AS REAL ) ) AS col2 FROM tab1 AS cor0 WHERE NULL NOT BETWEEN NULL AND + col0 - + 54 * + 70
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_43.slt:28947

External error: query columns mismatch:
[SQL] SELECT + 73 * + - 1, + AVG ( ALL + + col0 ) AS col2 FROM tab2 AS cor0 WHERE NULL NOT BETWEEN NULL AND col1 + - + 39
[Expected] I[I]
[Actual  ] I[R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_53.slt:39983

External error: query columns mismatch:
[SQL] SELECT + col0 / + + ( + CAST ( + col1 AS REAL ) ) AS col2 FROM tab2 AS cor0 WHERE NULL BETWEEN ( NULL ) AND - + ( - col0 ) * + + 84 + - col1
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_106.slt:17426

External error: query result mismatch:
[SQL] SELECT col2 * + + col0 * col2 * col0 * + - col2 / - + col2 AS col0 FROM tab0 AS cor0
[Diff] (-expected|+actual)
    497025
-   756900
-   92217609
+   5450592
+   756900
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_112.slt:22917

External error: query columns mismatch:
[SQL] SELECT DISTINCT - + AVG ( + col2 ) col1 FROM tab2 WHERE NULL NOT BETWEEN NULL AND col1 * + ( - 64 ) + - + ( 75 )
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_105.slt:33665

External error: query columns mismatch:
[SQL] SELECT AVG ( DISTINCT col1 ) FROM tab2 AS cor0 WHERE NOT NULL BETWEEN NULL AND ( 44 * col2 )
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_55.slt:7747

External error: query columns mismatch:
[SQL] SELECT ALL - + AVG ( + col1 ) FROM tab0 AS cor0 WHERE NOT NULL BETWEEN NULL AND - col0 * CAST ( NULL AS INTEGER ) + + 53 * + + col0
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_25.slt:4003

External error: query columns mismatch:
[SQL] SELECT DISTINCT - + COUNT ( * ) + - + CAST ( NULL AS REAL ) FROM tab2 WHERE ( NULL BETWEEN NULL AND + col0 * + - col1 * + col1 + - - col2 - 29 )
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_32.slt:27743

External error: query failed: DataFusion error: Execution error: avg(DISTINCT) aggregations are not available
[SQL] SELECT DISTINCT ( COUNT ( * ) ), - AVG ( DISTINCT col2 ) col0 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND - col2 + - 39
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_33.slt:23322

External error: query columns mismatch:
[SQL] SELECT + ( + AVG ( - - 8 ) ) + - 61 - - + 68 AS col2 FROM tab1 AS cor0 WHERE NULL NOT BETWEEN NULL AND col0 + + 52
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_31.slt:20652

External error: query columns mismatch:
[SQL] SELECT + CAST ( - 70 AS INTEGER ) * - AVG ( 84 ) AS col1 FROM tab1 AS cor0 WHERE ( NULL ) BETWEEN NULL AND + 80
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_21.slt:13688

External error: query columns mismatch:
[SQL] SELECT ALL AVG ( ALL + col2 ) - COUNT ( * ) FROM tab1 AS cor0 WHERE NOT NULL BETWEEN NULL AND ( 68 )
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_37.slt:39396

External error: query columns mismatch:
[SQL] SELECT + AVG ( col1 ) / COUNT ( * ) FROM tab2 AS cor0 WHERE NULL NOT BETWEEN ( NULL ) AND - 13 + + col1
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_22.slt:21207

External error: query columns mismatch:
[SQL] SELECT DISTINCT + AVG ( DISTINCT - col2 ) FROM tab0 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND + 0
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/aggregates/slt_good_23.slt:32574

External error: query result mismatch:
[SQL] SELECT - NULLIF ( + 15, - 27 + + CAST ( NULL AS REAL ) + + + MIN ( 35 ) * - COUNT ( * ) * - 14 + 64 ) * 87 * + 75 * 34 * + 76 + - - 31 AS col0, - 10 * - + 33 * ( + - NULLIF ( 21, + 70 * + 71 ) ) * - 15
[Diff] (-expected|+actual)
-   -252908969
-   103950
+   -252908960 103950
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_11.slt:9790

External error: query failed: DataFusion error: Internal error: predicate did not evaluate to an array.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
[SQL] SELECT ALL ( - CASE WHEN NOT NULL NOT BETWEEN NULL AND - 67 THEN - - SUM ( ALL + 29 ) END ) * 13 - 8 AS col2
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_12.slt:37932

External error: query columns mismatch:
[SQL] SELECT ALL + CASE WHEN NULL BETWEEN NULL AND ( 17 ) THEN 4 * + + NULLIF ( - + COUNT ( * ), - 57 ) + + 54 + + 51 * - + 17 * + AVG ( ALL + 45 ) * 41 END / 86
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_70.slt:20014

External error: query failed: DataFusion error: Execution error: avg(DISTINCT) aggregations are not available
[SQL] SELECT ALL - ( - COALESCE ( - + 25, - 20 ) ) / CASE WHEN NULL BETWEEN ( NULL ) AND 66 AND ( 32 ) = ( 37 * - ( + - CASE + - MIN ( DISTINCT - 67 ) WHEN + ( + - 38 ) * - 14 THEN NULL WHEN 25 + CASE 62 + AVG ( DISTINCT 48 ) WHEN + 62 THEN ( + 10 ) END THEN NULL ELSE - 44 END ) ) THEN COUNT ( * ) * 6 - 79 / + 29 END - 26 AS col2
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_64.slt:36424

External error: query result mismatch:
[SQL] SELECT + COUNT ( * ) * + NULLIF ( 58, - CAST ( NULL AS REAL ) - + 34 ) / 51 + 89
[Diff] (-expected|+actual)
-   90
+   90.13725
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_59.slt:16207

External error: query columns mismatch:
[SQL] SELECT DISTINCT - 26 * AVG ( + 85 ) + + 79 * + CASE WHEN NULL NOT BETWEEN NULL AND - 46 + - COUNT ( * ) * 79 THEN - 7 ELSE NULL END
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_109.slt:25292

External error: query columns mismatch:
[SQL] SELECT + + COUNT ( * ) * CASE CAST ( NULL AS INTEGER ) WHEN 65 THEN + - 50 END - + 19 + 62 + - - 81 / + 28 * + ( + MIN ( DISTINCT + 70 ) ) + + - CASE COUNT ( * ) WHEN + ( - + COUNT ( * ) ) / - AVG ( + 52 ) + + 99 - - - 22 + - NULLIF ( - COUNT ( * ), 54 * + 61 ) * 26 * 65 THEN + CAST ( 17 AS REAL ) + 4 * + 81 WHEN + CASE WHEN NOT NULL NOT BETWEEN NULL AND CASE + MIN ( + 28 ) WHEN COUNT ( * ) THEN NULL ELSE 66 * 18 + + 51 END THEN + 92 END THEN NULL ELSE AVG ( 73 ) END / COUNT ( * ) + 77 AS col1
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_67.slt:20066

External error: query result mismatch:
[SQL] SELECT DISTINCT - 88 / + COALESCE ( - 9, MAX ( DISTINCT + + 36 ), + NULLIF ( + ( - + 19 ), + CAST ( + 54 AS REAL ) ) ) + + 74 * 58 AS col1
[Diff] (-expected|+actual)
-   4301
+   4301.778
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_4.slt:33795

External error: query result mismatch:
[SQL] SELECT ALL + + 84 * + - COUNT ( * ) * - - COALESCE ( + 37, + 14 ) * - NULLIF ( CASE + + COUNT ( * ) WHEN 54 THEN NULL ELSE + 91 + + - 60 * - 23 END, ( + CAST ( + 96 AS REAL ) ) ) * + 14 col2
[Diff] (-expected|+actual)
-   64006152
+   64006150
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_66.slt:982

External error: query result mismatch:
[SQL] SELECT - NULLIF ( + + 4, NULLIF ( + 28, - NULLIF ( + - NULLIF ( + CAST ( - 8 AS REAL ), + CASE - + 27 WHEN - COUNT ( * ) THEN NULL ELSE - CAST ( NULL AS INTEGER ) * 16 END ), - + 33 ) + 81 ) * 95 + + 81 ) / - + MAX ( ALL CAST ( + 21 AS INTEGER ) ) + + 48 - - - COALESCE ( - 35, COUNT ( * ) + 16 ) + + - 30 * - 5 * CAST ( + 75 AS INTEGER ) * - - 71
[Diff] (-expected|+actual)
-   798833
+   798833.2
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_7.slt:15192

External error: query columns mismatch:
[SQL] SELECT ALL + + CASE WHEN NOT - 90 > NULL THEN - + COALESCE ( COALESCE ( 40, 89 * 57 + 53, 54 + + 20 - - 40 * NULLIF ( + 71, + COALESCE ( + 21, - 30 ) ), + 17 ), + AVG ( - 91 ) ) WHEN NULL NOT BETWEEN NULL AND 67 THEN COUNT ( * ) * + 94 - + 90 * + 56 ELSE NULL END AS col2
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_77.slt:8086

External error: query result mismatch:
[SQL] SELECT 79 * - + 85 + + COALESCE ( - 41, + 5 ) + - 12 + NULLIF ( + 85, + - ( 84 ) + - 97 * - CAST ( + COUNT ( * ) AS REAL ) ) / - 21
[Diff] (-expected|+actual)
-   -6772
+   -6772.048
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_45.slt:6191

External error: query result mismatch:
[SQL] SELECT - ( 74 ) * 62 + - 75 * + - 12 * + 68 * - + COUNT ( DISTINCT + 7 ) * 52 * + + COALESCE ( - + SUM ( ALL - 67 ), - 94 - - - NULLIF ( - 75, CAST ( NULL AS REAL ) * - CASE WHEN NULL IS NULL THEN 88 END + - COUNT ( * ) ), ( CASE + 18 WHEN 37 THEN NULL WHEN + 98 THEN NULL WHEN 13 THEN NULL ELSE 13 * 45 END ) * - 19 ) col1
[Diff] (-expected|+actual)
-   -213225388
+   -213225390
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_86.slt:34180

External error: query columns mismatch:
[SQL] SELECT ALL + 56 - 12 + + CAST ( NULL AS INTEGER ) - - CASE + 67 WHEN - 22 / + COALESCE ( + - 30, - 7, 31 * - 50 / + - 60 * + 91, + - 31 ) THEN + + 23 ELSE + CAST ( NULL AS INTEGER ) * + + 95 END * + CASE WHEN NOT NULL BETWEEN ( NULL ) AND 72 THEN 91 END * 82 - NULLIF ( - 64, - - AVG ( + 97 ) ) * + 78 * - 27 AS col2
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_50.slt:46945

External error: query columns mismatch:
[SQL] SELECT ALL - - CASE - + 48 WHEN 6 THEN - + 37 - + 9 WHEN - 10 / - 17 THEN 36 END + AVG ( ALL + CAST ( NULL AS INTEGER ) ) * COUNT ( + + 13 ) * + CASE WHEN NOT ( NULL ) < NULL THEN - + 59 ELSE NULL END, ( 45 ) / - 2 + CASE WHEN NULL BETWEEN NULL AND 62 THEN - COUNT ( * ) END
[Expected] [I]I
[Actual  ] [R]I
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_116.slt:42201

External error: query result mismatch:
[SQL] SELECT + 99 * NULLIF ( 86, - CASE WHEN NOT COUNT ( * ) BETWEEN 84 AND 54 THEN NULLIF ( - 59, COUNT ( * ) ) + CAST ( NULL AS REAL ) END ) / 48 + 27 * COALESCE ( + 76 * 67, 96 * 80 + 38, 13 * COUNT ( * ) )
[Diff] (-expected|+actual)
-   137661
+   137661.38
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_47.slt:10707

External error: query columns mismatch:
[SQL] SELECT DISTINCT + CASE + 93 WHEN CASE 88 WHEN COUNT ( - 14 ) * + 39 THEN - 36 END THEN AVG ( ( + + CAST ( + - 94 AS INTEGER ) ) ) * - CASE WHEN NULL NOT BETWEEN NULL AND 59 AND NOT 16 * - 30 NOT BETWEEN 17 + - 31 * - MIN ( 60 ) AND + 90 + - 71 THEN 27 ELSE - 1 END WHEN - 78 THEN NULL WHEN + 47 THEN NULL ELSE NULL END + 72
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_94.slt:19541

External error: query result mismatch:
[SQL] SELECT - 48 * + - 91 + - 7 + - + COUNT ( * ) / + COALESCE ( ( - 98 ), - COALESCE ( - - CAST ( - + 18 AS INTEGER ), + 91 ) * - COUNT ( * ) * + - CASE + 2 WHEN 75 * + CAST ( + 68 AS INTEGER ) THEN 35 WHEN 34 THEN - COUNT ( * ) * - 7 END * NULLIF ( + 17, CAST ( - 36 AS REAL ) ) + 29, 91 )
[Diff] (-expected|+actual)
-   4361
+   4361.0103
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_106.slt:31933

External error: query result mismatch:
[SQL] SELECT DISTINCT - ( 43 ) * 42 + - + NULLIF ( + 90, - 49 - + CAST ( - - 99 AS REAL ) ) / - + 7, 35 + + 55 AS col1
[Diff] (-expected|+actual)
-   -1794
-   90
+   -1793.1428 90
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_42.slt:12794

External error: query columns mismatch:
[SQL] SELECT - AVG ( + + 75 ) + ( + CASE 83 WHEN ( - CAST ( NULL AS INTEGER ) ) * - CASE CASE WHEN NULL BETWEEN NULL AND 39 THEN 69 * + 23 + + 18 END WHEN 38 + + COUNT ( * ) * CAST ( NULL AS INTEGER ) THEN - 86 WHEN 65 + + ( COUNT ( * ) - 88 ) * 87 THEN NULL END THEN NULL WHEN ( 25 ) * 29 THEN 72 ELSE NULL END ) AS col2
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_9.slt:16965

External error: query columns mismatch:
[SQL] SELECT ALL NULLIF ( 5, + COUNT ( * ) - + 46 ) * ( - 36 ) * - 88 + + CASE + + ( + 96 ) WHEN - 58 * + NULLIF ( - 43, CASE WHEN NULL BETWEEN ( NULL ) AND 53 THEN NULLIF ( + + AVG ( ALL 5 ), ( CASE - - 39 WHEN + 93 THEN NULL WHEN + CAST ( + ( + - 0 ) AS INTEGER ) THEN - COUNT ( * ) * - - 81 * - 7 ELSE NULL END ) * - 18 ) ELSE NULL END - 99 - 82 - - 80 + + 27 + - 72 + + + 62 ) THEN NULL ELSE + - CASE CASE + - 13 WHEN + - ( 87 ) THEN + - 86 * - 19 + + - MAX ( ALL 10 ) / - 67 + - 31 * - COUNT ( * ) WHEN 1 * COALESCE ( + 41 * + 90, SUM ( ALL 52 ) - 4 ) THEN NULL ELSE 74 END WHEN 21 - + 87 THEN + 3 * 20 WHEN 99 THEN NULL ELSE NULL END * + AVG ( ALL - ( + 57 ) ) END
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_40.slt:10585

External error: query result mismatch:
[SQL] SELECT COUNT ( * ) / NULLIF ( ( - 28 ), + + COUNT ( * ) * + + 58 + + + 4 + + + 13 * - CASE - 34 WHEN - - ( NULLIF ( + COUNT ( * ), - 30 - - 80 ) ) THEN 65 + 21 / 84 + + 12 * - CAST ( NULL AS REAL ) WHEN MIN ( DISTINCT 99 ) + - COUNT ( * ) THEN CASE - - 57 WHEN + 51 + - 55 * - 76 THEN + 6 END ELSE 86 / + 60 + - 86 END ) * 51 * + - 67 * - 86 + - 94
[Diff] (-expected|+actual)
-   -94
+   -10589.072
at ../../datafusion-testing/data/sqlite/random/expr/slt_good_83.slt:23969

External error: query failed: DataFusion error: External error: External error: Arrow error: Divide by zero error
[SQL] SELECT - 78 / - col1 * - 70 * + ( col1 ) * + CAST ( NULL AS INTEGER ) / 40 + + 28 AS col0 FROM tab0 AS cor0 GROUP BY col1, col0, col1 HAVING NULL BETWEEN NULL AND + 29 / + col1 * NULLIF ( col0, + 83 ) + + col1
at ../../datafusion-testing/data/sqlite/random/groupby/slt_good_12.slt:14408

External error: query columns mismatch:
[SQL] SELECT ALL + + AVG ( DISTINCT col2 ) AS col0 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT ( NULL ) NOT BETWEEN ( NULL ) AND 29
[Expected] [I]
[Actual  ] [R]
at ../../datafusion-testing/data/sqlite/random/groupby/slt_good_11.slt:27303

Error: Execution("83 failures")
error: test failed, to rerun pass `-p datafusion-sqllogictest --test sqllogictests`

@getChan getChan changed the title fix Incorrect NULL handling in BETWEEN expression fix : related SQLite tests are not skipped. Jan 5, 2025
@getChan getChan changed the title fix : related SQLite tests are not skipped. fix : BETWEEN expr related SQLite tests are not skipped. Jan 5, 2025
@getChan getChan changed the title fix : BETWEEN expr related SQLite tests are not skipped. Fix : BETWEEN expr related SQLite tests are not skipped. Jan 5, 2025
@getChan getChan changed the title Fix : BETWEEN expr related SQLite tests are not skipped. FIX : Ensure that BETWEEN expression related SQLite tests are not skipped Jan 5, 2025
@Omega359
Copy link
Contributor

Omega359 commented Jan 5, 2025

Note that I can regenerate the .slt files for things like this up until the point where we are making manual changes (for example, changing the result values).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants