From 70e7e6288d19aafcb632f493dffe49267464dab8 Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Thu, 28 Nov 2024 10:39:02 +0100 Subject: [PATCH] More rigorous treatment of floats in tests --- Cargo.toml | 1 - datafusion/core/Cargo.toml | 1 - datafusion/sqllogictest/Cargo.toml | 5 +- .../sqllogictest/src/engines/conversion.rs | 107 +- .../sqllogictest/test_files/aggregate.slt | 320 +++--- .../test_files/aggregate_skip_partial.slt | 50 +- datafusion/sqllogictest/test_files/array.slt | 24 +- .../sqllogictest/test_files/clickbench.slt | 2 +- datafusion/sqllogictest/test_files/ddl.slt | 12 +- .../sqllogictest/test_files/decimal.slt | 172 ++-- .../sqllogictest/test_files/distinct_on.slt | 6 +- datafusion/sqllogictest/test_files/expr.slt | 8 +- .../sqllogictest/test_files/functions.slt | 14 +- datafusion/sqllogictest/test_files/group.slt | 80 +- datafusion/sqllogictest/test_files/join.slt | 4 +- datafusion/sqllogictest/test_files/math.slt | 10 +- .../sqllogictest/test_files/options.slt | 4 +- datafusion/sqllogictest/test_files/order.slt | 2 +- .../test_files/pg_compat/pg_compat_simple.slt | 232 ++--- .../test_files/pg_compat/pg_compat_window.slt | 915 ++++++++++-------- .../sqllogictest/test_files/predicates.slt | 4 +- .../sqllogictest/test_files/projection.slt | 10 +- datafusion/sqllogictest/test_files/scalar.slt | 68 +- datafusion/sqllogictest/test_files/select.slt | 30 +- datafusion/sqllogictest/test_files/topk.slt | 21 +- .../sqllogictest/test_files/wildcard.slt | 60 +- datafusion/sqllogictest/test_files/window.slt | 72 +- 27 files changed, 1141 insertions(+), 1093 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 93af308ff0414..4c5e41c0bcb47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,7 +92,6 @@ arrow-ipc = { version = "53.3.0", default-features = false, features = [ arrow-ord = { version = "53.3.0", default-features = false } arrow-schema = { version = "53.3.0", default-features = false } async-trait = "0.1.73" -bigdecimal = "0.4.6" bytes = "1.4" chrono = { version = "0.4.38", default-features = false } ctor = "0.2.0" diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml index fc7b96cf9e137..3d23faaaab78d 100644 --- a/datafusion/core/Cargo.toml +++ b/datafusion/core/Cargo.toml @@ -146,7 +146,6 @@ rand = { workspace = true, features = ["small_rng"] } rand_distr = "0.4.3" regex = { workspace = true } rstest = { workspace = true } -rust_decimal = { version = "1.27.0", features = ["tokio-pg"] } serde_json = { workspace = true } test-utils = { path = "../../test-utils" } tokio = { workspace = true, features = ["rt-multi-thread", "parking_lot", "fs"] } diff --git a/datafusion/sqllogictest/Cargo.toml b/datafusion/sqllogictest/Cargo.toml index ed2b9c49715e3..3725acb032f38 100644 --- a/datafusion/sqllogictest/Cargo.toml +++ b/datafusion/sqllogictest/Cargo.toml @@ -36,7 +36,6 @@ path = "src/lib.rs" [dependencies] arrow = { workspace = true } async-trait = { workspace = true } -bigdecimal = { workspace = true } bytes = { workspace = true, optional = true } chrono = { workspace = true, optional = true } clap = { version = "4.5.16", features = ["derive", "env"] } @@ -50,7 +49,8 @@ log = { workspace = true } object_store = { workspace = true } postgres-protocol = { version = "0.6.4", optional = true } postgres-types = { version = "0.2.4", optional = true } -rust_decimal = { version = "1.27.0" } +rust_decimal = { version = "1.27.0", features = ["tokio-pg"], optional = true } +ryu = "1.0.18" sqllogictest = "0.23.0" sqlparser = { workspace = true } tempfile = { workspace = true } @@ -66,6 +66,7 @@ postgres = [ "tokio-postgres", "postgres-types", "postgres-protocol", + "rust_decimal", ] [dev-dependencies] diff --git a/datafusion/sqllogictest/src/engines/conversion.rs b/datafusion/sqllogictest/src/engines/conversion.rs index 8d2fd1e6d0f2f..6583f4f7d0f14 100644 --- a/datafusion/sqllogictest/src/engines/conversion.rs +++ b/datafusion/sqllogictest/src/engines/conversion.rs @@ -16,9 +16,7 @@ // under the License. use arrow::datatypes::{i256, Decimal128Type, Decimal256Type, DecimalType}; -use bigdecimal::BigDecimal; use half::f16; -use rust_decimal::prelude::*; /// Represents a constant for NULL string in your database. pub const NULL_STR: &str = "NULL"; @@ -40,17 +38,7 @@ pub(crate) fn varchar_to_str(value: &str) -> String { } pub(crate) fn f16_to_str(value: f16) -> String { - if value.is_nan() { - // The sign of NaN can be different depending on platform. - // So the string representation of NaN ignores the sign. - "NaN".to_string() - } else if value == f16::INFINITY { - "Infinity".to_string() - } else if value == f16::NEG_INFINITY { - "-Infinity".to_string() - } else { - big_decimal_to_str(BigDecimal::from_str(&value.to_string()).unwrap()) - } + f32_to_str(value.to_f32()) } pub(crate) fn f32_to_str(value: f32) -> String { @@ -63,7 +51,7 @@ pub(crate) fn f32_to_str(value: f32) -> String { } else if value == f32::NEG_INFINITY { "-Infinity".to_string() } else { - big_decimal_to_str(BigDecimal::from_str(&value.to_string()).unwrap()) + trim_decimal_trailing_zeros(ryu::Buffer::new().format(value).to_string()) } } @@ -77,94 +65,33 @@ pub(crate) fn f64_to_str(value: f64) -> String { } else if value == f64::NEG_INFINITY { "-Infinity".to_string() } else { - big_decimal_to_str(BigDecimal::from_str(&value.to_string()).unwrap()) + trim_decimal_trailing_zeros(ryu::Buffer::new().format(value).to_string()) } } pub(crate) fn i128_to_str(value: i128, precision: &u8, scale: &i8) -> String { - big_decimal_to_str( - BigDecimal::from_str(&Decimal128Type::format_decimal(value, *precision, *scale)) - .unwrap(), - ) + trim_decimal_trailing_zeros(Decimal128Type::format_decimal(value, *precision, *scale)) } pub(crate) fn i256_to_str(value: i256, precision: &u8, scale: &i8) -> String { - big_decimal_to_str( - BigDecimal::from_str(&Decimal256Type::format_decimal(value, *precision, *scale)) - .unwrap(), - ) + trim_decimal_trailing_zeros(Decimal256Type::format_decimal(value, *precision, *scale)) } #[cfg(feature = "postgres")] -pub(crate) fn decimal_to_str(value: Decimal) -> String { - big_decimal_to_str(BigDecimal::from_str(&value.to_string()).unwrap()) -} - -pub(crate) fn big_decimal_to_str(value: BigDecimal) -> String { - // Round the value to limit the number of decimal places - let value = value.round(12).normalized(); - // Format the value to a string - format_big_decimal(value) +pub(crate) fn decimal_to_str(value: rust_decimal::Decimal) -> String { + trim_decimal_trailing_zeros(value.to_string()) } -fn format_big_decimal(value: BigDecimal) -> String { - let (integer, scale) = value.into_bigint_and_exponent(); - let mut str = integer.to_str_radix(10); - if scale <= 0 { - // Append zeros to the right of the integer part - str.extend(std::iter::repeat('0').take(scale.unsigned_abs() as usize)); - str - } else { - let (sign, unsigned_len, unsigned_str) = if integer.is_negative() { - ("-", str.len() - 1, &str[1..]) - } else { - ("", str.len(), &str[..]) - }; - let scale = scale as usize; - if unsigned_len <= scale { - format!("{}0.{:0>scale$}", sign, unsigned_str) - } else { - str.insert(str.len() - scale, '.'); - str +fn trim_decimal_trailing_zeros(mut string: String) -> String { + // Remove trailing zeros after the decimal point + if let Some(decimal_idx) = string.find('.') { + let after_decimal_idx = decimal_idx + 1; + let after = &mut string[after_decimal_idx..]; + let trimmed_len = after.trim_end_matches('0').len(); + string.truncate(after_decimal_idx + trimmed_len); + if string.ends_with('.') { + string.pop(); } } -} - -#[cfg(test)] -mod tests { - use super::big_decimal_to_str; - use bigdecimal::{num_bigint::BigInt, BigDecimal}; - - macro_rules! assert_decimal_str_eq { - ($integer:expr, $scale:expr, $expected:expr) => { - assert_eq!( - big_decimal_to_str(BigDecimal::from_bigint( - BigInt::from($integer), - $scale - )), - $expected - ); - }; - } - - #[test] - fn test_big_decimal_to_str() { - assert_decimal_str_eq!(11, 3, "0.011"); - assert_decimal_str_eq!(11, 2, "0.11"); - assert_decimal_str_eq!(11, 1, "1.1"); - assert_decimal_str_eq!(11, 0, "11"); - assert_decimal_str_eq!(11, -1, "110"); - assert_decimal_str_eq!(0, 0, "0"); - - // Negative cases - assert_decimal_str_eq!(-11, 3, "-0.011"); - assert_decimal_str_eq!(-11, 2, "-0.11"); - assert_decimal_str_eq!(-11, 1, "-1.1"); - assert_decimal_str_eq!(-11, 0, "-11"); - assert_decimal_str_eq!(-11, -1, "-110"); - - // Round to 12 decimal places - // 1.0000000000011 -> 1.000000000001 - assert_decimal_str_eq!(10_i128.pow(13) + 11, 13, "1.000000000001"); - } + string } diff --git a/datafusion/sqllogictest/test_files/aggregate.slt b/datafusion/sqllogictest/test_files/aggregate.slt index 917e037682f24..95cf4d031a1f7 100644 --- a/datafusion/sqllogictest/test_files/aggregate.slt +++ b/datafusion/sqllogictest/test_files/aggregate.slt @@ -283,7 +283,7 @@ physical_plan query R SELECT avg(c12) FROM aggregate_test_100 ---- -0.508972509913 +0.5089725099127215 # csv_query_bit_and query IIIII @@ -331,13 +331,13 @@ SELECT bit_xor(distinct c5 % 2) FROM aggregate_test_100 query R SELECT covar_pop(c2, c12) FROM aggregate_test_100 ---- --0.079169322354 +-0.07916932235380847 # csv_query_covariance_2 query R SELECT covar(c2, c12) FROM aggregate_test_100 ---- --0.079969012479 +-0.07996901247859442 # single_row_query_covar_1 query R @@ -381,13 +381,13 @@ with data as ( select covar_samp(f, b), covar_pop(f, b) from data ---- -1 0.666666666667 +1 0.6666666666666666 # csv_query_correlation query R SELECT corr(c2, c12) FROM aggregate_test_100 ---- --0.190645441906 +-0.19064544190576607 # single_row_query_correlation query R @@ -437,19 +437,19 @@ SELECT var_pop(c2) FROM aggregate_test_100 query R SELECT var_pop(c6) FROM aggregate_test_100 ---- -26156334342021890000000000000000000000 +2.615633434202189e37 # csv_query_variance_3 query R SELECT var_pop(c12) FROM aggregate_test_100 ---- -0.092342237216 +0.09234223721582163 # csv_query_variance_4 query R SELECT var(c2) FROM aggregate_test_100 ---- -1.886363636364 +1.8863636363636365 # csv_query_distinct_variance query R @@ -473,93 +473,93 @@ SELECT var_pop(c2), var_pop(distinct c2) FROM aggregate_test_100 query R SELECT var_samp(c2) FROM aggregate_test_100 ---- -1.886363636364 +1.8863636363636365 # csv_query_stddev_1 query R SELECT stddev_pop(c2) FROM aggregate_test_100 ---- -1.366565036872 +1.3665650368716449 # csv_query_stddev_2 query R SELECT stddev_pop(c6) FROM aggregate_test_100 ---- -5114326382039172000 +5.114326382039172e18 # csv_query_stddev_3 query R SELECT stddev_pop(c12) FROM aggregate_test_100 ---- -0.303878655413 +0.30387865541334363 # csv_query_stddev_4 query R SELECT stddev(c12) FROM aggregate_test_100 ---- -0.305409539941 +0.3054095399405338 # csv_query_stddev_5 query R SELECT stddev_samp(c12) FROM aggregate_test_100 ---- -0.305409539941 +0.3054095399405338 # csv_query_stddev_6 query R select stddev(sq.column1) from (values (1.1), (2.0), (3.0)) as sq ---- -0.950438495292 +0.9504384952922168 # csv_query_stddev_7 query IR SELECT c2, stddev_samp(c12) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2 ---- -1 0.303641032262 -2 0.284581967411 -3 0.296002660506 -4 0.284324609109 -5 0.331034486752 +1 0.3036410322615979 +2 0.2845819674113435 +3 0.29600266050600005 +4 0.2843246091094337 +5 0.3310344867522001 # csv_query_stddev_8 query IR SELECT c2, stddev_pop(c12) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2 ---- -1 0.296659845456 -2 0.278038978602 -3 0.288107833475 -4 0.278074953424 -5 0.318992813225 +1 0.29665984545593505 +2 0.27803897860240673 +3 0.28810783347461977 +4 0.2780749534235806 +5 0.31899281322522466 # csv_query_stddev_9 query IR SELECT c2, var_pop(c12) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2 ---- -1 0.088007063906 -2 0.077305673622 -3 0.083006123709 -4 0.077325679722 -5 0.101756414889 +1 0.08800706390593925 +2 0.07730567362226957 +3 0.08300612370943923 +4 0.07732567972152651 +5 0.10175641488934306 # csv_query_stddev_10 query IR SELECT c2, var_samp(c12) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2 ---- -1 0.092197876473 -2 0.080986896176 -3 0.087617575027 -4 0.080840483345 -5 0.109583831419 +1 0.09219787647288874 +2 0.08098689617571099 +3 0.08761757502663031 +4 0.08084048334523226 +5 0.10958383141929252 # csv_query_stddev_11 query IR SELECT c2, var_samp(c12) FROM aggregate_test_100 WHERE c12 > 0.90 GROUP BY c2 ORDER BY c2 ---- -1 0.000889240174 -2 0.000785878272 +1 0.0008892401740160169 +2 0.0007858782719218588 3 NULL 4 NULL -5 0.000269544643 +5 0.0002695446430348321 # Use PostgresSQL dialect statement ok @@ -569,8 +569,8 @@ set datafusion.sql_parser.dialect = 'Postgres'; query IR SELECT c2, var_samp(c12) FILTER (WHERE c12 > 0.95) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2 ---- -1 0.000791243479 -2 0.000061521903 +1 0.0007912434788487343 +2 0.00006152190259992073 3 NULL 4 NULL 5 NULL @@ -583,11 +583,11 @@ set datafusion.sql_parser.dialect = 'Generic'; query IR SELECT c2, var_samp(CASE WHEN c12 > 0.90 THEN c12 ELSE null END) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2 ---- -1 0.000889240174 -2 0.000785878272 +1 0.0008892401740160169 +2 0.0007858782719218588 3 NULL 4 NULL -5 0.000269544643 +5 0.0002695446430348321 # csv_query_approx_median_1 @@ -606,7 +606,7 @@ SELECT approx_median(c6) FROM aggregate_test_100 query R SELECT approx_median(c12) FROM aggregate_test_100 ---- -0.555006541052 +0.5550065410522981 # csv_query_approx_median_4 # test with string, approx median only supports numeric @@ -629,7 +629,7 @@ SELECT median(c6) FROM aggregate_test_100 query R SELECT median(c12) FROM aggregate_test_100 ---- -0.551390054439 +0.5513900544385053 # median_i8 query I @@ -1039,7 +1039,7 @@ query TR rowsort select host, median(usage) from cpu group by host; ---- host0 90.1 -host1 90.3 +host1 90.30000000000001 query R select median(usage) from cpu; @@ -1408,40 +1408,40 @@ query TIR SELECT c1, c2, AVG(c3) FROM aggregate_test_100 GROUP BY CUBE (c1, c2) ORDER BY c1, c2 ---- a 1 -17.6 -a 2 -15.333333333333 +a 2 -15.333333333333334 a 3 -4.5 a 4 -32 a 5 -32 -a NULL -18.333333333333 -b 1 31.666666666667 +a NULL -18.333333333333332 +b 1 31.666666666666668 b 2 25.5 b 3 -42 b 4 -44.6 b 5 -0.2 -b NULL -5.842105263158 +b NULL -5.842105263157895 c 1 47.5 -c 2 -55.571428571429 +c 2 -55.57142857142857 c 3 47.5 c 4 -10.75 c 5 12 -c NULL -1.333333333333 -d 1 -8.142857142857 -d 2 109.333333333333 -d 3 41.333333333333 +c NULL -1.3333333333333333 +d 1 -8.142857142857142 +d 2 109.33333333333333 +d 3 41.333333333333336 d 4 54 d 5 -49.5 -d NULL 25.444444444444 -e 1 75.666666666667 +d NULL 25.444444444444443 +e 1 75.66666666666667 e 2 37.8 e 3 48 -e 4 37.285714285714 +e 4 37.285714285714285 e 5 -11 -e NULL 40.333333333333 -NULL 1 16.681818181818 -NULL 2 8.363636363636 -NULL 3 20.789473684211 -NULL 4 1.260869565217 -NULL 5 -13.857142857143 +e NULL 40.333333333333336 +NULL 1 16.681818181818183 +NULL 2 8.363636363636363 +NULL 3 20.789473684210527 +NULL 4 1.2608695652173914 +NULL 5 -13.857142857142858 NULL NULL 7.81 # csv_query_rollup_avg @@ -1473,7 +1473,7 @@ a 5 -101 -12484 a 5 -31 -12907 a 5 36 -16974 a 5 NULL -14121.666666666666 -a NULL NULL 306.047619047619 +a NULL NULL 306.04761904761904 b 1 12 7652 b 1 29 -18218 b 1 54 -18410 @@ -1534,7 +1534,7 @@ a 5 -101 -12484 a 5 -31 -12907 a 5 36 -16974 a 5 NULL -14121.666666666666 -a NULL NULL 306.047619047619 +a NULL NULL 306.04761904761904 b 1 12 7652 b 1 29 -18218 b 1 54 -18410 @@ -1594,7 +1594,7 @@ a 5 -101 -12484 a 5 -31 -12907 a 5 36 -16974 a 5 NULL -14121.666666666666 -a NULL NULL 306.047619047619 +a NULL NULL 306.04761904761904 b 1 12 7652 b 1 29 -18218 b 1 54 -18410 @@ -1872,51 +1872,51 @@ SELECT array_agg(c13) FROM (SELECT * FROM aggregate_test_100 ORDER BY c13 LIMIT query IIRIII select c2, sum(c3) sum_c3, avg(c3) avg_c3, max(c3) max_c3, min(c3) min_c3, count(c3) count_c3 from aggregate_test_100 group by c2 order by c2 ---- -1 367 16.681818181818 125 -99 22 -2 184 8.363636363636 122 -117 22 -3 395 20.789473684211 123 -101 19 -4 29 1.260869565217 123 -117 23 -5 -194 -13.857142857143 118 -101 14 +1 367 16.681818181818183 125 -99 22 +2 184 8.363636363636363 122 -117 22 +3 395 20.789473684210527 123 -101 19 +4 29 1.2608695652173914 123 -117 23 +5 -194 -13.857142857142858 118 -101 14 # csv_query_array_cube_agg_with_overflow query TIIRIII select c1, c2, sum(c3) sum_c3, avg(c3) avg_c3, max(c3) max_c3, min(c3) min_c3, count(c3) count_c3 from aggregate_test_100 group by CUBE (c1,c2) order by c1, c2 ---- a 1 -88 -17.6 83 -85 5 -a 2 -46 -15.333333333333 45 -48 3 +a 2 -46 -15.333333333333334 45 -48 3 a 3 -27 -4.5 17 -72 6 a 4 -128 -32 65 -101 4 a 5 -96 -32 36 -101 3 -a NULL -385 -18.333333333333 83 -101 21 -b 1 95 31.666666666667 54 12 3 +a NULL -385 -18.333333333333332 83 -101 21 +b 1 95 31.666666666666668 54 12 3 b 2 102 25.5 68 -60 4 b 3 -84 -42 17 -101 2 b 4 -223 -44.6 47 -117 5 b 5 -1 -0.2 68 -82 5 -b NULL -111 -5.842105263158 68 -117 19 +b NULL -111 -5.842105263157895 68 -117 19 c 1 190 47.5 103 -24 4 -c 2 -389 -55.571428571429 29 -117 7 +c 2 -389 -55.57142857142857 29 -117 7 c 3 190 47.5 97 -2 4 c 4 -43 -10.75 123 -90 4 c 5 24 12 118 -94 2 -c NULL -28 -1.333333333333 123 -117 21 -d 1 -57 -8.142857142857 125 -99 7 -d 2 328 109.333333333333 122 93 3 -d 3 124 41.333333333333 123 -76 3 +c NULL -28 -1.3333333333333333 123 -117 21 +d 1 -57 -8.142857142857142 125 -99 7 +d 2 328 109.33333333333333 122 93 3 +d 3 124 41.333333333333336 123 -76 3 d 4 162 54 102 5 3 d 5 -99 -49.5 -40 -59 2 -d NULL 458 25.444444444444 125 -99 18 -e 1 227 75.666666666667 120 36 3 +d NULL 458 25.444444444444443 125 -99 18 +e 1 227 75.66666666666667 120 36 3 e 2 189 37.8 97 -61 5 e 3 192 48 112 -95 4 -e 4 261 37.285714285714 97 -56 7 +e 4 261 37.285714285714285 97 -56 7 e 5 -22 -11 64 -86 2 -e NULL 847 40.333333333333 120 -95 21 -NULL 1 367 16.681818181818 125 -99 22 -NULL 2 184 8.363636363636 122 -117 22 -NULL 3 395 20.789473684211 123 -101 19 -NULL 4 29 1.260869565217 123 -117 23 -NULL 5 -194 -13.857142857143 118 -101 14 +e NULL 847 40.333333333333336 120 -95 21 +NULL 1 367 16.681818181818183 125 -99 22 +NULL 2 184 8.363636363636363 122 -117 22 +NULL 3 395 20.789473684210527 123 -101 19 +NULL 4 29 1.2608695652173914 123 -117 23 +NULL 5 -194 -13.857142857142858 118 -101 14 NULL NULL 781 7.81 125 -117 100 # select with count to forces array_agg_distinct function, since single distinct expression is converted to group by by optimizer @@ -2053,11 +2053,11 @@ FROM aggregate_test_100 ORDER BY C9 LIMIT 5 ---- -0.014793053078 0.996540038759 -0.014793053078 0.980019341044 -0.014793053078 0.970671228336 -0.266717779508 0.996540038759 -0.360076636233 0.970671228336 +0.01479305307777301 0.9965400387585364 +0.01479305307777301 0.9800193410444061 +0.01479305307777301 0.9706712283358269 +0.2667177795079635 0.9965400387585364 +0.3600766362333053 0.9706712283358269 # aggregate_min_max_with_custom_window_frames_unbounded_start query RR @@ -2068,11 +2068,11 @@ FROM aggregate_test_100 ORDER BY C9 LIMIT 5 ---- -0.014793053078 0.996540038759 -0.014793053078 0.980019341044 -0.014793053078 0.980019341044 -0.014793053078 0.996540038759 -0.014793053078 0.980019341044 +0.01479305307777301 0.9965400387585364 +0.01479305307777301 0.9800193410444061 +0.01479305307777301 0.9800193410444061 +0.01479305307777301 0.9965400387585364 +0.01479305307777301 0.9800193410444061 # aggregate_avg_add query RRRR @@ -2350,7 +2350,7 @@ create table t (c1 double, c2 double) as values (1, 4), (2, 5), (3, 6); query RT select covar_pop(c1, c2), arrow_typeof(covar_pop(c1, c2)) from t; ---- -0.666666666667 Float64 +0.6666666666666666 Float64 statement ok drop table t; @@ -2374,7 +2374,7 @@ create table t (c1 double, c2 double) as values (1.1, 4.1), (2.0, 5.0), (3.0, 6. query RT select covar_samp(c1, c2), arrow_typeof(covar_samp(c1, c2)) from t; ---- -0.903333333333 Float64 +0.9033333333333335 Float64 statement ok drop table t; @@ -2386,7 +2386,7 @@ create table t (c1 double, c2 double) as values (1.1, 4.1), (2.0, 5.0), (3.0, 6. query RT select covar_pop(c1, c2), arrow_typeof(covar_pop(c1, c2)) from t; ---- -0.602222222222 Float64 +0.6022222222222223 Float64 statement ok drop table t; @@ -2398,7 +2398,7 @@ create table t (c1 double, c2 double) as values (1.0, 4.0), (2.0, 5.0), (3.0, 6. query RT select covar_pop(c1, c2), arrow_typeof(covar_pop(c1, c2)) from t; ---- -0.761666666667 Float64 +0.7616666666666666 Float64 statement ok drop table t; @@ -2410,7 +2410,7 @@ create table t (c1 int, c2 int) as values (1, 4), (2, 5), (3, 6); query RT select covar_pop(c1, c2), arrow_typeof(covar_pop(c1, c2)) from t; ---- -0.666666666667 Float64 +0.6666666666666666 Float64 statement ok drop table t; @@ -2422,7 +2422,7 @@ create table t (c1 int unsigned, c2 int unsigned) as values (1, 4), (2, 5), (3, query RT select covar_pop(c1, c2), arrow_typeof(covar_pop(c1, c2)) from t; ---- -0.666666666667 Float64 +0.6666666666666666 Float64 statement ok drop table t; @@ -2434,7 +2434,7 @@ create table t (c1 float, c2 float) as values (1, 4), (2, 5), (3, 6); query RT select covar_pop(c1, c2), arrow_typeof(covar_pop(c1, c2)) from t; ---- -0.666666666667 Float64 +0.6666666666666666 Float64 statement ok drop table t; @@ -2458,7 +2458,7 @@ create table t (c1 int, c2 int) as values (1, 4), (null, 9), (2, 5), (null, 8), query RT select covar_pop(c1, c2), arrow_typeof(covar_pop(c1, c2)) from t; ---- -0.666666666667 Float64 +0.6666666666666666 Float64 statement ok drop table t; @@ -2554,7 +2554,7 @@ create table t (c1 double) as values (1.1), (2), (3); query RT select stddev_pop(c1), arrow_typeof(stddev_pop(c1)) from t; ---- -0.776029781788 Float64 +0.7760297817881877 Float64 statement ok drop table t; @@ -2566,7 +2566,7 @@ create table t (c1 double) as values (1), (2), (3), (4), (5); query RT select stddev_pop(c1), arrow_typeof(stddev_pop(c1)) from t; ---- -1.414213562373 Float64 +1.4142135623730951 Float64 statement ok drop table t; @@ -2578,7 +2578,7 @@ create table t (c1 double) as values (1.1), (2), (3); query RT select stddev(c1), arrow_typeof(stddev(c1)) from t; ---- -0.950438495292 Float64 +0.9504384952922168 Float64 statement ok drop table t; @@ -2590,7 +2590,7 @@ create table t (c1 int) as values (1), (2), (3), (4), (5); query RT select stddev_pop(c1), arrow_typeof(stddev_pop(c1)) from t; ---- -1.414213562373 Float64 +1.4142135623730951 Float64 statement ok drop table t; @@ -2602,7 +2602,7 @@ create table t (c1 int unsigned) as values (1), (2), (3), (4), (5); query RT select stddev_pop(c1), arrow_typeof(stddev_pop(c1)) from t; ---- -1.414213562373 Float64 +1.4142135623730951 Float64 statement ok drop table t; @@ -2614,7 +2614,7 @@ create table t (c1 float) as values (1), (2), (3), (4), (5); query RT select stddev_pop(c1), arrow_typeof(stddev_pop(c1)) from t; ---- -1.414213562373 Float64 +1.4142135623730951 Float64 statement ok drop table t; @@ -2638,7 +2638,7 @@ create table t (c1 int) as values (1), (null), (3), (4), (5); query RT select stddev_pop(c1), arrow_typeof(stddev_pop(c1)) from t; ---- -1.479019945775 Float64 +1.479019945774904 Float64 statement ok drop table t; @@ -2698,7 +2698,7 @@ create table t (c double) as values (1.1), (2), (3); query RT select var(c), arrow_typeof(var(c)) from t; ---- -0.903333333333 Float64 +0.9033333333333333 Float64 statement ok drop table t; @@ -2710,7 +2710,7 @@ create table t (c1 double) as values (1.1), (2), (3); query RT select var(c1), arrow_typeof(var(c1)) from t; ---- -0.903333333333 Float64 +0.9033333333333333 Float64 statement ok drop table t; @@ -3054,7 +3054,7 @@ NULL 0 NULL 0 query RRRR select var(sq.column1), var_pop(sq.column1), stddev(sq.column1), stddev_pop(sq.column1) from (values (1.0), (3.0)) as sq; ---- -2 1 1.414213562373 1 +2 1 1.4142135623730951 1 @@ -4569,7 +4569,7 @@ create table t (c float) as values (1.2), (0.2), (-1.2), (null), (-1.0); query RT select sum(c), arrow_typeof(sum(c)) from t; ---- --0.79999999702 Float64 +-0.7999999970197678 Float64 statement ok drop table t; @@ -4852,7 +4852,7 @@ query R select avg(x_dict) from value_dict group by x_dict % 2 order by avg(x_dict); ---- 2.6 -2.666666666667 +2.6666666666666665 query I select min(x_dict) from value_dict group by x_dict % 2 order by min(x_dict); @@ -5220,7 +5220,7 @@ select regr_sxy(c12, c11) from aggregate_test_100; ---- -0.051534002628 0.48427355347 100 0.001929150558 0.479274948239 0.508972509913 6.707779292571 9.234223721582 0.345678715695 +0.051534002628483525 0.4842735534703896 100 0.0019291505577868026 0.4792749482393264 0.5089725099127214 6.7077792925709625 9.234223721582163 0.34567871569463937 @@ -5291,60 +5291,64 @@ c NULL NULL 1 NULL 1 10 0 0 0 -# regr_*() testing merge_batch() from RegrAccumulator's internal implementation +# regr_*() testing merge_batch() from RegrAccumulator's internal implementation. +# +# Note: Because the merge_batch() order is not deterministic, and the algorithm gives +# minor output differences when the order is changed, we test outputs within +# an epsilon of 1e-14. statement ok set datafusion.execution.batch_size = 1; -query RRIRRRRRR +query BBIBBBBBB select - regr_slope(c12, c11), - regr_intercept(c12, c11), - regr_count(c12, c11), - regr_r2(c12, c11), - regr_avgx(c12, c11), - regr_avgy(c12, c11), - regr_sxx(c12, c11), - regr_syy(c12, c11), - regr_sxy(c12, c11) + abs(regr_slope(c12, c11) - 0.05153400262848352) < 1e-14, + abs(regr_intercept(c12, c11) - 0.4842735534703897) < 1e-14, + regr_count(c12, c11), + abs(regr_r2(c12, c11) - 0.0019291505577868017) < 1e-14, + abs(regr_avgx(c12, c11) - 0.4792749482393264) < 1e-14, + abs(regr_avgy(c12, c11) - 0.5089725099127215) < 1e-14, + abs(regr_sxx(c12, c11) - 6.7077792925709625) < 1e-14, + abs(regr_syy(c12, c11) - 9.234223721582165) < 1e-14, + abs(regr_sxy(c12, c11) - 0.3456787156946393) < 1e-14 from aggregate_test_100; ---- -0.051534002628 0.48427355347 100 0.001929150558 0.479274948239 0.508972509913 6.707779292571 9.234223721582 0.345678715695 +true true 100 true true true true true true statement ok set datafusion.execution.batch_size = 2; -query RRIRRRRRR +query BBIBBBBBB select - regr_slope(c12, c11), - regr_intercept(c12, c11), - regr_count(c12, c11), - regr_r2(c12, c11), - regr_avgx(c12, c11), - regr_avgy(c12, c11), - regr_sxx(c12, c11), - regr_syy(c12, c11), - regr_sxy(c12, c11) + abs(regr_slope(c12, c11) - 0.05153400262848346) < 1e-14, + abs(regr_intercept(c12, c11) - 0.48427355347038975) < 1e-14, + regr_count(c12, c11), + abs(regr_r2(c12, c11) - 0.0019291505577867965) < 1e-14, + abs(regr_avgx(c12, c11) - 0.4792749482393265) < 1e-14, + abs(regr_avgy(c12, c11) - 0.5089725099127215) < 1e-14, + abs(regr_sxx(c12, c11) - 6.707779292570961) < 1e-14, + abs(regr_syy(c12, c11) - 9.234223721582165) < 1e-14, + abs(regr_sxy(c12, c11) - 0.3456787156946388) < 1e-14 from aggregate_test_100; ---- -0.051534002628 0.48427355347 100 0.001929150558 0.479274948239 0.508972509913 6.707779292571 9.234223721582 0.345678715695 +true true 100 true true true true true true statement ok set datafusion.execution.batch_size = 3; -query RRIRRRRRR +query BBIBBBBBB select - regr_slope(c12, c11), - regr_intercept(c12, c11), - regr_count(c12, c11), - regr_r2(c12, c11), - regr_avgx(c12, c11), - regr_avgy(c12, c11), - regr_sxx(c12, c11), - regr_syy(c12, c11), - regr_sxy(c12, c11) + abs(regr_slope(c12, c11) - 0.051534002628483525) < 1e-14, + abs(regr_intercept(c12, c11) - 0.4842735534703897) < 1e-14, + regr_count(c12, c11), + abs(regr_r2(c12, c11) - 0.001929150557786802) < 1e-14, + abs(regr_avgx(c12, c11) - 0.4792749482393264) < 1e-14, + abs(regr_avgy(c12, c11) - 0.5089725099127215) < 1e-14, + abs(regr_sxx(c12, c11) - 6.7077792925709625) < 1e-14, + abs(regr_syy(c12, c11) - 9.234223721582165) < 1e-14, + abs(regr_sxy(c12, c11) - 0.34567871569463937) < 1e-14 from aggregate_test_100; ---- -0.051534002628 0.48427355347 100 0.001929150558 0.479274948239 0.508972509913 6.707779292571 9.234223721582 0.345678715695 +true true 100 true true true true true true statement ok set datafusion.execution.batch_size = 8192; @@ -5369,8 +5373,8 @@ WINDOW w AS (ORDER BY column1 ROWS BETWEEN 2 PRECEDING AND CURRENT ROW); NULL NULL 1 NULL 1 2 0 0 0 2 0 2 1 1.5 3 0.5 2 1 2 0 3 1 2 4 2 8 4 -4 -4.666666666667 3 0.923076923077 3 7.333333333333 2 34.666666666667 8 -4.5 -7 3 0.964285714286 4 11 2 42 9 +4 -4.666666666666667 3 0.923076923076923 3 7.333333333333333 2 34.66666666666667 8 +4.5 -7 3 0.9642857142857144 4 11 2 42 9 3 0 3 1 5 15 2 18 6 query RRIRRRRRR @@ -6074,7 +6078,7 @@ FROM data GROUP BY k ORDER BY k; ---- -1 1.8125 6.8007813 Float16 Float16 +1 1.8125 6.8007812 Float16 Float16 2 8.5 8.5 Float16 Float16 statement ok diff --git a/datafusion/sqllogictest/test_files/aggregate_skip_partial.slt b/datafusion/sqllogictest/test_files/aggregate_skip_partial.slt index a2e51cffacf7e..265c43faced68 100644 --- a/datafusion/sqllogictest/test_files/aggregate_skip_partial.slt +++ b/datafusion/sqllogictest/test_files/aggregate_skip_partial.slt @@ -261,11 +261,11 @@ SELECT c2, min(c5), max(c5), min(c11), max(c11) FROM aggregate_test_100 GROUP BY query IIR SELECT c2, sum(c5), sum(c11) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2; ---- -1 -438598674 12.153253793716 -2 -8259865364 9.577824473381 -3 1956035476 9.590891361237 -4 16155718643 9.531112968922 -5 6449337880 7.074412226677 +1 -438598674 12.15325379371643 +2 -8259865364 9.577824473381042 +3 1956035476 9.590891361236572 +4 16155718643 9.531112968921661 +5 6449337880 7.074412226676941 # Test median for int / float query IIR @@ -321,11 +321,11 @@ SELECT c2, min(c3), max(c3), min(c11), max(c11) FROM aggregate_test_100_null GRO query IIR SELECT c2, sum(c3), sum(c11) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2; ---- -1 367 12.153253793716 -2 184 9.577824473381 -3 395 9.590891361237 -4 29 9.531112968922 -5 -194 7.074412226677 +1 367 12.15325379371643 +2 184 9.577824473381042 +3 395 9.590891361236572 +4 29 9.531112968921661 +5 -194 7.074412226676941 # Test median with nullable fields query IIR @@ -365,11 +365,11 @@ SELECT avg(c11) FROM aggregate_test_100 GROUP BY c1 ORDER BY c1; ---- -a 2.857142857143 0.438223421574 -b 3.263157894737 0.496481208425 -c 2.666666666667 0.425241138254 -d 2.444444444444 0.541519476308 -e 3 0.505440263521 +a 2.857142857142857 0.4382234215736389 +b 3.263157894736842 0.49648120842481913 +c 2.6666666666666665 0.42524113825389315 +d 2.4444444444444446 0.541519476307763 +e 3 0.5054402635211036 # FIXME: add bool_and(v3) column when issue fixed # ISSUE https://github.com/apache/datafusion/issues/11846 @@ -506,11 +506,11 @@ SELECT avg(c11) FILTER (WHERE c2 != 5) FROM aggregate_test_100 GROUP BY c1 ORDER BY c1; ---- -a 2.5 0.449071887467 -b 2.642857142857 0.445486298629 -c 2.421052631579 0.422882117723 -d 2.125 0.518706191331 -e 2.789473684211 0.536785323369 +a 2.5 0.4490718874666426 +b 2.642857142857143 0.4454862986292158 +c 2.4210526315789473 0.4228821177231638 +d 2.125 0.5187061913311481 +e 2.789473684210526 0.5367853233688756 # Test count with nullable fields and nullable filter query III @@ -562,11 +562,11 @@ SELECT c2, SUM(c11) FILTER (WHERE c3 > 0) FROM aggregate_test_100_null GROUP BY c2 ORDER BY c2; ---- -1 -3 77 7.214695632458 5.085060358047 -2 100 77 6.197732746601 3.150197088718 -3 109 211 2.80575042963 2.80632930994 -4 -171 56 2.10740506649 1.939846396446 -5 -86 -76 1.8741710186 1.600569307804 +1 -3 77 7.214695632457733 5.085060358047485 +2 100 77 6.197732746601105 3.1501970887184143 +3 109 211 2.8057504296302795 2.806329309940338 +4 -171 56 2.1074050664901733 1.939846396446228 +5 -86 -76 1.8741710186004639 1.6005693078041077 # Test approx_distinct with nullable fields and filter query II diff --git a/datafusion/sqllogictest/test_files/array.slt b/datafusion/sqllogictest/test_files/array.slt index 7578692ddb0f8..496c8972f8ae0 100644 --- a/datafusion/sqllogictest/test_files/array.slt +++ b/datafusion/sqllogictest/test_files/array.slt @@ -4967,26 +4967,26 @@ select list_distance([1, 2, 3], [1, 2, 3]) AS distance; query RRR select array_distance(column1, column2), array_distance(column1, column3), array_distance(column1, column4) from arrays_distance_table; ---- -0 0.374165738677 NULL -5.196152422707 6.063827174318 NULL -10.392304845413 11.778794505381 NULL -15.58845726812 15.935494971917 NULL +0 0.3741657386773941 NULL +5.196152422706632 6.063827174318212 NULL +10.392304845413264 11.77879450538127 NULL +15.588457268119896 15.935494971917251 NULL query RRR select array_distance(column1, column2), array_distance(column1, column3), array_distance(column1, column4) from large_arrays_distance_table; ---- -0 0.374165738677 NULL -5.196152422707 6.063827174318 NULL -10.392304845413 11.778794505381 NULL -15.58845726812 15.935494971917 NULL +0 0.3741657386773941 NULL +5.196152422706632 6.063827174318212 NULL +10.392304845413264 11.77879450538127 NULL +15.588457268119896 15.935494971917251 NULL query RRR select array_distance(column1, column2), array_distance(column1, column3), array_distance(column1, column4) from fixed_size_arrays_distance_table; ---- -0 0.374165738677 NULL -5.196152422707 6.063827174318 NULL -10.392304845413 11.778794505381 NULL -15.58845726812 15.935494971917 NULL +0 0.3741657386773941 NULL +5.196152422706632 6.063827174318212 NULL +10.392304845413264 11.77879450538127 NULL +15.588457268119896 15.935494971917251 NULL ## array_dims (aliases: `list_dims`) diff --git a/datafusion/sqllogictest/test_files/clickbench.slt b/datafusion/sqllogictest/test_files/clickbench.slt index dfcd924758574..51789a8c432f6 100644 --- a/datafusion/sqllogictest/test_files/clickbench.slt +++ b/datafusion/sqllogictest/test_files/clickbench.slt @@ -52,7 +52,7 @@ SELECT SUM("AdvEngineID"), COUNT(*), AVG("ResolutionWidth") FROM hits; query R SELECT AVG("UserID") FROM hits; ---- --304548765855551740 +-3.0454876585555174e17 query I SELECT COUNT(DISTINCT "UserID") FROM hits; diff --git a/datafusion/sqllogictest/test_files/ddl.slt b/datafusion/sqllogictest/test_files/ddl.slt index 4a0ba87bfa1aa..6539bd759adf4 100644 --- a/datafusion/sqllogictest/test_files/ddl.slt +++ b/datafusion/sqllogictest/test_files/ddl.slt @@ -265,7 +265,7 @@ CREATE TABLE my_table AS SELECT * FROM aggregate_simple query RRB rowsort SELECT * FROM my_table order by c1 LIMIT 1 ---- -0.00001 0.000000000001 true +0.00001 1e-12 true statement ok drop table my_table @@ -277,7 +277,7 @@ SELECT* INTO my_table FROM (SELECT * FROM aggregate_simple) query RRB rowsort SELECT * FROM my_table order by c1 LIMIT 1 ---- -0.00001 0.000000000001 true +0.00001 1e-12 true statement ok DROP TABLE my_table; @@ -302,7 +302,7 @@ CREATE TABLE my_table(c1 float, c2 double, c3 boolean, c4 varchar) AS SELECT *,c query RRBT rowsort SELECT * FROM my_table order by c1 LIMIT 1 ---- -0.00001 0.000000000001 true true +0.00001 1e-12 true true statement ok DROP TABLE my_table; @@ -461,7 +461,7 @@ OPTIONS ('format.has_header' 'true'); query TIIIIIIIIIRRT SELECT c1, c2, c3, c4, c5, c6, c7, c8, c9, 10, c11, c12, c13 FROM aggregate_test_100 LIMIT 1; ---- -c 2 1 18109 2033001162 -6513304855495910254 25 43062 1491205016 10 0.110830784 0.929409733247 6WfVFBVGJSQb7FhA7E0lBwdvjfZnSW +c 2 1 18109 2033001162 -6513304855495910254 25 43062 1491205016 10 0.110830784 0.9294097332465232 6WfVFBVGJSQb7FhA7E0lBwdvjfZnSW @@ -544,12 +544,12 @@ CREATE EXTERNAL TABLE aggregate_simple STORED AS CSV LOCATION '../core/tests/dat query RRB SELECT * FROM aggregate_simple order by c1 LIMIT 1; ---- -0.00001 0.000000000001 true +0.00001 1e-12 true query RRB SELECT * FROM aggregate_simple order by c1 DESC LIMIT 1; ---- -0.00005 0.000000000005 true +0.00005 5e-12 true statement ok diff --git a/datafusion/sqllogictest/test_files/decimal.slt b/datafusion/sqllogictest/test_files/decimal.slt index f082a79c55087..c15d20fab6ae2 100644 --- a/datafusion/sqllogictest/test_files/decimal.slt +++ b/datafusion/sqllogictest/test_files/decimal.slt @@ -91,9 +91,9 @@ select c1 from decimal_simple where c1 > 0.000030; query RRIBR rowsort select * from decimal_simple where c1 > c5; ---- -0.00002 0.000000000002 3 false 0.000019 -0.00003 0.000000000003 5 true 0.000011 -0.00005 0.000000000005 8 false 0.000033 +0.00002 2e-12 3 false 0.000019 +0.00003 3e-12 5 true 0.000011 +0.00005 5e-12 8 false 0.000033 query TR @@ -133,76 +133,76 @@ Decimal128(10, 6) 0.00004 query RRIBR rowsort select * from decimal_simple where c1=CAST(0.00002 as Decimal(10,8)); ---- -0.00002 0.000000000002 2 true 0.000025 -0.00002 0.000000000002 3 false 0.000019 +0.00002 2e-12 2 true 0.000025 +0.00002 2e-12 3 false 0.000019 query RI rowsort select c2,c3 from decimal_simple where c1!=0.00002; ---- -0.000000000001 1 -0.000000000003 4 -0.000000000003 5 -0.000000000003 5 -0.000000000004 12 -0.000000000004 14 -0.000000000004 5 -0.000000000004 8 -0.000000000005 1 -0.000000000005 100 -0.000000000005 4 -0.000000000005 8 -0.000000000005 9 +1e-12 1 +3e-12 4 +3e-12 5 +3e-12 5 +4e-12 12 +4e-12 14 +4e-12 5 +4e-12 8 +5e-12 1 +5e-12 100 +5e-12 4 +5e-12 8 +5e-12 9 query RRIBR select * from decimal_simple where 0.00002 > c1; ---- -0.00001 0.000000000001 1 true 0.000014 +0.00001 1e-12 1 true 0.000014 query RRIBR rowsort select * from decimal_simple where c1 <= 0.00002; ---- -0.00001 0.000000000001 1 true 0.000014 -0.00002 0.000000000002 2 true 0.000025 -0.00002 0.000000000002 3 false 0.000019 +0.00001 1e-12 1 true 0.000014 +0.00002 2e-12 2 true 0.000025 +0.00002 2e-12 3 false 0.000019 query RRIBR rowsort select * from decimal_simple where c1 > 0.00002; ---- -0.00003 0.000000000003 4 true 0.000032 -0.00003 0.000000000003 5 false 0.000035 -0.00003 0.000000000003 5 true 0.000011 -0.00004 0.000000000004 12 false 0.00004 -0.00004 0.000000000004 14 true 0.00004 -0.00004 0.000000000004 5 true 0.000044 -0.00004 0.000000000004 8 false 0.000044 -0.00005 0.000000000005 1 false 0.0001 -0.00005 0.000000000005 100 true 0.000068 -0.00005 0.000000000005 4 true 0.000078 -0.00005 0.000000000005 8 false 0.000033 -0.00005 0.000000000005 9 true 0.000052 +0.00003 3e-12 4 true 0.000032 +0.00003 3e-12 5 false 0.000035 +0.00003 3e-12 5 true 0.000011 +0.00004 4e-12 12 false 0.00004 +0.00004 4e-12 14 true 0.00004 +0.00004 4e-12 5 true 0.000044 +0.00004 4e-12 8 false 0.000044 +0.00005 5e-12 1 false 0.0001 +0.00005 5e-12 100 true 0.000068 +0.00005 5e-12 4 true 0.000078 +0.00005 5e-12 8 false 0.000033 +0.00005 5e-12 9 true 0.000052 query RRIBR rowsort select * from decimal_simple where c1 >= 0.00002; ---- -0.00002 0.000000000002 2 true 0.000025 -0.00002 0.000000000002 3 false 0.000019 -0.00003 0.000000000003 4 true 0.000032 -0.00003 0.000000000003 5 false 0.000035 -0.00003 0.000000000003 5 true 0.000011 -0.00004 0.000000000004 12 false 0.00004 -0.00004 0.000000000004 14 true 0.00004 -0.00004 0.000000000004 5 true 0.000044 -0.00004 0.000000000004 8 false 0.000044 -0.00005 0.000000000005 1 false 0.0001 -0.00005 0.000000000005 100 true 0.000068 -0.00005 0.000000000005 4 true 0.000078 -0.00005 0.000000000005 8 false 0.000033 -0.00005 0.000000000005 9 true 0.000052 +0.00002 2e-12 2 true 0.000025 +0.00002 2e-12 3 false 0.000019 +0.00003 3e-12 4 true 0.000032 +0.00003 3e-12 5 false 0.000035 +0.00003 3e-12 5 true 0.000011 +0.00004 4e-12 12 false 0.00004 +0.00004 4e-12 14 true 0.00004 +0.00004 4e-12 5 true 0.000044 +0.00004 4e-12 8 false 0.000044 +0.00005 5e-12 1 false 0.0001 +0.00005 5e-12 100 true 0.000068 +0.00005 5e-12 4 true 0.000078 +0.00005 5e-12 8 false 0.000033 +0.00005 5e-12 9 true 0.000052 query T @@ -495,60 +495,60 @@ SELECT abs(c1) from decimal_simple; query RRIBR select * from decimal_simple where c1 >= 0.00004 order by c1; ---- -0.00004 0.000000000004 5 true 0.000044 -0.00004 0.000000000004 12 false 0.00004 -0.00004 0.000000000004 14 true 0.00004 -0.00004 0.000000000004 8 false 0.000044 -0.00005 0.000000000005 9 true 0.000052 -0.00005 0.000000000005 4 true 0.000078 -0.00005 0.000000000005 8 false 0.000033 -0.00005 0.000000000005 100 true 0.000068 -0.00005 0.000000000005 1 false 0.0001 +0.00004 4e-12 5 true 0.000044 +0.00004 4e-12 12 false 0.00004 +0.00004 4e-12 14 true 0.00004 +0.00004 4e-12 8 false 0.000044 +0.00005 5e-12 9 true 0.000052 +0.00005 5e-12 4 true 0.000078 +0.00005 5e-12 8 false 0.000033 +0.00005 5e-12 100 true 0.000068 +0.00005 5e-12 1 false 0.0001 query RRIBR select * from decimal_simple where c1 >= 0.00004 order by c1, c3 limit 10; ---- -0.00004 0.000000000004 5 true 0.000044 -0.00004 0.000000000004 8 false 0.000044 -0.00004 0.000000000004 12 false 0.00004 -0.00004 0.000000000004 14 true 0.00004 -0.00005 0.000000000005 1 false 0.0001 -0.00005 0.000000000005 4 true 0.000078 -0.00005 0.000000000005 8 false 0.000033 -0.00005 0.000000000005 9 true 0.000052 -0.00005 0.000000000005 100 true 0.000068 +0.00004 4e-12 5 true 0.000044 +0.00004 4e-12 8 false 0.000044 +0.00004 4e-12 12 false 0.00004 +0.00004 4e-12 14 true 0.00004 +0.00005 5e-12 1 false 0.0001 +0.00005 5e-12 4 true 0.000078 +0.00005 5e-12 8 false 0.000033 +0.00005 5e-12 9 true 0.000052 +0.00005 5e-12 100 true 0.000068 query RRIBR select * from decimal_simple where c1 >= 0.00004 order by c1, c3 limit 5; ---- -0.00004 0.000000000004 5 true 0.000044 -0.00004 0.000000000004 8 false 0.000044 -0.00004 0.000000000004 12 false 0.00004 -0.00004 0.000000000004 14 true 0.00004 -0.00005 0.000000000005 1 false 0.0001 +0.00004 4e-12 5 true 0.000044 +0.00004 4e-12 8 false 0.000044 +0.00004 4e-12 12 false 0.00004 +0.00004 4e-12 14 true 0.00004 +0.00005 5e-12 1 false 0.0001 query RRIBR select * from decimal_simple where c1 >= 0.00004 order by c1 desc; ---- -0.00005 0.000000000005 9 true 0.000052 -0.00005 0.000000000005 4 true 0.000078 -0.00005 0.000000000005 8 false 0.000033 -0.00005 0.000000000005 100 true 0.000068 -0.00005 0.000000000005 1 false 0.0001 -0.00004 0.000000000004 5 true 0.000044 -0.00004 0.000000000004 12 false 0.00004 -0.00004 0.000000000004 14 true 0.00004 -0.00004 0.000000000004 8 false 0.000044 +0.00005 5e-12 9 true 0.000052 +0.00005 5e-12 4 true 0.000078 +0.00005 5e-12 8 false 0.000033 +0.00005 5e-12 100 true 0.000068 +0.00005 5e-12 1 false 0.0001 +0.00004 4e-12 5 true 0.000044 +0.00004 4e-12 12 false 0.00004 +0.00004 4e-12 14 true 0.00004 +0.00004 4e-12 8 false 0.000044 query RRIBR select * from decimal_simple where c1 < 0.00003 order by c1 desc,c4; ---- -0.00002 0.000000000002 3 false 0.000019 -0.00002 0.000000000002 2 true 0.000025 -0.00001 0.000000000001 1 true 0.000014 +0.00002 2e-12 3 false 0.000019 +0.00002 2e-12 2 true 0.000025 +0.00001 1e-12 1 true 0.000014 query IR @@ -682,9 +682,9 @@ select c1 from decimal256_simple where c1 > 0.000030; query RRIBR rowsort select * from decimal256_simple where c1 > c5; ---- -0.00002 0.000000000002 3 false 0.000019 -0.00003 0.000000000003 5 true 0.000011 -0.00005 0.000000000005 8 false 0.000033 +0.00002 2e-12 3 false 0.000019 +0.00003 3e-12 5 true 0.000011 +0.00005 5e-12 8 false 0.000033 query TR select arrow_typeof(avg(c1)), avg(c1) from decimal256_simple; diff --git a/datafusion/sqllogictest/test_files/distinct_on.slt b/datafusion/sqllogictest/test_files/distinct_on.slt index cc0ebf83a843b..a48124655ef55 100644 --- a/datafusion/sqllogictest/test_files/distinct_on.slt +++ b/datafusion/sqllogictest/test_files/distinct_on.slt @@ -148,9 +148,9 @@ LIMIT 3; query TIIIIIIIITRRT SELECT DISTINCT ON (c1) * FROM aggregate_test_100 ORDER BY c1 LIMIT 3; ---- -a 1 -85 -15154 1171968280 1919439543497968449 77 52286 774637006 12101411955859039553 0.12285209 0.686439196277 0keZ5G8BffGwgF2RwQD59TFzMStxCB -b 1 29 -18218 994303988 5983957848665088916 204 9489 3275293996 14857091259186476033 0.53840446 0.179090351188 AyYVExXK6AR2qUTxNZ7qRHQOVGMLcz -c 2 1 18109 2033001162 -6513304855495910254 25 43062 1491205016 5863949479783605708 0.110830784 0.929409733247 6WfVFBVGJSQb7FhA7E0lBwdvjfZnSW +a 1 -85 -15154 1171968280 1919439543497968449 77 52286 774637006 12101411955859039553 0.12285209 0.6864391962767343 0keZ5G8BffGwgF2RwQD59TFzMStxCB +b 1 29 -18218 994303988 5983957848665088916 204 9489 3275293996 14857091259186476033 0.53840446 0.17909035118828576 AyYVExXK6AR2qUTxNZ7qRHQOVGMLcz +c 2 1 18109 2033001162 -6513304855495910254 25 43062 1491205016 5863949479783605708 0.110830784 0.9294097332465232 6WfVFBVGJSQb7FhA7E0lBwdvjfZnSW # can't distinct on * query error DataFusion error: SQL error: ParserError\("Expected: an expression, found: \*"\) diff --git a/datafusion/sqllogictest/test_files/expr.slt b/datafusion/sqllogictest/test_files/expr.slt index 499d279515c36..6008532f087fb 100644 --- a/datafusion/sqllogictest/test_files/expr.slt +++ b/datafusion/sqllogictest/test_files/expr.slt @@ -2603,25 +2603,25 @@ CREATE TABLE doubles ( query RRR rowsort select f64, round(1.0 / f64) as i64_1, acos(round(1.0 / f64)) from doubles; ---- -10.1 0 1.570796326795 +10.1 0 1.5707963267948966 # common subexpr with coalesce (short-circuited) query RRR select f64, coalesce(1.0 / f64, 0.0), acos(coalesce(1.0 / f64, 0.0)) from doubles; ---- -10.1 0.09900990099 1.471623942989 +10.1 0.09900990099009901 1.471623942988976 # common subexpr with coalesce (short-circuited) and alias query RRR select f64, coalesce(1.0 / f64, 0.0) as f64_1, acos(coalesce(1.0 / f64, 0.0)) from doubles; ---- -10.1 0.09900990099 1.471623942989 +10.1 0.09900990099009901 1.471623942988976 # common subexpr with case (short-circuited) query RRR rowsort select f64, case when f64 > 0 then 1.0 / f64 else null end, acos(case when f64 > 0 then 1.0 / f64 else null end) from doubles; ---- -10.1 0.09900990099 1.471623942989 +10.1 0.09900990099009901 1.471623942988976 statement ok diff --git a/datafusion/sqllogictest/test_files/functions.slt b/datafusion/sqllogictest/test_files/functions.slt index 4b770a19fe20c..2b586278b940c 100644 --- a/datafusion/sqllogictest/test_files/functions.slt +++ b/datafusion/sqllogictest/test_files/functions.slt @@ -337,17 +337,17 @@ OPTIONS ('format.has_header' 'true'); query R SELECT avg(sqrt(c11)) FROM aggregate_test_100 ---- -0.658440848589 +0.6584408485889435 query R SELECT avg(CAST(sqrt(c11) AS double)) FROM aggregate_test_100 ---- -0.658440848589 +0.6584408485889435 query R SELECT avg(sqrt(CAST(c11 AS double))) FROM aggregate_test_100 ---- -0.658440848342 +0.6584408483418835 statement ok drop table aggregate_test_100 @@ -372,12 +372,12 @@ create table t as values ( query R SELECT sqrt(column1) FROM t ---- -1.414213562373 +1.4142135623730951 query R SELECT SQRT(column1) FROM t ---- -1.414213562373 +1.4142135623730951 statement error Error during planning: Invalid function 'SQRT' SELECT "SQRT"(column1) FROM t @@ -385,13 +385,13 @@ SELECT "SQRT"(column1) FROM t query R SELECT "sqrt"(column1) FROM t ---- -1.414213562373 +1.4142135623730951 # case_builtin_math_expression query RRRRRRRRRR SELECT sqrt(column1),sqrt(column2),sqrt(column3),sqrt(column4),sqrt(column5),sqrt(column6),sqrt(column7),sqrt(column8),sqrt(column9),sqrt(column10) FROM t ---- -1.414213562373 1.414213562373 1.414213562373 1.414213562373 1.414213562373 1.414213562373 1.414213562373 1.414213562373 1.4142135 1.414213562373 +1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135 1.4142135623730951 statement ok drop table t diff --git a/datafusion/sqllogictest/test_files/group.slt b/datafusion/sqllogictest/test_files/group.slt index a6b5f9b72a53d..81a89807840f6 100644 --- a/datafusion/sqllogictest/test_files/group.slt +++ b/datafusion/sqllogictest/test_files/group.slt @@ -43,11 +43,11 @@ CREATE external table aggregate_simple(c1 real, c2 double, c3 boolean) STORED as query IRR rowsort SELECT c2, MIN(c12), MAX(c12) FROM aggregate_test_100 GROUP BY c2 ---- -1 0.05636955102 0.996540038759 -2 0.163011105157 0.991517828651 -3 0.047343434291 0.929388350248 -4 0.021825780392 0.923787797819 -5 0.014793053078 0.97235803965 +1 0.05636955101974106 0.9965400387585364 +2 0.16301110515739792 0.991517828651004 +3 0.047343434291126085 0.9293883502480845 +4 0.02182578039211991 0.9237877978193884 +5 0.01479305307777301 0.9723580396501548 # csv_query_group_by_float32 query IR @@ -63,11 +63,11 @@ SELECT COUNT(*) as cnt, c1 FROM aggregate_simple GROUP BY c1 ORDER BY cnt DESC query IR SELECT COUNT(*) as cnt, c2 FROM aggregate_simple GROUP BY c2 ORDER BY cnt DESC ---- -5 0.000000000005 -4 0.000000000004 -3 0.000000000003 -2 0.000000000002 -1 0.000000000001 +5 5e-12 +4 4e-12 +3 3e-12 +2 2e-12 +1 1e-12 # csv_query_group_by_boolean query IB @@ -137,21 +137,21 @@ e query TR rowsort SELECT c1, avg(c12) FROM aggregate_test_100 GROUP BY c1 ---- -a 0.487545174661 -b 0.410407092638 -c 0.660045653644 -d 0.488553793875 -e 0.486006692713 +a 0.48754517466109415 +b 0.41040709263815384 +c 0.6600456536439784 +d 0.48855379387549824 +e 0.48600669271341534 # csv_query_group_by_with_aliases query TR rowsort SELECT c1 AS c12, avg(c12) AS c1 FROM aggregate_test_100 GROUP BY c1 ---- -a 0.487545174661 -b 0.410407092638 -c 0.660045653644 -d 0.488553793875 -e 0.486006692713 +a 0.48754517466109415 +b 0.41040709263815384 +c 0.6600456536439784 +d 0.48855379387549824 +e 0.48600669271341534 # csv_query_group_by_int_count query TI rowsort @@ -177,11 +177,11 @@ e 21 query TRR rowsort SELECT c1, MIN(c12), MAX(c12) FROM aggregate_test_100 GROUP BY c1 ---- -a 0.021825780392 0.980019341044 -b 0.04893135682 0.918581397074 -c 0.049492446547 0.991517828651 -d 0.061029375346 0.974836050902 -e 0.014793053078 0.996540038759 +a 0.02182578039211991 0.9800193410444061 +b 0.04893135681998029 0.9185813970744787 +c 0.0494924465469434 0.991517828651004 +d 0.061029375346466685 0.9748360509016578 +e 0.01479305307777301 0.9965400387585364 # Create a table containing null values @@ -356,11 +356,11 @@ FROM aggregate_test_100 GROUP BY substr(c1, 1, 1) ORDER BY substr(c1, 1, 1) ---- -a 0.487545174661 -b 0.410407092638 -c 0.660045653644 -d 0.488553793875 -e 0.486006692713 +a 0.48754517466109415 +b 0.41040709263815384 +c 0.6600456536439784 +d 0.48855379387549824 +e 0.48600669271341534 # csv_query_group_by_order_by_substr_aliased_projection query TR @@ -369,11 +369,11 @@ FROM aggregate_test_100 GROUP BY substr(c1, 1, 1) ORDER BY substr(c1, 1, 1) ---- -a 0.487545174661 -b 0.410407092638 -c 0.660045653644 -d 0.488553793875 -e 0.486006692713 +a 0.48754517466109415 +b 0.41040709263815384 +c 0.6600456536439784 +d 0.48855379387549824 +e 0.48600669271341534 # csv_query_group_by_order_by_avg_group_by_substr query TR @@ -382,8 +382,8 @@ FROM aggregate_test_100 GROUP BY substr(c1, 1, 1) ORDER BY avg(c12) ---- -b 0.410407092638 -e 0.486006692713 -a 0.487545174661 -d 0.488553793875 -c 0.660045653644 +b 0.41040709263815384 +e 0.48600669271341534 +a 0.48754517466109415 +d 0.48855379387549824 +c 0.6600456536439784 diff --git a/datafusion/sqllogictest/test_files/join.slt b/datafusion/sqllogictest/test_files/join.slt index 1feacc5ebe53e..717f66731d979 100644 --- a/datafusion/sqllogictest/test_files/join.slt +++ b/datafusion/sqllogictest/test_files/join.slt @@ -1001,13 +1001,13 @@ CREATE TABLE t3 (v0 DOUBLE) AS VALUES (0.05112015193508901); query RR SELECT t3.v0, t2.v0 FROM t1,t2,t3 WHERE t3.v0 >= t1.v0; ---- -0.051120151935 -1.663563947387 +0.05112015193508901 -1.663563947387 # Test issue: https://github.com/apache/datafusion/issues/11414 query IRR SELECT * FROM t1 INNER JOIN t2 ON NULL RIGHT JOIN t3 ON TRUE; ---- -NULL NULL 0.051120151935 +NULL NULL 0.05112015193508901 # ON expression must be boolean type query error DataFusion error: type_coercion\ncaused by\nError during planning: Join condition must be boolean type, but got Utf8 diff --git a/datafusion/sqllogictest/test_files/math.slt b/datafusion/sqllogictest/test_files/math.slt index e86d78a623538..46c107fe348af 100644 --- a/datafusion/sqllogictest/test_files/math.slt +++ b/datafusion/sqllogictest/test_files/math.slt @@ -92,7 +92,7 @@ SELECT round(125.2345, -3), round(125.2345, -2), round(125.2345, -1), round(125. query RRRRRRR SELECT atan2(2.0, 1.0), atan2(-2.0, 1.0), atan2(2.0, -1.0), atan2(-2.0, -1.0), atan2(NULL, 1.0), atan2(2.0, NULL), atan2(NULL, NULL); ---- -1.107148717794 -1.107148717794 2.034443935796 -2.034443935796 NULL NULL NULL +1.1071487177940904 -1.1071487177940904 2.0344439357957027 -2.0344439357957027 NULL NULL NULL # nanvl query RRR @@ -371,7 +371,7 @@ CREATE TABLE test_nullable_float( query RR rowsort SELECT c1*0, c2*0 FROM test_nullable_float ---- -0 0 +-0 -0 0 0 0 0 NULL NULL @@ -398,7 +398,7 @@ NaN NaN query RR rowsort SELECT c1%1, c2%1 FROM test_nullable_float ---- -0 0 +-0 -0 0 0 0 0 NULL NULL @@ -442,7 +442,7 @@ INSERT INTO test_non_nullable_float VALUES query RR rowsort SELECT c1*0, c2*0 FROM test_non_nullable_float ---- -0 0 +-0 -0 0 0 0 0 NaN NaN @@ -466,7 +466,7 @@ NaN NaN query RR rowsort SELECT c1%1, c2%1 FROM test_non_nullable_float ---- -0 0 +-0 -0 0 0 0 0 NaN NaN diff --git a/datafusion/sqllogictest/test_files/options.slt b/datafusion/sqllogictest/test_files/options.slt index aafaa054964e1..95e732b3c37c0 100644 --- a/datafusion/sqllogictest/test_files/options.slt +++ b/datafusion/sqllogictest/test_files/options.slt @@ -89,7 +89,7 @@ drop table a query RR select 10000000000000000000.01, -10000000000000000000.01 ---- -10000000000000000000 -10000000000000000000 +1e19 -1e19 query TT select arrow_typeof(10000000000000000000.01), arrow_typeof(-10000000000000000000.01) @@ -101,7 +101,7 @@ query IIRIIIR select 0, -9223372036854775808, -9223372036854775809, 9223372036854775807, 9223372036854775808, 18446744073709551615, 18446744073709551616 ---- -0 -9223372036854775808 -9223372036854776000 9223372036854775807 9223372036854775808 18446744073709551615 18446744073709552000 +0 -9223372036854775808 -9.223372036854776e18 9223372036854775807 9223372036854775808 18446744073709551615 1.8446744073709552e19 query TTTTTTT select arrow_typeof(0), arrow_typeof(-9223372036854775808), arrow_typeof(-9223372036854775809), diff --git a/datafusion/sqllogictest/test_files/order.slt b/datafusion/sqllogictest/test_files/order.slt index a46040aa532ed..30873fe7f5adc 100644 --- a/datafusion/sqllogictest/test_files/order.slt +++ b/datafusion/sqllogictest/test_files/order.slt @@ -57,7 +57,7 @@ SELECT id FROM alltypes_plain ORDER BY int_col, double_col query R SELECT MIN(c12) FROM aggregate_test_100 ORDER BY MIN(c12) ---- -0.014793053078 +0.01479305307777301 # test_nulls_first_asc diff --git a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_simple.slt b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_simple.slt index 25b4924715caa..4e8c51289b91b 100644 --- a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_simple.slt +++ b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_simple.slt @@ -73,15 +73,15 @@ OPTIONS ('format.has_header' 'true'); -query RRRRR +query RBBBB SELECT abs(-1.1) as abs, - exp(2.0) as exp, - sin(3.0) as sin, - cos(4.0) as cos, - tan(5.0) as tan; + abs(exp(2.0) - 7.38905609893065) < 1e-14, + abs(sin(3.0) - 0.1411200080598672) < 1e-14, + abs(cos(4.0) - (-0.6536436208636119)) < 1e-14, + abs(tan(5.0) - (-3.380515006246585)) < 1e-14; ---- -1.1 7.389056098931 0.14112000806 -0.653643620864 -3.380515006247 +1.1 true true true true query I @@ -341,11 +341,17 @@ FROM aggregate_test_100_by_sql; 100 100 7.81 781 125 -117 0 -1 -61 -query IIRIIIIII +query IIBIIIIII select c2, sum(c3) sum_c3, - avg(c3) avg_c3, + abs(avg(c3) - CASE + WHEN c2 = 1 THEN 16.681818181818183 + WHEN c2 = 2 THEN 8.363636363636363 + WHEN c2 = 3 THEN 20.789473684210527 + WHEN c2 = 4 THEN 1.2608695652173914 + WHEN c2 = 5 THEN -13.857142857142858 + END) < 1e-14 avg_c3, max(c3) max_c3, min(c3) min_c3, count(c3) count_c3, @@ -356,11 +362,11 @@ from aggregate_test_100_by_sql group by c2 order by c2; ---- -1 367 16.681818181818 125 -99 22 0 -1 -47 -2 184 8.363636363636 122 -117 22 0 -1 -2 -3 395 20.789473684211 123 -101 19 0 -1 101 -4 29 1.260869565217 123 -117 23 0 -1 15 -5 -194 -13.857142857143 118 -101 14 0 -1 -122 +1 367 true 125 -99 22 0 -1 -47 +2 184 true 122 -117 22 0 -1 -2 +3 395 true 123 -101 19 0 -1 101 +4 29 true 123 -117 23 0 -1 15 +5 -194 true 118 -101 14 0 -1 -122 query I @@ -477,106 +483,106 @@ query TIIIIIIIITRRT select * from aggregate_test_100_by_sql order by c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13; ---- -a 1 -85 -15154 1171968280 1919439543497968449 77 52286 774637006 12101411955859039553 0.12285209 0.686439196277 0keZ5G8BffGwgF2RwQD59TFzMStxCB -a 1 -56 8692 2106705285 -7811675384226570375 231 15573 1454057357 677091006469429514 0.42794758 0.273993852924 JN0VclewmjwYlSl8386MlWv5rEhWCz -a 1 -25 15295 383352709 4980135132406487265 231 102 3276123488 12763583666216333412 0.53796273 0.17592486906 XemNcT1xp61xcM1Qz3wZ1VECCnq06O -a 1 -5 12636 794623392 2909750622865366631 15 24022 2669374863 4776679784701509574 0.29877836 0.253725340799 waIGbOGl1PM6gnzZ4uuZt4E2yDWRHs -a 1 83 -14704 2143473091 -4387559599038777245 37 829 4015442341 4602675983996931623 0.89542526 0.956759554125 ErJFw6hzZ5fmI5r8bhE4JzlscnhKZU -a 2 -48 -18025 439738328 -313657814587041987 222 13763 3717551163 9135746610908713318 0.055064857 0.980019341044 ukyD7b0Efj7tNlFSRmzZ0IqkEzg2a8 -a 2 -43 13080 370975815 5881039805148485053 2 20120 2939920218 906367167997372130 0.42733806 0.163011105157 m6jD0LBIQWaMfenwRCTANI9eOdyyto -a 2 45 15673 -1899175111 398282800995316041 99 2555 145294611 8554426087132697832 0.17333257 0.640526242956 b3b9esRhTzFEawbs6XhpKnD9ojutHB -a 3 -72 -11122 -2141451704 -2578916903971263854 83 30296 1995343206 17452974532402389080 0.94209343 0.323175061008 e2Gh6Ov8XkXoFdJWhl0EjwEHlMDYyG -a 3 -12 -9168 1489733240 -1569376002217735076 206 33821 3959216334 16060348691054629425 0.9488028 0.929388350248 oLZ21P2JEDooxV1pU31cIxQHEeeoLu -a 3 13 12613 1299719633 2020498574254265315 191 17835 3998790955 14881411008939145569 0.041445434 0.881316749782 Amn2K87Db5Es3dFQO9cw9cvpAM6h35 -a 3 13 32064 912707948 3826618523497875379 42 21463 2214035726 10771380284714693539 0.6133468 0.732510667866 i6RQVXKUh7MzuGMDaNclUYnFUAireU -a 3 14 28162 397430452 -452851601758273256 57 14722 431948861 8164671015278284913 0.40199697 0.072604759609 TtDKUZxzVxsq758G6AWPSYuZgVgbcl -a 3 17 -22796 1337043149 -1282905594104562444 167 2809 754775609 732272194388185106 0.3884129 0.65867112904 VDhtJkYjAYPykCgOU9x3v7v3t4SO1a -a 4 -101 11640 1993193190 2992662416070659899 230 40566 466439833 16778113360088370541 0.3991115 0.574210838215 NEhyk8uIx4kEULJGa8qIyFjjBcP2G6 -a 4 -54 -2376 434021400 5502271306323260832 113 15777 2502326480 7966148640299601101 0.5720931 0.305853751513 KJFcmTVjdkCMv94wYCtfHMFhzyRsmH -a 4 -38 20744 762932956 308913475857409919 7 45465 1787652631 878137512938218976 0.7459874 0.021825780392 ydkwycaISlYSlEq3TlkS2m15I2pcp8 -a 4 65 -28462 -1813935549 7602389238442209730 18 363 1865307672 11378396836996498283 0.09130204 0.559324981528 WHmjWk2AY4c6m7DA4GitUx6nmb1yYS -a 5 -101 -12484 -842693467 -6140627905445351305 57 57885 2496054700 2243924747182709810 0.59520596 0.949139743286 QJYm7YRA3YetcBHI5wkMZeLXVmfuNy -a 5 -31 -12907 586844478 -4862189775214031241 170 28086 1013876852 11005002152861474932 0.35319167 0.055736622134 MeSTAXq8gVxVjbEjgkvU9YLte0X9uE -a 5 36 -16974 623103518 6834444206535996609 71 29458 141047417 17448660630302620693 0.17100024 0.044290730921 OF7fQ37GzaZ5ikA2oMyvleKtgnLjXh -b 1 12 7652 -1448995523 -5332734971209541785 136 49283 4076864659 15449267433866484283 0.6214579 0.05636955102 akiiY5N0I44CMwEnBL6RTBk7BRkxEj -b 1 29 -18218 994303988 5983957848665088916 204 9489 3275293996 14857091259186476033 0.53840446 0.179090351188 AyYVExXK6AR2qUTxNZ7qRHQOVGMLcz -b 1 54 -18410 1413111008 -7145106120930085900 249 5382 1842680163 17818611040257178339 0.8881188 0.248997943147 6FPJlLAcaQ5uokyOWZ9HGdLZObFvOZ -b 2 -60 -21739 -1908480893 -8897292622858103761 59 50009 2525744318 1719090662556698549 0.52930677 0.560333188635 l7uwDoTepWwnAP0ufqtHJS3CRi7RfP -b 2 31 23127 -800561771 -8706387435232961848 153 27034 1098639440 3343692635488765507 0.35692692 0.559020554835 okOkcWflkNXIy4R8LzmySyY1EC3sYd -b 2 63 21456 -2138770630 -2380041687053733364 181 57594 2705709344 13144161537396946288 0.09683716 0.305136408881 nYVJnVicpGRqKZibHyBAmtmzBXAFfT -b 2 68 15874 49866617 1179733259727844435 121 23948 3455216719 3898128009708892708 0.6306253 0.918581397074 802bgTGl6Bk5TlkPYYTxp5JkKyaYUA -b 3 -101 -13217 -346989627 5456800329302529236 26 54276 243203849 17929716297117857676 0.05422181 0.094656351238 MXhhH1Var3OzzJCtI9VNyYvA0q8UyJ -b 3 17 14457 670497898 -2390782464845307388 255 24770 1538863055 12662506238151717757 0.34077626 0.76143041007 6x93sxYioWuq5c9Kkk8oTAAORM7cH0 -b 4 -117 19316 2051224722 -5534418579506232438 133 52046 3023531799 13684453606722360110 0.62608826 0.850672105305 mhjME0zBHbrK6NMkytMTQzOssOa1gF -b 4 -111 -1967 -4229382 1892872227362838079 67 9832 1243785310 8382489916947120498 0.06563997 0.152498292972 Sfx0vxv1skzZWT1PqVdoRDdO6Sb6xH -b 4 -59 25286 1423957796 2646602445954944051 0 61069 3570297463 15100310750150419896 0.49619365 0.04893135682 fuyvs0w7WsKSlXqJ1e6HFSoLmx03AG -b 4 17 -28070 -673237643 1904316899655860234 188 27744 933879086 3732692885824435932 0.41860116 0.403422831978 JHNgc2UCaiXOdmkxwDDyGhRlO0mnBQ -b 4 47 20690 -1009656194 -2027442591571700798 200 7781 326151275 2881913079548128905 0.57360977 0.214523264739 52mKlRE3aHCBZtjECq6sY9OqVf8Dze -b 5 -82 22080 1824882165 7373730676428214987 208 34331 3342719438 3330177516592499461 0.82634634 0.409753835253 Ig1QcuKsjHXkproePdERo2w0mYzIqd -b 5 -44 15788 -629486480 5822642169425315613 13 11872 3457053821 2413406423648025909 0.44318348 0.328693746871 ALuRhobVWbnQTTWZdSOk0iVe8oYFhW -b 5 -5 24896 1955646088 2430204191283109071 118 43655 2424630722 11429640193932435507 0.87989986 0.732805004129 JafwVLSVk5AVoXFuzclesQ000EE2k1 -b 5 62 16337 41423756 -2274773899098124524 121 34206 2307004493 10575647935385523483 0.23794776 0.175426158671 qnPOOmslCJaT45buUisMRnM0rc77EK -b 5 68 21576 1188285940 5717755781990389024 224 27600 974297360 9865419128970328044 0.80895734 0.7973920073 ioEncce3mPOXD2hWhpZpCPWGATG6GU -c 1 -24 -24085 -1882293856 7385529783747709716 41 48048 520189543 2402288956117186783 0.39761502 0.360076636233 Fi4rJeTQq4eXj8Lxg3Hja5hBVTVV5u -c 1 41 -4667 -644225469 7049620391314639084 196 48099 2125812933 15419512479294091215 0.5780736 0.925503134643 mzbkwXKrPeZnxg2Kn1LRF5hYSsmksS -c 1 70 27752 1325868318 1241882478563331892 63 61637 473294098 4976799313755010034 0.13801557 0.508176556344 Ktb7GQ0N1DrxwkCkEUsTaIXk0xYinn -c 1 103 -22186 431378678 1346564663822463162 146 12393 3766999078 10901819591635583995 0.064453244 0.77849189835 2T3wSlHdEmASmO0xcXHnndkKEt6bz8 -c 2 -117 -30187 -1222533990 -191957437217035800 136 47061 2293105904 12659011877190539078 0.2047385 0.970671228336 pLk3i59bZwd5KBZrI1FiweYTd5hteG -c 2 -107 -2904 -1011669561 782342092880993439 18 29527 1157161427 4403623840168496677 0.31988364 0.369363046006 QYlaIAnJA6r8rlAb6f59wcxvcPcWFf -c 2 -106 -1114 -1927628110 1080308211931669384 177 20421 141680161 7464432081248293405 0.56749094 0.56535284223 Vp3gmWunM5A7wOC9YW2JroFqTWjvTi -c 2 -60 -16312 -1808210365 -3368300253197863813 71 39635 2844041986 7045482583778080653 0.805363 0.642569411521 BJqx5WokrmrrezZA0dUbleMYkG5U2O -c 2 -29 25305 -537142430 -7683452043175617798 150 31648 598822671 11759014161799384683 0.8315913 0.946325164889 9UbObCsVkmYpJGcGrgfK90qOnwb2Lj -c 2 1 18109 2033001162 -6513304855495910254 25 43062 1491205016 5863949479783605708 0.110830784 0.929409733247 6WfVFBVGJSQb7FhA7E0lBwdvjfZnSW -c 2 29 -3855 1354539333 4742062657200940467 81 53815 3398507249 562977550464243101 0.7124534 0.991517828651 Oq6J4Rx6nde0YlhOIJkFsX2MsSvAQ0 -c 3 -2 -18655 -2141999138 -3154042970870838072 251 34970 3862393166 13062025193350212516 0.034291923 0.769775338342 IWl0G3ZlMNf7WT8yjIB49cx7MmYOmr -c 3 22 13741 -2098805236 8604102724776612452 45 2516 1362369177 196777795886465166 0.94669616 0.049492446547 6oIXZuIPIqEoPBvFmbt2Nxy3tryGUE -c 3 73 -9565 -382483011 1765659477910680019 186 1535 1088543984 2906943497598597237 0.680652 0.600947554473 Ow5PGpfTm4dXCfTDsXAOTatXRoAydR -c 3 97 29106 -903316089 2874859437662206732 207 42171 3473924576 8188072741116415408 0.32792538 0.266717779508 HKSMQ9nTnwXCJIte1JrM1dtYnDtJ8g -c 4 -90 -2935 1579876740 6733733506744649678 254 12876 3593959807 4094315663314091142 0.5708688 0.560306236816 Ld2ej8NEv5zNcqU60FwpHeZKBhfpiV -c 4 -79 5281 -237425046 373011991904079451 121 55620 2818832252 2464584078983135763 0.49774808 0.923787797819 t6fQUjJejPcjc04wHvHTPe55S65B4V -c 4 3 -30508 659422734 -6455460736227846736 133 59663 2306130875 8622584762448622224 0.16999894 0.427312331893 EcCuckwsF3gV1Ecgmh5v4KM8g1ozif -c 4 123 16620 852509237 -3087630526856906991 196 33715 3566741189 4546434653720168472 0.07606989 0.81971586508 8LIh0b6jmDGm87BmIyjdxNIpX4ugjD -c 5 -94 -15880 2025611582 -3348824099853919681 5 40622 4268716378 12849419495718510869 0.34163946 0.483087855944 RilTlL1tKkPOUFuzmLydHAVZwv1OGl -c 5 118 19208 -134213907 -2120241105523909127 86 57751 1229567292 16493024289408725403 0.5536642 0.97235803965 TTQUwpMNSXZqVBKAFvXu7OlWvKXJKX -d 1 -99 5613 1213926989 -8863698443222021480 19 18736 4216440507 14933742247195536130 0.6067944 0.336395906593 aDxBtor7Icd9C5hnTvvw5NrIre740e -d 1 -98 13630 -1991133944 1184110014998006843 220 2986 225513085 9634106610243643486 0.89651865 0.164088254508 y7C453hRWd4E7ImjNDWlpexB8nUqjh -d 1 -72 25590 1188089983 3090286296481837049 241 832 3542840110 5885937420286765261 0.41980565 0.215354023438 wwXqSGKLyBQyPkonlzBNYUJTCo4LRS -d 1 -8 27138 -1383162419 7682021027078563072 36 64517 2861376515 9904216782086286050 0.80954456 0.946309824388 AFGCj7OWlEB5QfniEFgonMq90Tq5uH -d 1 38 18384 -335410409 -1632237090406591229 26 57510 2712615025 1842662804748246269 0.6064476 0.640449509335 4HX6feIvmNXBN7XGqgO4YVBkhu8GDI -d 1 57 28781 -1143802338 2662536767954229885 202 62167 879082834 4338034436871150616 0.7618384 0.429505217308 VY0zXmXeksCT8BzvpzpPLbmU9Kp9Y4 -d 1 125 31106 -1176490478 -4306856842351827308 90 17910 3625286410 17869394731126786457 0.8882508 0.763123907005 dVdvo6nUD5FgCgsbOZLds28RyGTpnx -d 2 93 -12642 2053379412 6468763445799074329 147 50842 1000948272 5536487915963301239 0.4279275 0.285344285787 lqhzgLsXZ8JhtpeeUWWNbMz8PHI705 -d 2 113 3917 -108973366 -7220140168410319165 197 24380 63044568 4225581724448081782 0.11867094 0.294415861805 90gAtmGEeIqUTbo1ZrxCvWtsseukXC -d 2 122 10130 -168758331 -3179091803916845592 30 794 4061635107 15695681119022625322 0.69592506 0.974836050902 OPwBqCEK5PWTjWaiOyL45u2NLTaDWv -d 3 -76 8809 141218956 -9110406195556445909 58 5494 1824517658 12046662515387914426 0.8557294 0.666842389741 Z2sWcQr0qyCJRMHDpRy3aQr7PkHtkK -d 3 77 15091 -1302295658 8795481303066536947 154 35477 2093538928 17419098323248948387 0.11952883 0.703563528317 O66j6PaYuZhEUtqV6fuU7TyjM2WxC5 -d 3 123 29533 240273900 1176001466590906949 117 30972 2592330556 12883447461717956514 0.39075065 0.38870280984 1aOcrEGd0cOqZe2I5XBOm0nDcwtBZO -d 4 5 -7688 702611616 6239356364381313700 4 39363 3126475872 35363005357834672 0.3766935 0.061029375346 H5j5ZHy1FGesOAHjkQEDYCucbpKWRu -d 4 55 -1471 1902023838 1252101628560265705 157 3691 811650497 1524771507450695976 0.2968701 0.543759554042 f9ALCzwDAKmdu7Rk2msJaB1wxe5IBX -d 4 102 -24558 1991172974 -7823479531661596016 14 36599 1534194097 2240998421986827216 0.028003037 0.88248794476 0og6hSkhbX8AC1ktFS4kounvTzy8Vo -d 5 -59 2045 -2117946883 1170799768349713170 189 63353 1365198901 2501626630745849169 0.75173044 0.186288592659 F7NSTjWvQJyBburN7CXRUlbgp2dIrA -d 5 -40 22614 706441268 -7542719935673075327 155 14337 3373581039 11720144131976083864 0.69632107 0.311471253986 C2GT5KVyOPZpgKVl110TyZO0NcJ434 -e 1 36 -21481 -928766616 -3471238138418013024 150 52569 2610290479 7788847578701297242 0.2578469 0.767002178615 gpo8K5qtYePve6jyPt6xgJx4YOVjms -e 1 71 -5479 -1339586153 -3920238763788954243 123 53012 4229654142 10297218950720052365 0.73473036 0.577349821706 cBGc0kSm32ylBDnxogG727C0uhZEYZ -e 1 120 10837 -1331533190 6342019705133850847 245 3975 2830981072 16439861276703750332 0.6623719 0.996540038759 LiEBxds3X0Uw0lxiYjDqrkAaAwoiIW -e 2 -61 -2888 -1660426473 2553892468492435401 126 35429 4144173353 939909697866979632 0.4405142 0.923188989694 BPtQMxnuSPpxMExYV9YkDa6cAN7GP3 -e 2 49 24495 -587831330 9178511478067509438 129 12757 1289293657 10948666249269100825 0.5610077 0.59911381151 bgK1r6v3BCTh0aejJUhkA1Hn6idXGp -e 2 52 -12056 -1090239422 9011500141803970147 238 4168 2013662838 12565360638488684051 0.6694766 0.391444365692 xipQ93429ksjNcXPX5326VSg1xJZcW -e 2 52 23388 715235348 605432070100399212 165 56980 3314983189 7386391799827871203 0.46076488 0.98080963127 jQimhdepw3GKmioWUlVSWeBVRKFkY3 -e 2 97 18167 1593800404 -9112448817105133638 163 45185 3188005828 2792105417953811674 0.38175434 0.409421835359 ukOiFGGFnQJDHFgZxHMpvhD3zybF0M -e 3 -95 13611 2030965207 927403809957470678 119 59134 559847112 10966649192992996919 0.5301289 0.047343434291 gTpyQnEODMcpsPnJMZC66gh33i3m0b -e 3 71 194 1436496767 -5639533800082367925 158 44507 3105312559 3998472996619161534 0.930117 0.610893830753 pTeu0WMjBRTaNRT15rLCuEh3tBJVc5 -e 3 104 -25136 1738331255 300633854973581194 139 20807 3577318119 13079037564113702254 0.40154034 0.776436099031 DuJNG8tufSqW0ZstHqWj3aGvFLMg4A -e 3 112 -6823 -421042466 8535335158538929274 129 32712 3759340273 9916295859593918600 0.6424343 0.631656529655 BsM5ZAYifRh5Lw3Y8X1r53I0cTJnfE -e 4 -56 -31500 1544188174 3096047390018154410 220 417 557517119 2774306934041974261 0.15459597 0.191132935833 IZTkHMLvIKuiLjhDjYMmIHxh166we4 -e 4 -53 13788 2064155045 -691093532952651300 243 35106 2778168728 9463973906560740422 0.34515214 0.271591905165 0VVIHzxWtNOFLtnhjHEKjXaJOSLJfm -e 4 30 -16110 61035129 -3356533792537910152 159 299 28774375 13526465947516666293 0.6999775 0.039683470858 cq4WSAIFwx3wwTUS5bp1wCe71R6U5I -e 4 73 -22501 1282464673 2541794052864382235 67 21119 538589788 9575476605699527641 0.48515016 0.296036538665 4JznSdBajNWhu4hRQwjV1FjTTxY68i -e 4 74 -12612 -1885422396 1702850374057819332 130 3583 3198969145 10767179755613315144 0.5518061 0.561450375462 QEHVvcP8gxI6EMJIrvcnIhgzPNjIvv -e 4 96 -30336 427197269 7506304308750926996 95 48483 3521368277 5437030162957481122 0.58104324 0.420731253319 3BEOHQsMEFZ58VcNTOJYShTBpAPzbt -e 4 97 -13181 2047637360 6176835796788944083 158 53000 2042457019 9726016502640071617 0.7085086 0.123575399884 oHJMNvWuunsIMIWFnYG31RCfkOo2V7 -e 5 -86 32514 -467659022 -8012578250188146150 254 2684 2861911482 2126626171973341689 0.12559289 0.014793053078 gxfHWUF8XgY2KdFxigxvNEXe2V2XMl -e 5 64 -26526 1689098844 8950618259486183091 224 45253 662099130 16127995415060805595 0.2897315 0.575945048386 56MZa5O1hVtX4c5sbnCfxuX5kDChqI +a 1 -85 -15154 1171968280 1919439543497968449 77 52286 774637006 12101411955859039553 0.12285209 0.6864391962767343 0keZ5G8BffGwgF2RwQD59TFzMStxCB +a 1 -56 8692 2106705285 -7811675384226570375 231 15573 1454057357 677091006469429514 0.42794758 0.2739938529235548 JN0VclewmjwYlSl8386MlWv5rEhWCz +a 1 -25 15295 383352709 4980135132406487265 231 102 3276123488 12763583666216333412 0.53796273 0.17592486905979987 XemNcT1xp61xcM1Qz3wZ1VECCnq06O +a 1 -5 12636 794623392 2909750622865366631 15 24022 2669374863 4776679784701509574 0.29877836 0.2537253407987472 waIGbOGl1PM6gnzZ4uuZt4E2yDWRHs +a 1 83 -14704 2143473091 -4387559599038777245 37 829 4015442341 4602675983996931623 0.89542526 0.9567595541247681 ErJFw6hzZ5fmI5r8bhE4JzlscnhKZU +a 2 -48 -18025 439738328 -313657814587041987 222 13763 3717551163 9135746610908713318 0.055064857 0.9800193410444061 ukyD7b0Efj7tNlFSRmzZ0IqkEzg2a8 +a 2 -43 13080 370975815 5881039805148485053 2 20120 2939920218 906367167997372130 0.42733806 0.16301110515739792 m6jD0LBIQWaMfenwRCTANI9eOdyyto +a 2 45 15673 -1899175111 398282800995316041 99 2555 145294611 8554426087132697832 0.17333257 0.6405262429561641 b3b9esRhTzFEawbs6XhpKnD9ojutHB +a 3 -72 -11122 -2141451704 -2578916903971263854 83 30296 1995343206 17452974532402389080 0.94209343 0.3231750610081745 e2Gh6Ov8XkXoFdJWhl0EjwEHlMDYyG +a 3 -12 -9168 1489733240 -1569376002217735076 206 33821 3959216334 16060348691054629425 0.9488028 0.9293883502480845 oLZ21P2JEDooxV1pU31cIxQHEeeoLu +a 3 13 12613 1299719633 2020498574254265315 191 17835 3998790955 14881411008939145569 0.041445434 0.8813167497816289 Amn2K87Db5Es3dFQO9cw9cvpAM6h35 +a 3 13 32064 912707948 3826618523497875379 42 21463 2214035726 10771380284714693539 0.6133468 0.7325106678655877 i6RQVXKUh7MzuGMDaNclUYnFUAireU +a 3 14 28162 397430452 -452851601758273256 57 14722 431948861 8164671015278284913 0.40199697 0.07260475960924484 TtDKUZxzVxsq758G6AWPSYuZgVgbcl +a 3 17 -22796 1337043149 -1282905594104562444 167 2809 754775609 732272194388185106 0.3884129 0.658671129040488 VDhtJkYjAYPykCgOU9x3v7v3t4SO1a +a 4 -101 11640 1993193190 2992662416070659899 230 40566 466439833 16778113360088370541 0.3991115 0.574210838214554 NEhyk8uIx4kEULJGa8qIyFjjBcP2G6 +a 4 -54 -2376 434021400 5502271306323260832 113 15777 2502326480 7966148640299601101 0.5720931 0.30585375151301186 KJFcmTVjdkCMv94wYCtfHMFhzyRsmH +a 4 -38 20744 762932956 308913475857409919 7 45465 1787652631 878137512938218976 0.7459874 0.02182578039211991 ydkwycaISlYSlEq3TlkS2m15I2pcp8 +a 4 65 -28462 -1813935549 7602389238442209730 18 363 1865307672 11378396836996498283 0.09130204 0.5593249815276734 WHmjWk2AY4c6m7DA4GitUx6nmb1yYS +a 5 -101 -12484 -842693467 -6140627905445351305 57 57885 2496054700 2243924747182709810 0.59520596 0.9491397432856566 QJYm7YRA3YetcBHI5wkMZeLXVmfuNy +a 5 -31 -12907 586844478 -4862189775214031241 170 28086 1013876852 11005002152861474932 0.35319167 0.05573662213439634 MeSTAXq8gVxVjbEjgkvU9YLte0X9uE +a 5 36 -16974 623103518 6834444206535996609 71 29458 141047417 17448660630302620693 0.17100024 0.04429073092078406 OF7fQ37GzaZ5ikA2oMyvleKtgnLjXh +b 1 12 7652 -1448995523 -5332734971209541785 136 49283 4076864659 15449267433866484283 0.6214579 0.05636955101974106 akiiY5N0I44CMwEnBL6RTBk7BRkxEj +b 1 29 -18218 994303988 5983957848665088916 204 9489 3275293996 14857091259186476033 0.53840446 0.17909035118828576 AyYVExXK6AR2qUTxNZ7qRHQOVGMLcz +b 1 54 -18410 1413111008 -7145106120930085900 249 5382 1842680163 17818611040257178339 0.8881188 0.24899794314659673 6FPJlLAcaQ5uokyOWZ9HGdLZObFvOZ +b 2 -60 -21739 -1908480893 -8897292622858103761 59 50009 2525744318 1719090662556698549 0.52930677 0.560333188635217 l7uwDoTepWwnAP0ufqtHJS3CRi7RfP +b 2 31 23127 -800561771 -8706387435232961848 153 27034 1098639440 3343692635488765507 0.35692692 0.5590205548347534 okOkcWflkNXIy4R8LzmySyY1EC3sYd +b 2 63 21456 -2138770630 -2380041687053733364 181 57594 2705709344 13144161537396946288 0.09683716 0.3051364088814128 nYVJnVicpGRqKZibHyBAmtmzBXAFfT +b 2 68 15874 49866617 1179733259727844435 121 23948 3455216719 3898128009708892708 0.6306253 0.9185813970744787 802bgTGl6Bk5TlkPYYTxp5JkKyaYUA +b 3 -101 -13217 -346989627 5456800329302529236 26 54276 243203849 17929716297117857676 0.05422181 0.09465635123783445 MXhhH1Var3OzzJCtI9VNyYvA0q8UyJ +b 3 17 14457 670497898 -2390782464845307388 255 24770 1538863055 12662506238151717757 0.34077626 0.7614304100703713 6x93sxYioWuq5c9Kkk8oTAAORM7cH0 +b 4 -117 19316 2051224722 -5534418579506232438 133 52046 3023531799 13684453606722360110 0.62608826 0.8506721053047003 mhjME0zBHbrK6NMkytMTQzOssOa1gF +b 4 -111 -1967 -4229382 1892872227362838079 67 9832 1243785310 8382489916947120498 0.06563997 0.152498292971736 Sfx0vxv1skzZWT1PqVdoRDdO6Sb6xH +b 4 -59 25286 1423957796 2646602445954944051 0 61069 3570297463 15100310750150419896 0.49619365 0.04893135681998029 fuyvs0w7WsKSlXqJ1e6HFSoLmx03AG +b 4 17 -28070 -673237643 1904316899655860234 188 27744 933879086 3732692885824435932 0.41860116 0.40342283197779727 JHNgc2UCaiXOdmkxwDDyGhRlO0mnBQ +b 4 47 20690 -1009656194 -2027442591571700798 200 7781 326151275 2881913079548128905 0.57360977 0.2145232647388039 52mKlRE3aHCBZtjECq6sY9OqVf8Dze +b 5 -82 22080 1824882165 7373730676428214987 208 34331 3342719438 3330177516592499461 0.82634634 0.40975383525297016 Ig1QcuKsjHXkproePdERo2w0mYzIqd +b 5 -44 15788 -629486480 5822642169425315613 13 11872 3457053821 2413406423648025909 0.44318348 0.32869374687050157 ALuRhobVWbnQTTWZdSOk0iVe8oYFhW +b 5 -5 24896 1955646088 2430204191283109071 118 43655 2424630722 11429640193932435507 0.87989986 0.7328050041291218 JafwVLSVk5AVoXFuzclesQ000EE2k1 +b 5 62 16337 41423756 -2274773899098124524 121 34206 2307004493 10575647935385523483 0.23794776 0.1754261586710173 qnPOOmslCJaT45buUisMRnM0rc77EK +b 5 68 21576 1188285940 5717755781990389024 224 27600 974297360 9865419128970328044 0.80895734 0.7973920072996036 ioEncce3mPOXD2hWhpZpCPWGATG6GU +c 1 -24 -24085 -1882293856 7385529783747709716 41 48048 520189543 2402288956117186783 0.39761502 0.3600766362333053 Fi4rJeTQq4eXj8Lxg3Hja5hBVTVV5u +c 1 41 -4667 -644225469 7049620391314639084 196 48099 2125812933 15419512479294091215 0.5780736 0.9255031346434324 mzbkwXKrPeZnxg2Kn1LRF5hYSsmksS +c 1 70 27752 1325868318 1241882478563331892 63 61637 473294098 4976799313755010034 0.13801557 0.5081765563442366 Ktb7GQ0N1DrxwkCkEUsTaIXk0xYinn +c 1 103 -22186 431378678 1346564663822463162 146 12393 3766999078 10901819591635583995 0.064453244 0.7784918983501654 2T3wSlHdEmASmO0xcXHnndkKEt6bz8 +c 2 -117 -30187 -1222533990 -191957437217035800 136 47061 2293105904 12659011877190539078 0.2047385 0.9706712283358269 pLk3i59bZwd5KBZrI1FiweYTd5hteG +c 2 -107 -2904 -1011669561 782342092880993439 18 29527 1157161427 4403623840168496677 0.31988364 0.36936304600612724 QYlaIAnJA6r8rlAb6f59wcxvcPcWFf +c 2 -106 -1114 -1927628110 1080308211931669384 177 20421 141680161 7464432081248293405 0.56749094 0.565352842229935 Vp3gmWunM5A7wOC9YW2JroFqTWjvTi +c 2 -60 -16312 -1808210365 -3368300253197863813 71 39635 2844041986 7045482583778080653 0.805363 0.6425694115212065 BJqx5WokrmrrezZA0dUbleMYkG5U2O +c 2 -29 25305 -537142430 -7683452043175617798 150 31648 598822671 11759014161799384683 0.8315913 0.946325164889271 9UbObCsVkmYpJGcGrgfK90qOnwb2Lj +c 2 1 18109 2033001162 -6513304855495910254 25 43062 1491205016 5863949479783605708 0.110830784 0.9294097332465232 6WfVFBVGJSQb7FhA7E0lBwdvjfZnSW +c 2 29 -3855 1354539333 4742062657200940467 81 53815 3398507249 562977550464243101 0.7124534 0.991517828651004 Oq6J4Rx6nde0YlhOIJkFsX2MsSvAQ0 +c 3 -2 -18655 -2141999138 -3154042970870838072 251 34970 3862393166 13062025193350212516 0.034291923 0.7697753383420857 IWl0G3ZlMNf7WT8yjIB49cx7MmYOmr +c 3 22 13741 -2098805236 8604102724776612452 45 2516 1362369177 196777795886465166 0.94669616 0.0494924465469434 6oIXZuIPIqEoPBvFmbt2Nxy3tryGUE +c 3 73 -9565 -382483011 1765659477910680019 186 1535 1088543984 2906943497598597237 0.680652 0.6009475544728957 Ow5PGpfTm4dXCfTDsXAOTatXRoAydR +c 3 97 29106 -903316089 2874859437662206732 207 42171 3473924576 8188072741116415408 0.32792538 0.2667177795079635 HKSMQ9nTnwXCJIte1JrM1dtYnDtJ8g +c 4 -90 -2935 1579876740 6733733506744649678 254 12876 3593959807 4094315663314091142 0.5708688 0.5603062368164834 Ld2ej8NEv5zNcqU60FwpHeZKBhfpiV +c 4 -79 5281 -237425046 373011991904079451 121 55620 2818832252 2464584078983135763 0.49774808 0.9237877978193884 t6fQUjJejPcjc04wHvHTPe55S65B4V +c 4 3 -30508 659422734 -6455460736227846736 133 59663 2306130875 8622584762448622224 0.16999894 0.4273123318932347 EcCuckwsF3gV1Ecgmh5v4KM8g1ozif +c 4 123 16620 852509237 -3087630526856906991 196 33715 3566741189 4546434653720168472 0.07606989 0.819715865079681 8LIh0b6jmDGm87BmIyjdxNIpX4ugjD +c 5 -94 -15880 2025611582 -3348824099853919681 5 40622 4268716378 12849419495718510869 0.34163946 0.4830878559436823 RilTlL1tKkPOUFuzmLydHAVZwv1OGl +c 5 118 19208 -134213907 -2120241105523909127 86 57751 1229567292 16493024289408725403 0.5536642 0.9723580396501548 TTQUwpMNSXZqVBKAFvXu7OlWvKXJKX +d 1 -99 5613 1213926989 -8863698443222021480 19 18736 4216440507 14933742247195536130 0.6067944 0.33639590659276175 aDxBtor7Icd9C5hnTvvw5NrIre740e +d 1 -98 13630 -1991133944 1184110014998006843 220 2986 225513085 9634106610243643486 0.89651865 0.1640882545084913 y7C453hRWd4E7ImjNDWlpexB8nUqjh +d 1 -72 25590 1188089983 3090286296481837049 241 832 3542840110 5885937420286765261 0.41980565 0.21535402343780985 wwXqSGKLyBQyPkonlzBNYUJTCo4LRS +d 1 -8 27138 -1383162419 7682021027078563072 36 64517 2861376515 9904216782086286050 0.80954456 0.9463098243875633 AFGCj7OWlEB5QfniEFgonMq90Tq5uH +d 1 38 18384 -335410409 -1632237090406591229 26 57510 2712615025 1842662804748246269 0.6064476 0.6404495093354053 4HX6feIvmNXBN7XGqgO4YVBkhu8GDI +d 1 57 28781 -1143802338 2662536767954229885 202 62167 879082834 4338034436871150616 0.7618384 0.42950521730777025 VY0zXmXeksCT8BzvpzpPLbmU9Kp9Y4 +d 1 125 31106 -1176490478 -4306856842351827308 90 17910 3625286410 17869394731126786457 0.8882508 0.7631239070049998 dVdvo6nUD5FgCgsbOZLds28RyGTpnx +d 2 93 -12642 2053379412 6468763445799074329 147 50842 1000948272 5536487915963301239 0.4279275 0.28534428578703896 lqhzgLsXZ8JhtpeeUWWNbMz8PHI705 +d 2 113 3917 -108973366 -7220140168410319165 197 24380 63044568 4225581724448081782 0.11867094 0.2944158618048994 90gAtmGEeIqUTbo1ZrxCvWtsseukXC +d 2 122 10130 -168758331 -3179091803916845592 30 794 4061635107 15695681119022625322 0.69592506 0.9748360509016578 OPwBqCEK5PWTjWaiOyL45u2NLTaDWv +d 3 -76 8809 141218956 -9110406195556445909 58 5494 1824517658 12046662515387914426 0.8557294 0.6668423897406515 Z2sWcQr0qyCJRMHDpRy3aQr7PkHtkK +d 3 77 15091 -1302295658 8795481303066536947 154 35477 2093538928 17419098323248948387 0.11952883 0.7035635283169166 O66j6PaYuZhEUtqV6fuU7TyjM2WxC5 +d 3 123 29533 240273900 1176001466590906949 117 30972 2592330556 12883447461717956514 0.39075065 0.38870280983958583 1aOcrEGd0cOqZe2I5XBOm0nDcwtBZO +d 4 5 -7688 702611616 6239356364381313700 4 39363 3126475872 35363005357834672 0.3766935 0.061029375346466685 H5j5ZHy1FGesOAHjkQEDYCucbpKWRu +d 4 55 -1471 1902023838 1252101628560265705 157 3691 811650497 1524771507450695976 0.2968701 0.5437595540422571 f9ALCzwDAKmdu7Rk2msJaB1wxe5IBX +d 4 102 -24558 1991172974 -7823479531661596016 14 36599 1534194097 2240998421986827216 0.028003037 0.8824879447595726 0og6hSkhbX8AC1ktFS4kounvTzy8Vo +d 5 -59 2045 -2117946883 1170799768349713170 189 63353 1365198901 2501626630745849169 0.75173044 0.18628859265874176 F7NSTjWvQJyBburN7CXRUlbgp2dIrA +d 5 -40 22614 706441268 -7542719935673075327 155 14337 3373581039 11720144131976083864 0.69632107 0.3114712539863804 C2GT5KVyOPZpgKVl110TyZO0NcJ434 +e 1 36 -21481 -928766616 -3471238138418013024 150 52569 2610290479 7788847578701297242 0.2578469 0.7670021786149205 gpo8K5qtYePve6jyPt6xgJx4YOVjms +e 1 71 -5479 -1339586153 -3920238763788954243 123 53012 4229654142 10297218950720052365 0.73473036 0.5773498217058918 cBGc0kSm32ylBDnxogG727C0uhZEYZ +e 1 120 10837 -1331533190 6342019705133850847 245 3975 2830981072 16439861276703750332 0.6623719 0.9965400387585364 LiEBxds3X0Uw0lxiYjDqrkAaAwoiIW +e 2 -61 -2888 -1660426473 2553892468492435401 126 35429 4144173353 939909697866979632 0.4405142 0.9231889896940375 BPtQMxnuSPpxMExYV9YkDa6cAN7GP3 +e 2 49 24495 -587831330 9178511478067509438 129 12757 1289293657 10948666249269100825 0.5610077 0.5991138115095911 bgK1r6v3BCTh0aejJUhkA1Hn6idXGp +e 2 52 -12056 -1090239422 9011500141803970147 238 4168 2013662838 12565360638488684051 0.6694766 0.39144436569161134 xipQ93429ksjNcXPX5326VSg1xJZcW +e 2 52 23388 715235348 605432070100399212 165 56980 3314983189 7386391799827871203 0.46076488 0.980809631269599 jQimhdepw3GKmioWUlVSWeBVRKFkY3 +e 2 97 18167 1593800404 -9112448817105133638 163 45185 3188005828 2792105417953811674 0.38175434 0.4094218353587008 ukOiFGGFnQJDHFgZxHMpvhD3zybF0M +e 3 -95 13611 2030965207 927403809957470678 119 59134 559847112 10966649192992996919 0.5301289 0.047343434291126085 gTpyQnEODMcpsPnJMZC66gh33i3m0b +e 3 71 194 1436496767 -5639533800082367925 158 44507 3105312559 3998472996619161534 0.930117 0.6108938307533 pTeu0WMjBRTaNRT15rLCuEh3tBJVc5 +e 3 104 -25136 1738331255 300633854973581194 139 20807 3577318119 13079037564113702254 0.40154034 0.7764360990307122 DuJNG8tufSqW0ZstHqWj3aGvFLMg4A +e 3 112 -6823 -421042466 8535335158538929274 129 32712 3759340273 9916295859593918600 0.6424343 0.6316565296547284 BsM5ZAYifRh5Lw3Y8X1r53I0cTJnfE +e 4 -56 -31500 1544188174 3096047390018154410 220 417 557517119 2774306934041974261 0.15459597 0.19113293583306745 IZTkHMLvIKuiLjhDjYMmIHxh166we4 +e 4 -53 13788 2064155045 -691093532952651300 243 35106 2778168728 9463973906560740422 0.34515214 0.27159190516490006 0VVIHzxWtNOFLtnhjHEKjXaJOSLJfm +e 4 30 -16110 61035129 -3356533792537910152 159 299 28774375 13526465947516666293 0.6999775 0.03968347085780355 cq4WSAIFwx3wwTUS5bp1wCe71R6U5I +e 4 73 -22501 1282464673 2541794052864382235 67 21119 538589788 9575476605699527641 0.48515016 0.296036538664718 4JznSdBajNWhu4hRQwjV1FjTTxY68i +e 4 74 -12612 -1885422396 1702850374057819332 130 3583 3198969145 10767179755613315144 0.5518061 0.5614503754617461 QEHVvcP8gxI6EMJIrvcnIhgzPNjIvv +e 4 96 -30336 427197269 7506304308750926996 95 48483 3521368277 5437030162957481122 0.58104324 0.42073125331890115 3BEOHQsMEFZ58VcNTOJYShTBpAPzbt +e 4 97 -13181 2047637360 6176835796788944083 158 53000 2042457019 9726016502640071617 0.7085086 0.12357539988406441 oHJMNvWuunsIMIWFnYG31RCfkOo2V7 +e 5 -86 32514 -467659022 -8012578250188146150 254 2684 2861911482 2126626171973341689 0.12559289 0.01479305307777301 gxfHWUF8XgY2KdFxigxvNEXe2V2XMl +e 5 64 -26526 1689098844 8950618259486183091 224 45253 662099130 16127995415060805595 0.2897315 0.5759450483859969 56MZa5O1hVtX4c5sbnCfxuX5kDChqI # distinct_from logic for floats query BBBBBBBBBBB diff --git a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_window.slt b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_window.slt index edad3747a2030..0cf2782409a40 100644 --- a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_window.slt +++ b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_window.slt @@ -689,12 +689,18 @@ ORDER BY c8; 64517 2809 63353 10 36599 56980 10 -query IIIRIIIIII +query IIIBIIIIII SELECT c9, row_number() OVER (ORDER BY c2, c9) AS row_number, count(c3) OVER (ORDER BY c9) AS count_c3, - avg(c3) OVER (ORDER BY c2) AS avg_c3_by_c2, + abs(avg(c3) OVER (ORDER BY c2) - CASE + WHEN c2 = 1 THEN 16.681818181818183 + WHEN c2 = 2 THEN 12.522727272727273 + WHEN c2 = 3 THEN 15.015873015873016 + WHEN c2 = 4 THEN 11.337209302325581 + WHEN c2 = 5 THEN 7.81 + END) < 1e-14 AS avg_c3_by_c2, sum(c3) OVER (ORDER BY c2) AS sum_c3_by_c2, max(c3) OVER (ORDER BY c2) AS max_c3_by_c2, min(c3) OVER (ORDER BY c2) AS min_c3_by_c2, @@ -704,114 +710,120 @@ SELECT FROM aggregate_test_100_by_sql ORDER BY row_number; ---- -225513085 1 6 16.681818181818 367 125 -99 0 -1 -47 -473294098 2 11 16.681818181818 367 125 -99 0 -1 -47 -520189543 3 12 16.681818181818 367 125 -99 0 -1 -47 -774637006 4 19 16.681818181818 367 125 -99 0 -1 -47 -879082834 5 21 16.681818181818 367 125 -99 0 -1 -47 -1454057357 6 34 16.681818181818 367 125 -99 0 -1 -47 -1842680163 7 40 16.681818181818 367 125 -99 0 -1 -47 -2125812933 8 46 16.681818181818 367 125 -99 0 -1 -47 -2610290479 9 56 16.681818181818 367 125 -99 0 -1 -47 -2669374863 10 57 16.681818181818 367 125 -99 0 -1 -47 -2712615025 11 59 16.681818181818 367 125 -99 0 -1 -47 -2830981072 12 62 16.681818181818 367 125 -99 0 -1 -47 -2861376515 13 64 16.681818181818 367 125 -99 0 -1 -47 -3275293996 14 72 16.681818181818 367 125 -99 0 -1 -47 -3276123488 15 73 16.681818181818 367 125 -99 0 -1 -47 -3542840110 16 82 16.681818181818 367 125 -99 0 -1 -47 -3625286410 17 87 16.681818181818 367 125 -99 0 -1 -47 -3766999078 18 90 16.681818181818 367 125 -99 0 -1 -47 -4015442341 19 94 16.681818181818 367 125 -99 0 -1 -47 -4076864659 20 96 16.681818181818 367 125 -99 0 -1 -47 -4216440507 21 98 16.681818181818 367 125 -99 0 -1 -47 -4229654142 22 99 16.681818181818 367 125 -99 0 -1 -47 -63044568 23 2 12.522727272727 551 125 -117 0 -1 47 -141680161 24 4 12.522727272727 551 125 -117 0 -1 47 -145294611 25 5 12.522727272727 551 125 -117 0 -1 47 -598822671 26 16 12.522727272727 551 125 -117 0 -1 47 -1000948272 27 24 12.522727272727 551 125 -117 0 -1 47 -1098639440 28 27 12.522727272727 551 125 -117 0 -1 47 -1157161427 29 28 12.522727272727 551 125 -117 0 -1 47 -1289293657 30 31 12.522727272727 551 125 -117 0 -1 47 -1491205016 31 35 12.522727272727 551 125 -117 0 -1 47 -2013662838 32 43 12.522727272727 551 125 -117 0 -1 47 -2293105904 33 48 12.522727272727 551 125 -117 0 -1 47 -2525744318 34 54 12.522727272727 551 125 -117 0 -1 47 -2705709344 35 58 12.522727272727 551 125 -117 0 -1 47 -2844041986 36 63 12.522727272727 551 125 -117 0 -1 47 -2939920218 37 66 12.522727272727 551 125 -117 0 -1 47 -3188005828 38 70 12.522727272727 551 125 -117 0 -1 47 -3314983189 39 74 12.522727272727 551 125 -117 0 -1 47 -3398507249 40 77 12.522727272727 551 125 -117 0 -1 47 -3455216719 41 78 12.522727272727 551 125 -117 0 -1 47 -3717551163 42 88 12.522727272727 551 125 -117 0 -1 47 -4061635107 43 95 12.522727272727 551 125 -117 0 -1 47 -4144173353 44 97 12.522727272727 551 125 -117 0 -1 47 -243203849 45 7 15.015873015873 946 125 -117 0 -1 74 -431948861 46 9 15.015873015873 946 125 -117 0 -1 74 -559847112 47 15 15.015873015873 946 125 -117 0 -1 74 -754775609 48 18 15.015873015873 946 125 -117 0 -1 74 -1088543984 49 26 15.015873015873 946 125 -117 0 -1 74 -1362369177 50 32 15.015873015873 946 125 -117 0 -1 74 -1538863055 51 37 15.015873015873 946 125 -117 0 -1 74 -1824517658 52 39 15.015873015873 946 125 -117 0 -1 74 -1995343206 53 42 15.015873015873 946 125 -117 0 -1 74 -2093538928 54 45 15.015873015873 946 125 -117 0 -1 74 -2214035726 55 47 15.015873015873 946 125 -117 0 -1 74 -2592330556 56 55 15.015873015873 946 125 -117 0 -1 74 -3105312559 57 68 15.015873015873 946 125 -117 0 -1 74 -3473924576 58 80 15.015873015873 946 125 -117 0 -1 74 -3577318119 59 85 15.015873015873 946 125 -117 0 -1 74 -3759340273 60 89 15.015873015873 946 125 -117 0 -1 74 -3862393166 61 91 15.015873015873 946 125 -117 0 -1 74 -3959216334 62 92 15.015873015873 946 125 -117 0 -1 74 -3998790955 63 93 15.015873015873 946 125 -117 0 -1 74 -28774375 64 1 11.337209302326 975 125 -117 0 -1 69 -326151275 65 8 11.337209302326 975 125 -117 0 -1 69 -466439833 66 10 11.337209302326 975 125 -117 0 -1 69 -538589788 67 13 11.337209302326 975 125 -117 0 -1 69 -557517119 68 14 11.337209302326 975 125 -117 0 -1 69 -811650497 69 20 11.337209302326 975 125 -117 0 -1 69 -933879086 70 22 11.337209302326 975 125 -117 0 -1 69 -1243785310 71 30 11.337209302326 975 125 -117 0 -1 69 -1534194097 72 36 11.337209302326 975 125 -117 0 -1 69 -1787652631 73 38 11.337209302326 975 125 -117 0 -1 69 -1865307672 74 41 11.337209302326 975 125 -117 0 -1 69 -2042457019 75 44 11.337209302326 975 125 -117 0 -1 69 -2306130875 76 49 11.337209302326 975 125 -117 0 -1 69 -2502326480 77 53 11.337209302326 975 125 -117 0 -1 69 -2778168728 78 60 11.337209302326 975 125 -117 0 -1 69 -2818832252 79 61 11.337209302326 975 125 -117 0 -1 69 -3023531799 80 67 11.337209302326 975 125 -117 0 -1 69 -3126475872 81 69 11.337209302326 975 125 -117 0 -1 69 -3198969145 82 71 11.337209302326 975 125 -117 0 -1 69 -3521368277 83 81 11.337209302326 975 125 -117 0 -1 69 -3566741189 84 83 11.337209302326 975 125 -117 0 -1 69 -3570297463 85 84 11.337209302326 975 125 -117 0 -1 69 -3593959807 86 86 11.337209302326 975 125 -117 0 -1 69 -141047417 87 3 7.81 781 125 -117 0 -1 -61 -662099130 88 17 7.81 781 125 -117 0 -1 -61 -974297360 89 23 7.81 781 125 -117 0 -1 -61 -1013876852 90 25 7.81 781 125 -117 0 -1 -61 -1229567292 91 29 7.81 781 125 -117 0 -1 -61 -1365198901 92 33 7.81 781 125 -117 0 -1 -61 -2307004493 93 50 7.81 781 125 -117 0 -1 -61 -2424630722 94 51 7.81 781 125 -117 0 -1 -61 -2496054700 95 52 7.81 781 125 -117 0 -1 -61 -2861911482 96 65 7.81 781 125 -117 0 -1 -61 -3342719438 97 75 7.81 781 125 -117 0 -1 -61 -3373581039 98 76 7.81 781 125 -117 0 -1 -61 -3457053821 99 79 7.81 781 125 -117 0 -1 -61 -4268716378 100 100 7.81 781 125 -117 0 -1 -61 +225513085 1 6 true 367 125 -99 0 -1 -47 +473294098 2 11 true 367 125 -99 0 -1 -47 +520189543 3 12 true 367 125 -99 0 -1 -47 +774637006 4 19 true 367 125 -99 0 -1 -47 +879082834 5 21 true 367 125 -99 0 -1 -47 +1454057357 6 34 true 367 125 -99 0 -1 -47 +1842680163 7 40 true 367 125 -99 0 -1 -47 +2125812933 8 46 true 367 125 -99 0 -1 -47 +2610290479 9 56 true 367 125 -99 0 -1 -47 +2669374863 10 57 true 367 125 -99 0 -1 -47 +2712615025 11 59 true 367 125 -99 0 -1 -47 +2830981072 12 62 true 367 125 -99 0 -1 -47 +2861376515 13 64 true 367 125 -99 0 -1 -47 +3275293996 14 72 true 367 125 -99 0 -1 -47 +3276123488 15 73 true 367 125 -99 0 -1 -47 +3542840110 16 82 true 367 125 -99 0 -1 -47 +3625286410 17 87 true 367 125 -99 0 -1 -47 +3766999078 18 90 true 367 125 -99 0 -1 -47 +4015442341 19 94 true 367 125 -99 0 -1 -47 +4076864659 20 96 true 367 125 -99 0 -1 -47 +4216440507 21 98 true 367 125 -99 0 -1 -47 +4229654142 22 99 true 367 125 -99 0 -1 -47 +63044568 23 2 true 551 125 -117 0 -1 47 +141680161 24 4 true 551 125 -117 0 -1 47 +145294611 25 5 true 551 125 -117 0 -1 47 +598822671 26 16 true 551 125 -117 0 -1 47 +1000948272 27 24 true 551 125 -117 0 -1 47 +1098639440 28 27 true 551 125 -117 0 -1 47 +1157161427 29 28 true 551 125 -117 0 -1 47 +1289293657 30 31 true 551 125 -117 0 -1 47 +1491205016 31 35 true 551 125 -117 0 -1 47 +2013662838 32 43 true 551 125 -117 0 -1 47 +2293105904 33 48 true 551 125 -117 0 -1 47 +2525744318 34 54 true 551 125 -117 0 -1 47 +2705709344 35 58 true 551 125 -117 0 -1 47 +2844041986 36 63 true 551 125 -117 0 -1 47 +2939920218 37 66 true 551 125 -117 0 -1 47 +3188005828 38 70 true 551 125 -117 0 -1 47 +3314983189 39 74 true 551 125 -117 0 -1 47 +3398507249 40 77 true 551 125 -117 0 -1 47 +3455216719 41 78 true 551 125 -117 0 -1 47 +3717551163 42 88 true 551 125 -117 0 -1 47 +4061635107 43 95 true 551 125 -117 0 -1 47 +4144173353 44 97 true 551 125 -117 0 -1 47 +243203849 45 7 true 946 125 -117 0 -1 74 +431948861 46 9 true 946 125 -117 0 -1 74 +559847112 47 15 true 946 125 -117 0 -1 74 +754775609 48 18 true 946 125 -117 0 -1 74 +1088543984 49 26 true 946 125 -117 0 -1 74 +1362369177 50 32 true 946 125 -117 0 -1 74 +1538863055 51 37 true 946 125 -117 0 -1 74 +1824517658 52 39 true 946 125 -117 0 -1 74 +1995343206 53 42 true 946 125 -117 0 -1 74 +2093538928 54 45 true 946 125 -117 0 -1 74 +2214035726 55 47 true 946 125 -117 0 -1 74 +2592330556 56 55 true 946 125 -117 0 -1 74 +3105312559 57 68 true 946 125 -117 0 -1 74 +3473924576 58 80 true 946 125 -117 0 -1 74 +3577318119 59 85 true 946 125 -117 0 -1 74 +3759340273 60 89 true 946 125 -117 0 -1 74 +3862393166 61 91 true 946 125 -117 0 -1 74 +3959216334 62 92 true 946 125 -117 0 -1 74 +3998790955 63 93 true 946 125 -117 0 -1 74 +28774375 64 1 true 975 125 -117 0 -1 69 +326151275 65 8 true 975 125 -117 0 -1 69 +466439833 66 10 true 975 125 -117 0 -1 69 +538589788 67 13 true 975 125 -117 0 -1 69 +557517119 68 14 true 975 125 -117 0 -1 69 +811650497 69 20 true 975 125 -117 0 -1 69 +933879086 70 22 true 975 125 -117 0 -1 69 +1243785310 71 30 true 975 125 -117 0 -1 69 +1534194097 72 36 true 975 125 -117 0 -1 69 +1787652631 73 38 true 975 125 -117 0 -1 69 +1865307672 74 41 true 975 125 -117 0 -1 69 +2042457019 75 44 true 975 125 -117 0 -1 69 +2306130875 76 49 true 975 125 -117 0 -1 69 +2502326480 77 53 true 975 125 -117 0 -1 69 +2778168728 78 60 true 975 125 -117 0 -1 69 +2818832252 79 61 true 975 125 -117 0 -1 69 +3023531799 80 67 true 975 125 -117 0 -1 69 +3126475872 81 69 true 975 125 -117 0 -1 69 +3198969145 82 71 true 975 125 -117 0 -1 69 +3521368277 83 81 true 975 125 -117 0 -1 69 +3566741189 84 83 true 975 125 -117 0 -1 69 +3570297463 85 84 true 975 125 -117 0 -1 69 +3593959807 86 86 true 975 125 -117 0 -1 69 +141047417 87 3 true 781 125 -117 0 -1 -61 +662099130 88 17 true 781 125 -117 0 -1 -61 +974297360 89 23 true 781 125 -117 0 -1 -61 +1013876852 90 25 true 781 125 -117 0 -1 -61 +1229567292 91 29 true 781 125 -117 0 -1 -61 +1365198901 92 33 true 781 125 -117 0 -1 -61 +2307004493 93 50 true 781 125 -117 0 -1 -61 +2424630722 94 51 true 781 125 -117 0 -1 -61 +2496054700 95 52 true 781 125 -117 0 -1 -61 +2861911482 96 65 true 781 125 -117 0 -1 -61 +3342719438 97 75 true 781 125 -117 0 -1 -61 +3373581039 98 76 true 781 125 -117 0 -1 -61 +3457053821 99 79 true 781 125 -117 0 -1 -61 +4268716378 100 100 true 781 125 -117 0 -1 -61 -query IIIRIIIIII +query IIIBIIIIII SELECT c9, row_number() OVER (PARTITION BY c2, c9) AS row_number, count(c3) OVER (PARTITION BY c2) AS count_c3, - avg(c3) OVER (PARTITION BY c2) AS avg_c3_by_c2, + abs(avg(c3) OVER (PARTITION BY c2) - CASE + WHEN c2 = 1 THEN 16.681818181818183 + WHEN c2 = 2 THEN 8.363636363636363 + WHEN c2 = 3 THEN 20.789473684210527 + WHEN c2 = 4 THEN 1.2608695652173914 + WHEN c2 = 5 THEN -13.857142857142858 + END) < 1e-14 AS avg_c3_by_c2, sum(c3) OVER (PARTITION BY c2) AS sum_c3_by_c2, max(c3) OVER (PARTITION BY c2) AS max_c3_by_c2, min(c3) OVER (PARTITION BY c2) AS min_c3_by_c2, @@ -821,114 +833,215 @@ SELECT FROM aggregate_test_100_by_sql ORDER BY c9; ---- -28774375 1 23 1.260869565217 29 123 -117 0 -1 15 -63044568 1 22 8.363636363636 184 122 -117 0 -1 -2 -141047417 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -141680161 1 22 8.363636363636 184 122 -117 0 -1 -2 -145294611 1 22 8.363636363636 184 122 -117 0 -1 -2 -225513085 1 22 16.681818181818 367 125 -99 0 -1 -47 -243203849 1 19 20.789473684211 395 123 -101 0 -1 101 -326151275 1 23 1.260869565217 29 123 -117 0 -1 15 -431948861 1 19 20.789473684211 395 123 -101 0 -1 101 -466439833 1 23 1.260869565217 29 123 -117 0 -1 15 -473294098 1 22 16.681818181818 367 125 -99 0 -1 -47 -520189543 1 22 16.681818181818 367 125 -99 0 -1 -47 -538589788 1 23 1.260869565217 29 123 -117 0 -1 15 -557517119 1 23 1.260869565217 29 123 -117 0 -1 15 -559847112 1 19 20.789473684211 395 123 -101 0 -1 101 -598822671 1 22 8.363636363636 184 122 -117 0 -1 -2 -662099130 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -754775609 1 19 20.789473684211 395 123 -101 0 -1 101 -774637006 1 22 16.681818181818 367 125 -99 0 -1 -47 -811650497 1 23 1.260869565217 29 123 -117 0 -1 15 -879082834 1 22 16.681818181818 367 125 -99 0 -1 -47 -933879086 1 23 1.260869565217 29 123 -117 0 -1 15 -974297360 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -1000948272 1 22 8.363636363636 184 122 -117 0 -1 -2 -1013876852 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -1088543984 1 19 20.789473684211 395 123 -101 0 -1 101 -1098639440 1 22 8.363636363636 184 122 -117 0 -1 -2 -1157161427 1 22 8.363636363636 184 122 -117 0 -1 -2 -1229567292 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -1243785310 1 23 1.260869565217 29 123 -117 0 -1 15 -1289293657 1 22 8.363636363636 184 122 -117 0 -1 -2 -1362369177 1 19 20.789473684211 395 123 -101 0 -1 101 -1365198901 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -1454057357 1 22 16.681818181818 367 125 -99 0 -1 -47 -1491205016 1 22 8.363636363636 184 122 -117 0 -1 -2 -1534194097 1 23 1.260869565217 29 123 -117 0 -1 15 -1538863055 1 19 20.789473684211 395 123 -101 0 -1 101 -1787652631 1 23 1.260869565217 29 123 -117 0 -1 15 -1824517658 1 19 20.789473684211 395 123 -101 0 -1 101 -1842680163 1 22 16.681818181818 367 125 -99 0 -1 -47 -1865307672 1 23 1.260869565217 29 123 -117 0 -1 15 -1995343206 1 19 20.789473684211 395 123 -101 0 -1 101 -2013662838 1 22 8.363636363636 184 122 -117 0 -1 -2 -2042457019 1 23 1.260869565217 29 123 -117 0 -1 15 -2093538928 1 19 20.789473684211 395 123 -101 0 -1 101 -2125812933 1 22 16.681818181818 367 125 -99 0 -1 -47 -2214035726 1 19 20.789473684211 395 123 -101 0 -1 101 -2293105904 1 22 8.363636363636 184 122 -117 0 -1 -2 -2306130875 1 23 1.260869565217 29 123 -117 0 -1 15 -2307004493 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -2424630722 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -2496054700 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -2502326480 1 23 1.260869565217 29 123 -117 0 -1 15 -2525744318 1 22 8.363636363636 184 122 -117 0 -1 -2 -2592330556 1 19 20.789473684211 395 123 -101 0 -1 101 -2610290479 1 22 16.681818181818 367 125 -99 0 -1 -47 -2669374863 1 22 16.681818181818 367 125 -99 0 -1 -47 -2705709344 1 22 8.363636363636 184 122 -117 0 -1 -2 -2712615025 1 22 16.681818181818 367 125 -99 0 -1 -47 -2778168728 1 23 1.260869565217 29 123 -117 0 -1 15 -2818832252 1 23 1.260869565217 29 123 -117 0 -1 15 -2830981072 1 22 16.681818181818 367 125 -99 0 -1 -47 -2844041986 1 22 8.363636363636 184 122 -117 0 -1 -2 -2861376515 1 22 16.681818181818 367 125 -99 0 -1 -47 -2861911482 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -2939920218 1 22 8.363636363636 184 122 -117 0 -1 -2 -3023531799 1 23 1.260869565217 29 123 -117 0 -1 15 -3105312559 1 19 20.789473684211 395 123 -101 0 -1 101 -3126475872 1 23 1.260869565217 29 123 -117 0 -1 15 -3188005828 1 22 8.363636363636 184 122 -117 0 -1 -2 -3198969145 1 23 1.260869565217 29 123 -117 0 -1 15 -3275293996 1 22 16.681818181818 367 125 -99 0 -1 -47 -3276123488 1 22 16.681818181818 367 125 -99 0 -1 -47 -3314983189 1 22 8.363636363636 184 122 -117 0 -1 -2 -3342719438 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -3373581039 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -3398507249 1 22 8.363636363636 184 122 -117 0 -1 -2 -3455216719 1 22 8.363636363636 184 122 -117 0 -1 -2 -3457053821 1 14 -13.857142857143 -194 118 -101 0 -1 -122 -3473924576 1 19 20.789473684211 395 123 -101 0 -1 101 -3521368277 1 23 1.260869565217 29 123 -117 0 -1 15 -3542840110 1 22 16.681818181818 367 125 -99 0 -1 -47 -3566741189 1 23 1.260869565217 29 123 -117 0 -1 15 -3570297463 1 23 1.260869565217 29 123 -117 0 -1 15 -3577318119 1 19 20.789473684211 395 123 -101 0 -1 101 -3593959807 1 23 1.260869565217 29 123 -117 0 -1 15 -3625286410 1 22 16.681818181818 367 125 -99 0 -1 -47 -3717551163 1 22 8.363636363636 184 122 -117 0 -1 -2 -3759340273 1 19 20.789473684211 395 123 -101 0 -1 101 -3766999078 1 22 16.681818181818 367 125 -99 0 -1 -47 -3862393166 1 19 20.789473684211 395 123 -101 0 -1 101 -3959216334 1 19 20.789473684211 395 123 -101 0 -1 101 -3998790955 1 19 20.789473684211 395 123 -101 0 -1 101 -4015442341 1 22 16.681818181818 367 125 -99 0 -1 -47 -4061635107 1 22 8.363636363636 184 122 -117 0 -1 -2 -4076864659 1 22 16.681818181818 367 125 -99 0 -1 -47 -4144173353 1 22 8.363636363636 184 122 -117 0 -1 -2 -4216440507 1 22 16.681818181818 367 125 -99 0 -1 -47 -4229654142 1 22 16.681818181818 367 125 -99 0 -1 -47 -4268716378 1 14 -13.857142857143 -194 118 -101 0 -1 -122 +28774375 1 23 true 29 123 -117 0 -1 15 +63044568 1 22 true 184 122 -117 0 -1 -2 +141047417 1 14 true -194 118 -101 0 -1 -122 +141680161 1 22 true 184 122 -117 0 -1 -2 +145294611 1 22 true 184 122 -117 0 -1 -2 +225513085 1 22 true 367 125 -99 0 -1 -47 +243203849 1 19 true 395 123 -101 0 -1 101 +326151275 1 23 true 29 123 -117 0 -1 15 +431948861 1 19 true 395 123 -101 0 -1 101 +466439833 1 23 true 29 123 -117 0 -1 15 +473294098 1 22 true 367 125 -99 0 -1 -47 +520189543 1 22 true 367 125 -99 0 -1 -47 +538589788 1 23 true 29 123 -117 0 -1 15 +557517119 1 23 true 29 123 -117 0 -1 15 +559847112 1 19 true 395 123 -101 0 -1 101 +598822671 1 22 true 184 122 -117 0 -1 -2 +662099130 1 14 true -194 118 -101 0 -1 -122 +754775609 1 19 true 395 123 -101 0 -1 101 +774637006 1 22 true 367 125 -99 0 -1 -47 +811650497 1 23 true 29 123 -117 0 -1 15 +879082834 1 22 true 367 125 -99 0 -1 -47 +933879086 1 23 true 29 123 -117 0 -1 15 +974297360 1 14 true -194 118 -101 0 -1 -122 +1000948272 1 22 true 184 122 -117 0 -1 -2 +1013876852 1 14 true -194 118 -101 0 -1 -122 +1088543984 1 19 true 395 123 -101 0 -1 101 +1098639440 1 22 true 184 122 -117 0 -1 -2 +1157161427 1 22 true 184 122 -117 0 -1 -2 +1229567292 1 14 true -194 118 -101 0 -1 -122 +1243785310 1 23 true 29 123 -117 0 -1 15 +1289293657 1 22 true 184 122 -117 0 -1 -2 +1362369177 1 19 true 395 123 -101 0 -1 101 +1365198901 1 14 true -194 118 -101 0 -1 -122 +1454057357 1 22 true 367 125 -99 0 -1 -47 +1491205016 1 22 true 184 122 -117 0 -1 -2 +1534194097 1 23 true 29 123 -117 0 -1 15 +1538863055 1 19 true 395 123 -101 0 -1 101 +1787652631 1 23 true 29 123 -117 0 -1 15 +1824517658 1 19 true 395 123 -101 0 -1 101 +1842680163 1 22 true 367 125 -99 0 -1 -47 +1865307672 1 23 true 29 123 -117 0 -1 15 +1995343206 1 19 true 395 123 -101 0 -1 101 +2013662838 1 22 true 184 122 -117 0 -1 -2 +2042457019 1 23 true 29 123 -117 0 -1 15 +2093538928 1 19 true 395 123 -101 0 -1 101 +2125812933 1 22 true 367 125 -99 0 -1 -47 +2214035726 1 19 true 395 123 -101 0 -1 101 +2293105904 1 22 true 184 122 -117 0 -1 -2 +2306130875 1 23 true 29 123 -117 0 -1 15 +2307004493 1 14 true -194 118 -101 0 -1 -122 +2424630722 1 14 true -194 118 -101 0 -1 -122 +2496054700 1 14 true -194 118 -101 0 -1 -122 +2502326480 1 23 true 29 123 -117 0 -1 15 +2525744318 1 22 true 184 122 -117 0 -1 -2 +2592330556 1 19 true 395 123 -101 0 -1 101 +2610290479 1 22 true 367 125 -99 0 -1 -47 +2669374863 1 22 true 367 125 -99 0 -1 -47 +2705709344 1 22 true 184 122 -117 0 -1 -2 +2712615025 1 22 true 367 125 -99 0 -1 -47 +2778168728 1 23 true 29 123 -117 0 -1 15 +2818832252 1 23 true 29 123 -117 0 -1 15 +2830981072 1 22 true 367 125 -99 0 -1 -47 +2844041986 1 22 true 184 122 -117 0 -1 -2 +2861376515 1 22 true 367 125 -99 0 -1 -47 +2861911482 1 14 true -194 118 -101 0 -1 -122 +2939920218 1 22 true 184 122 -117 0 -1 -2 +3023531799 1 23 true 29 123 -117 0 -1 15 +3105312559 1 19 true 395 123 -101 0 -1 101 +3126475872 1 23 true 29 123 -117 0 -1 15 +3188005828 1 22 true 184 122 -117 0 -1 -2 +3198969145 1 23 true 29 123 -117 0 -1 15 +3275293996 1 22 true 367 125 -99 0 -1 -47 +3276123488 1 22 true 367 125 -99 0 -1 -47 +3314983189 1 22 true 184 122 -117 0 -1 -2 +3342719438 1 14 true -194 118 -101 0 -1 -122 +3373581039 1 14 true -194 118 -101 0 -1 -122 +3398507249 1 22 true 184 122 -117 0 -1 -2 +3455216719 1 22 true 184 122 -117 0 -1 -2 +3457053821 1 14 true -194 118 -101 0 -1 -122 +3473924576 1 19 true 395 123 -101 0 -1 101 +3521368277 1 23 true 29 123 -117 0 -1 15 +3542840110 1 22 true 367 125 -99 0 -1 -47 +3566741189 1 23 true 29 123 -117 0 -1 15 +3570297463 1 23 true 29 123 -117 0 -1 15 +3577318119 1 19 true 395 123 -101 0 -1 101 +3593959807 1 23 true 29 123 -117 0 -1 15 +3625286410 1 22 true 367 125 -99 0 -1 -47 +3717551163 1 22 true 184 122 -117 0 -1 -2 +3759340273 1 19 true 395 123 -101 0 -1 101 +3766999078 1 22 true 367 125 -99 0 -1 -47 +3862393166 1 19 true 395 123 -101 0 -1 101 +3959216334 1 19 true 395 123 -101 0 -1 101 +3998790955 1 19 true 395 123 -101 0 -1 101 +4015442341 1 22 true 367 125 -99 0 -1 -47 +4061635107 1 22 true 184 122 -117 0 -1 -2 +4076864659 1 22 true 367 125 -99 0 -1 -47 +4144173353 1 22 true 184 122 -117 0 -1 -2 +4216440507 1 22 true 367 125 -99 0 -1 -47 +4229654142 1 22 true 367 125 -99 0 -1 -47 +4268716378 1 14 true -194 118 -101 0 -1 -122 -query IIIRIIIIII +query IIIBIIIIII SELECT c9, row_number() OVER (PARTITION BY c2 ORDER BY c9) AS row_number, count(c3) OVER (PARTITION BY c2 ORDER BY c9) AS count_c3, - avg(c3) OVER (PARTITION BY c2 ORDER BY c9) AS avg_c3_by_c2, + abs(avg(c3) OVER (PARTITION BY c2 ORDER BY c9) - CASE + WHEN c9 = 28774375 THEN 30 + WHEN c9 = 63044568 THEN 113 + WHEN c9 = 141047417 THEN 36 + WHEN c9 = 141680161 THEN 3.5 + WHEN c9 = 145294611 THEN 17.333333333333332 + WHEN c9 = 225513085 THEN -98 + WHEN c9 = 243203849 THEN -101 + WHEN c9 = 326151275 THEN 38.5 + WHEN c9 = 431948861 THEN -43.5 + WHEN c9 = 466439833 THEN -8 + WHEN c9 = 473294098 THEN -14 + WHEN c9 = 520189543 THEN -17.333333333333332 + WHEN c9 = 538589788 THEN 12.25 + WHEN c9 = 557517119 THEN -1.4 + WHEN c9 = 559847112 THEN -60.666666666666664 + WHEN c9 = 598822671 THEN 5.75 + WHEN c9 = 662099130 THEN 50 + WHEN c9 = 754775609 THEN -41.25 + WHEN c9 = 774637006 THEN -34.25 + WHEN c9 = 811650497 THEN 8 + WHEN c9 = 879082834 THEN -16 + WHEN c9 = 933879086 THEN 9.285714285714286 + WHEN c9 = 974297360 THEN 56 + WHEN c9 = 1000948272 THEN 23.2 + WHEN c9 = 1013876852 THEN 34.25 + WHEN c9 = 1088543984 THEN -18.4 + WHEN c9 = 1098639440 THEN 24.5 + WHEN c9 = 1157161427 THEN 5.714285714285714 + WHEN c9 = 1229567292 THEN 51 + WHEN c9 = 1243785310 THEN -5.75 + WHEN c9 = 1289293657 THEN 11.125 + WHEN c9 = 1362369177 THEN -11.666666666666666 + WHEN c9 = 1365198901 THEN 32.666666666666664 + WHEN c9 = 1454057357 THEN -22.666666666666668 + WHEN c9 = 1491205016 THEN 10 + WHEN c9 = 1534194097 THEN 6.222222222222222 + WHEN c9 = 1538863055 THEN -7.571428571428571 + WHEN c9 = 1787652631 THEN 1.8 + WHEN c9 = 1824517658 THEN -16.125 + WHEN c9 = 1842680163 THEN -11.714285714285714 + WHEN c9 = 1865307672 THEN 7.545454545454546 + WHEN c9 = 1995343206 THEN -22.333333333333332 + WHEN c9 = 2013662838 THEN 14.2 + WHEN c9 = 2042457019 THEN 15 + WHEN c9 = 2093538928 THEN -12.4 + WHEN c9 = 2125812933 THEN -5.125 + WHEN c9 = 2214035726 THEN -10.090909090909092 + WHEN c9 = 2293105904 THEN 2.272727272727273 + WHEN c9 = 2306130875 THEN 14.076923076923077 + WHEN c9 = 2307004493 THEN 36.857142857142854 + WHEN c9 = 2424630722 THEN 31.625 + WHEN c9 = 2496054700 THEN 16.88888888888889 + WHEN c9 = 2502326480 THEN 9.214285714285714 + WHEN c9 = 2525744318 THEN -2.9166666666666665 + WHEN c9 = 2592330556 THEN 1 + WHEN c9 = 2610290479 THEN -0.5555555555555556 + WHEN c9 = 2669374863 THEN -1 + WHEN c9 = 2705709344 THEN 2.1538461538461537 + WHEN c9 = 2712615025 THEN 2.5454545454545454 + WHEN c9 = 2778168728 THEN 5.066666666666666 + WHEN c9 = 2818832252 THEN -0.1875 + WHEN c9 = 2830981072 THEN 12.333333333333334 + WHEN c9 = 2844041986 THEN -2.2857142857142856 + WHEN c9 = 2861376515 THEN 10.76923076923077 + WHEN c9 = 2861911482 THEN 6.6 + WHEN c9 = 2939920218 THEN -5 + WHEN c9 = 3023531799 THEN -7.0588235294117645 + WHEN c9 = 3105312559 THEN 6.384615384615385 + WHEN c9 = 3126475872 THEN -6.388888888888889 + WHEN c9 = 3188005828 THEN 1.375 + WHEN c9 = 3198969145 THEN -2.1578947368421053 + WHEN c9 = 3275293996 THEN 12.071428571428571 + WHEN c9 = 3276123488 THEN 9.6 + WHEN c9 = 3314983189 THEN 4.352941176470588 + WHEN c9 = 3342719438 THEN -1.4545454545454546 + WHEN c9 = 3373581039 THEN -4.666666666666667 + WHEN c9 = 3398507249 THEN 5.722222222222222 + WHEN c9 = 3455216719 THEN 9 + WHEN c9 = 3457053821 THEN -7.6923076923076925 + WHEN c9 = 3473924576 THEN 12.857142857142858 + WHEN c9 = 3521368277 THEN 2.75 + WHEN c9 = 3542840110 THEN 4.5 + WHEN c9 = 3566741189 THEN 8.476190476190476 + WHEN c9 = 3570297463 THEN 5.409090909090909 + WHEN c9 = 3577318119 THEN 18.933333333333334 + WHEN c9 = 3593959807 THEN 1.2608695652173914 + WHEN c9 = 3625286410 THEN 11.588235294117647 + WHEN c9 = 3717551163 THEN 6.15 + WHEN c9 = 3759340273 THEN 24.75 + WHEN c9 = 3766999078 THEN 16.666666666666668 + WHEN c9 = 3862393166 THEN 23.176470588235293 + WHEN c9 = 3959216334 THEN 21.22222222222222 + WHEN c9 = 3998790955 THEN 20.789473684210527 + WHEN c9 = 4015442341 THEN 20.157894736842106 + WHEN c9 = 4061635107 THEN 11.666666666666666 + WHEN c9 = 4076864659 THEN 19.75 + WHEN c9 = 4144173353 THEN 8.363636363636363 + WHEN c9 = 4216440507 THEN 14.095238095238095 + WHEN c9 = 4229654142 THEN 16.681818181818183 + WHEN c9 = 4268716378 THEN -13.857142857142858 + END) < 1e-14 AS avg_c3_by_c2, sum(c3) OVER (PARTITION BY c2 ORDER BY c9) AS sum_c3_by_c2, max(c3) OVER (PARTITION BY c2 ORDER BY c9) AS max_c3_by_c2, min(c3) OVER (PARTITION BY c2 ORDER BY c9) AS min_c3_by_c2, @@ -938,106 +1051,106 @@ SELECT FROM aggregate_test_100_by_sql ORDER BY c9; ---- -28774375 1 1 30 30 30 30 30 30 30 -63044568 1 1 113 113 113 113 113 113 113 -141047417 1 1 36 36 36 36 36 36 36 -141680161 2 2 3.5 7 113 -106 16 -9 -25 -145294611 3 3 17.333333333333 52 113 -106 0 -1 -54 -225513085 1 1 -98 -98 -98 -98 -98 -98 -98 -243203849 1 1 -101 -101 -101 -101 -101 -101 -101 -326151275 2 2 38.5 77 47 30 14 63 49 -431948861 2 2 -43.5 -87 14 -101 10 -97 -107 -466439833 3 3 -8 -24 47 -101 10 -65 -86 -473294098 2 2 -14 -28 70 -98 6 -34 -40 -520189543 3 3 -17.333333333333 -52 70 -98 0 -2 48 -538589788 4 4 12.25 49 73 -101 8 -1 -29 -557517119 5 5 -1.4 -7 73 -101 8 -1 43 -559847112 3 3 -60.666666666667 -182 14 -101 0 -65 52 -598822671 4 4 5.75 23 113 -106 0 -1 41 -662099130 2 2 50 100 64 36 0 100 100 -754775609 4 4 -41.25 -165 17 -101 0 -65 37 -774637006 4 4 -34.25 -137 70 -98 0 -1 -101 -811650497 6 6 8 48 73 -101 0 -1 28 -879082834 5 5 -16 -80 70 -98 0 -1 -94 -933879086 7 7 9.285714285714 65 73 -101 0 -1 13 -974297360 3 3 56 168 68 36 0 100 32 -1000948272 5 5 23.2 116 113 -106 0 -1 116 -1013876852 4 4 34.25 137 68 -31 0 -27 -63 -1088543984 5 5 -18.4 -92 73 -101 0 -1 108 -1098639440 6 6 24.5 147 113 -106 0 -1 107 -1157161427 7 7 5.714285714286 40 113 -107 0 -1 -2 -1229567292 5 5 51 255 118 -31 0 -9 -73 -1243785310 8 8 -5.75 -46 73 -111 0 -1 -100 -1289293657 8 8 11.125 89 113 -107 0 -1 -49 -1362369177 6 6 -11.666666666667 -70 73 -101 0 -1 122 -1365198901 6 6 32.666666666667 196 118 -59 0 -9 114 -1454057357 6 6 -22.666666666667 -136 70 -98 0 -1 106 -1491205016 9 9 10 90 113 -107 0 -1 -50 -1534194097 9 9 6.222222222222 56 102 -111 0 -1 -6 -1538863055 7 7 -7.571428571429 -53 73 -101 0 -1 107 -1787652631 10 10 1.8 18 102 -111 0 -1 32 -1824517658 8 8 -16.125 -129 73 -101 0 -1 -33 -1842680163 7 7 -11.714285714286 -82 70 -98 0 -1 92 -1865307672 11 11 7.545454545455 83 102 -111 0 -1 97 -1995343206 9 9 -22.333333333333 -201 73 -101 0 -1 103 -2013662838 10 10 14.2 142 113 -107 0 -1 -6 -2042457019 12 12 15 180 102 -111 0 -1 0 -2093538928 10 10 -12.4 -124 77 -101 0 -1 42 -2125812933 8 8 -5.125 -41 70 -98 0 -1 117 -2214035726 11 11 -10.090909090909 -111 77 -101 0 -1 39 -2293105904 11 11 2.272727272727 25 113 -117 0 -1 113 -2306130875 13 13 14.076923076923 183 102 -111 0 -1 3 -2307004493 7 7 36.857142857143 258 118 -59 0 -1 76 -2424630722 8 8 31.625 253 118 -59 0 -1 -73 -2496054700 9 9 16.888888888889 152 118 -101 0 -1 44 -2502326480 14 14 9.214285714286 129 102 -111 0 -1 -55 -2525744318 12 12 -2.916666666667 -35 113 -117 0 -1 -75 -2592330556 12 12 1 12 123 -101 0 -1 92 -2610290479 9 9 -0.555555555556 -5 70 -98 0 -1 81 -2669374863 10 10 -1 -10 70 -98 0 -1 -86 -2705709344 13 13 2.153846153846 28 113 -117 0 -1 -118 -2712615025 11 11 2.545454545455 28 70 -98 0 -1 -116 -2778168728 15 15 5.066666666667 76 102 -111 0 -1 2 -2818832252 16 16 -0.1875 -3 102 -111 0 -1 -77 -2830981072 12 12 12.333333333333 148 120 -98 0 -1 -12 -2844041986 14 14 -2.285714285714 -32 113 -117 0 -1 78 -2861376515 13 13 10.769230769231 140 120 -98 0 -1 12 -2861911482 10 10 6.6 66 118 -101 0 -1 -122 -2939920218 15 15 -5 -75 113 -117 0 -1 -101 -3023531799 17 17 -7.058823529412 -120 102 -117 0 -1 56 -3105312559 13 13 6.384615384615 83 123 -101 0 -1 27 -3126475872 18 18 -6.388888888889 -115 102 -117 0 -1 61 -3188005828 16 16 1.375 22 113 -117 0 -1 -6 -3198969145 19 19 -2.157894736842 -41 102 -117 0 -1 119 -3275293996 14 14 12.071428571429 169 120 -98 0 -1 17 -3276123488 15 15 9.6 144 120 -98 0 -1 -10 -3314983189 17 17 4.352941176471 74 113 -117 0 -1 -50 -3342719438 11 11 -1.454545454545 -16 118 -101 0 -1 40 -3373581039 12 12 -4.666666666667 -56 118 -101 0 -1 -16 -3398507249 18 18 5.722222222222 103 113 -117 0 -1 -45 -3455216719 19 19 9 171 113 -117 0 -1 -105 -3457053821 13 13 -7.692307692308 -100 118 -101 0 -1 36 -3473924576 14 14 12.857142857143 180 123 -101 0 -1 122 -3521368277 20 20 2.75 55 102 -117 0 -1 23 -3542840110 16 16 4.5 72 120 -98 0 -1 78 -3566741189 21 21 8.47619047619 178 123 -117 0 -1 108 -3570297463 22 22 5.409090909091 119 123 -117 0 -1 -87 -3577318119 15 15 18.933333333333 284 123 -101 0 -1 18 -3593959807 23 23 1.260869565217 29 123 -117 0 -1 15 -3625286410 17 17 11.588235294118 197 125 -98 0 -1 51 -3717551163 20 20 6.15 123 113 -117 0 -1 71 -3759340273 16 16 24.75 396 123 -101 0 -1 98 -3766999078 18 18 16.666666666667 300 125 -98 0 -1 84 -3862393166 17 17 23.176470588235 394 123 -101 0 -1 -100 -3959216334 18 18 21.222222222222 382 123 -101 0 -1 104 -3998790955 19 19 20.789473684211 395 123 -101 0 -1 101 -4015442341 19 19 20.157894736842 383 125 -98 0 -1 7 -4061635107 21 21 11.666666666667 245 122 -117 0 -1 61 -4076864659 20 20 19.75 395 125 -98 0 -1 11 -4144173353 22 22 8.363636363636 184 122 -117 0 -1 -2 -4216440507 21 21 14.095238095238 296 125 -99 0 -1 -106 -4229654142 22 22 16.681818181818 367 125 -99 0 -1 -47 -4268716378 14 14 -13.857142857143 -194 118 -101 0 -1 -122 +28774375 1 1 true 30 30 30 30 30 30 +63044568 1 1 true 113 113 113 113 113 113 +141047417 1 1 true 36 36 36 36 36 36 +141680161 2 2 true 7 113 -106 16 -9 -25 +145294611 3 3 true 52 113 -106 0 -1 -54 +225513085 1 1 true -98 -98 -98 -98 -98 -98 +243203849 1 1 true -101 -101 -101 -101 -101 -101 +326151275 2 2 true 77 47 30 14 63 49 +431948861 2 2 true -87 14 -101 10 -97 -107 +466439833 3 3 true -24 47 -101 10 -65 -86 +473294098 2 2 true -28 70 -98 6 -34 -40 +520189543 3 3 true -52 70 -98 0 -2 48 +538589788 4 4 true 49 73 -101 8 -1 -29 +557517119 5 5 true -7 73 -101 8 -1 43 +559847112 3 3 true -182 14 -101 0 -65 52 +598822671 4 4 true 23 113 -106 0 -1 41 +662099130 2 2 true 100 64 36 0 100 100 +754775609 4 4 true -165 17 -101 0 -65 37 +774637006 4 4 true -137 70 -98 0 -1 -101 +811650497 6 6 true 48 73 -101 0 -1 28 +879082834 5 5 true -80 70 -98 0 -1 -94 +933879086 7 7 true 65 73 -101 0 -1 13 +974297360 3 3 true 168 68 36 0 100 32 +1000948272 5 5 true 116 113 -106 0 -1 116 +1013876852 4 4 true 137 68 -31 0 -27 -63 +1088543984 5 5 true -92 73 -101 0 -1 108 +1098639440 6 6 true 147 113 -106 0 -1 107 +1157161427 7 7 true 40 113 -107 0 -1 -2 +1229567292 5 5 true 255 118 -31 0 -9 -73 +1243785310 8 8 true -46 73 -111 0 -1 -100 +1289293657 8 8 true 89 113 -107 0 -1 -49 +1362369177 6 6 true -70 73 -101 0 -1 122 +1365198901 6 6 true 196 118 -59 0 -9 114 +1454057357 6 6 true -136 70 -98 0 -1 106 +1491205016 9 9 true 90 113 -107 0 -1 -50 +1534194097 9 9 true 56 102 -111 0 -1 -6 +1538863055 7 7 true -53 73 -101 0 -1 107 +1787652631 10 10 true 18 102 -111 0 -1 32 +1824517658 8 8 true -129 73 -101 0 -1 -33 +1842680163 7 7 true -82 70 -98 0 -1 92 +1865307672 11 11 true 83 102 -111 0 -1 97 +1995343206 9 9 true -201 73 -101 0 -1 103 +2013662838 10 10 true 142 113 -107 0 -1 -6 +2042457019 12 12 true 180 102 -111 0 -1 0 +2093538928 10 10 true -124 77 -101 0 -1 42 +2125812933 8 8 true -41 70 -98 0 -1 117 +2214035726 11 11 true -111 77 -101 0 -1 39 +2293105904 11 11 true 25 113 -117 0 -1 113 +2306130875 13 13 true 183 102 -111 0 -1 3 +2307004493 7 7 true 258 118 -59 0 -1 76 +2424630722 8 8 true 253 118 -59 0 -1 -73 +2496054700 9 9 true 152 118 -101 0 -1 44 +2502326480 14 14 true 129 102 -111 0 -1 -55 +2525744318 12 12 true -35 113 -117 0 -1 -75 +2592330556 12 12 true 12 123 -101 0 -1 92 +2610290479 9 9 true -5 70 -98 0 -1 81 +2669374863 10 10 true -10 70 -98 0 -1 -86 +2705709344 13 13 true 28 113 -117 0 -1 -118 +2712615025 11 11 true 28 70 -98 0 -1 -116 +2778168728 15 15 true 76 102 -111 0 -1 2 +2818832252 16 16 true -3 102 -111 0 -1 -77 +2830981072 12 12 true 148 120 -98 0 -1 -12 +2844041986 14 14 true -32 113 -117 0 -1 78 +2861376515 13 13 true 140 120 -98 0 -1 12 +2861911482 10 10 true 66 118 -101 0 -1 -122 +2939920218 15 15 true -75 113 -117 0 -1 -101 +3023531799 17 17 true -120 102 -117 0 -1 56 +3105312559 13 13 true 83 123 -101 0 -1 27 +3126475872 18 18 true -115 102 -117 0 -1 61 +3188005828 16 16 true 22 113 -117 0 -1 -6 +3198969145 19 19 true -41 102 -117 0 -1 119 +3275293996 14 14 true 169 120 -98 0 -1 17 +3276123488 15 15 true 144 120 -98 0 -1 -10 +3314983189 17 17 true 74 113 -117 0 -1 -50 +3342719438 11 11 true -16 118 -101 0 -1 40 +3373581039 12 12 true -56 118 -101 0 -1 -16 +3398507249 18 18 true 103 113 -117 0 -1 -45 +3455216719 19 19 true 171 113 -117 0 -1 -105 +3457053821 13 13 true -100 118 -101 0 -1 36 +3473924576 14 14 true 180 123 -101 0 -1 122 +3521368277 20 20 true 55 102 -117 0 -1 23 +3542840110 16 16 true 72 120 -98 0 -1 78 +3566741189 21 21 true 178 123 -117 0 -1 108 +3570297463 22 22 true 119 123 -117 0 -1 -87 +3577318119 15 15 true 284 123 -101 0 -1 18 +3593959807 23 23 true 29 123 -117 0 -1 15 +3625286410 17 17 true 197 125 -98 0 -1 51 +3717551163 20 20 true 123 113 -117 0 -1 71 +3759340273 16 16 true 396 123 -101 0 -1 98 +3766999078 18 18 true 300 125 -98 0 -1 84 +3862393166 17 17 true 394 123 -101 0 -1 -100 +3959216334 18 18 true 382 123 -101 0 -1 104 +3998790955 19 19 true 395 123 -101 0 -1 101 +4015442341 19 19 true 383 125 -98 0 -1 7 +4061635107 21 21 true 245 122 -117 0 -1 61 +4076864659 20 20 true 395 125 -98 0 -1 11 +4144173353 22 22 true 184 122 -117 0 -1 -2 +4216440507 21 21 true 296 125 -99 0 -1 -106 +4229654142 22 22 true 367 125 -99 0 -1 -47 +4268716378 14 14 true -194 118 -101 0 -1 -122 query IIIIIIIIII @@ -1167,106 +1280,106 @@ select FROM aggregate_test_100_by_sql ORDER BY c9; ---- -28774375 0.608695652174 14 14 0.590909090909 -63044568 0.954545454545 21 19 0.952380952381 -141047417 0.714285714286 10 10 0.692307692308 -141680161 0.136363636364 3 3 0.095238095238 -145294611 0.590909090909 13 12 0.571428571429 -225513085 0.090909090909 2 2 0.047619047619 -243203849 0.052631578947 1 1 0 -326151275 0.652173913043 15 15 0.636363636364 -431948861 0.473684210526 9 8 0.444444444444 -466439833 0.130434782609 3 3 0.090909090909 -473294098 0.772727272727 17 17 0.761904761905 -520189543 0.318181818182 7 7 0.285714285714 -538589788 0.782608695652 18 18 0.772727272727 -557517119 0.304347826087 7 7 0.272727272727 -559847112 0.105263157895 2 2 0.055555555556 -598822671 0.409090909091 9 8 0.380952380952 -662099130 0.857142857143 12 12 0.846153846154 -754775609 0.578947368421 10 9 0.5 -774637006 0.136363636364 3 3 0.095238095238 -811650497 0.695652173913 16 16 0.681818181818 -879082834 0.727272727273 16 16 0.714285714286 -933879086 0.565217391304 13 13 0.545454545455 -974297360 0.928571428571 13 13 0.923076923077 -1000948272 0.863636363636 19 17 0.857142857143 -1013876852 0.571428571429 8 8 0.538461538462 -1088543984 0.736842105263 14 12 0.722222222222 -1098639440 0.545454545455 12 11 0.52380952381 -1157161427 0.090909090909 2 2 0.047619047619 +28774375 0.6086956521739131 14 14 0.5909090909090909 +63044568 0.9545454545454546 21 19 0.9523809523809523 +141047417 0.7142857142857143 10 10 0.6923076923076923 +141680161 0.13636363636363635 3 3 0.09523809523809523 +145294611 0.5909090909090909 13 12 0.5714285714285714 +225513085 0.09090909090909091 2 2 0.047619047619047616 +243203849 0.05263157894736842 1 1 0 +326151275 0.6521739130434783 15 15 0.6363636363636364 +431948861 0.47368421052631576 9 8 0.4444444444444444 +466439833 0.13043478260869565 3 3 0.09090909090909091 +473294098 0.7727272727272727 17 17 0.7619047619047619 +520189543 0.3181818181818182 7 7 0.2857142857142857 +538589788 0.782608695652174 18 18 0.7727272727272727 +557517119 0.30434782608695654 7 7 0.2727272727272727 +559847112 0.10526315789473684 2 2 0.05555555555555555 +598822671 0.4090909090909091 9 8 0.38095238095238093 +662099130 0.8571428571428571 12 12 0.8461538461538461 +754775609 0.5789473684210527 10 9 0.5 +774637006 0.13636363636363635 3 3 0.09523809523809523 +811650497 0.6956521739130435 16 16 0.6818181818181818 +879082834 0.7272727272727273 16 16 0.7142857142857143 +933879086 0.5652173913043478 13 13 0.5454545454545454 +974297360 0.9285714285714286 13 13 0.9230769230769231 +1000948272 0.8636363636363636 19 17 0.8571428571428571 +1013876852 0.5714285714285714 8 8 0.5384615384615384 +1088543984 0.7368421052631579 14 12 0.7222222222222222 +1098639440 0.5454545454545454 12 11 0.5238095238095238 +1157161427 0.09090909090909091 2 2 0.047619047619047616 1229567292 1 14 14 1 -1243785310 0.086956521739 2 2 0.045454545455 -1289293657 0.636363636364 14 13 0.619047619048 -1362369177 0.631578947368 12 10 0.611111111111 -1365198901 0.357142857143 5 5 0.307692307692 -1454057357 0.227272727273 5 5 0.190476190476 -1491205016 0.454545454545 10 9 0.428571428571 -1534194097 0.95652173913 22 22 0.954545454545 -1538863055 0.578947368421 10 9 0.5 -1787652631 0.434782608696 10 10 0.409090909091 -1824517658 0.157894736842 3 3 0.111111111111 -1842680163 0.681818181818 15 15 0.666666666667 -1865307672 0.739130434783 17 17 0.727272727273 -1995343206 0.210526315789 4 4 0.166666666667 -2013662838 0.727272727273 15 14 0.666666666667 -2042457019 0.913043478261 21 21 0.909090909091 -2093538928 0.789473684211 15 13 0.777777777778 -2125812933 0.636363636364 14 14 0.619047619048 -2214035726 0.421052631579 7 7 0.333333333333 -2293105904 0.045454545455 1 1 0 -2306130875 0.478260869565 11 11 0.454545454545 -2307004493 0.785714285714 11 11 0.769230769231 -2424630722 0.642857142857 9 9 0.615384615385 -2496054700 0.071428571429 1 1 0 -2502326480 0.347826086957 8 8 0.318181818182 -2525744318 0.272727272727 5 5 0.190476190476 +1243785310 0.08695652173913043 2 2 0.045454545454545456 +1289293657 0.6363636363636364 14 13 0.6190476190476191 +1362369177 0.631578947368421 12 10 0.6111111111111112 +1365198901 0.35714285714285715 5 5 0.3076923076923077 +1454057357 0.22727272727272727 5 5 0.19047619047619047 +1491205016 0.45454545454545453 10 9 0.42857142857142855 +1534194097 0.9565217391304348 22 22 0.9545454545454546 +1538863055 0.5789473684210527 10 9 0.5 +1787652631 0.43478260869565216 10 10 0.4090909090909091 +1824517658 0.15789473684210525 3 3 0.1111111111111111 +1842680163 0.6818181818181818 15 15 0.6666666666666666 +1865307672 0.7391304347826086 17 17 0.7272727272727273 +1995343206 0.21052631578947367 4 4 0.16666666666666666 +2013662838 0.7272727272727273 15 14 0.6666666666666666 +2042457019 0.9130434782608695 21 21 0.9090909090909091 +2093538928 0.7894736842105263 15 13 0.7777777777777778 +2125812933 0.6363636363636364 14 14 0.6190476190476191 +2214035726 0.42105263157894735 7 7 0.3333333333333333 +2293105904 0.045454545454545456 1 1 0 +2306130875 0.4782608695652174 11 11 0.45454545454545453 +2307004493 0.7857142857142857 11 11 0.7692307692307693 +2424630722 0.6428571428571429 9 9 0.6153846153846154 +2496054700 0.07142857142857142 1 1 0 +2502326480 0.34782608695652173 8 8 0.3181818181818182 +2525744318 0.2727272727272727 5 5 0.19047619047619047 2592330556 1 19 17 1 -2610290479 0.545454545455 12 12 0.52380952381 -2669374863 0.409090909091 9 9 0.380952380952 -2705709344 0.772727272727 17 15 0.761904761905 -2712615025 0.590909090909 13 13 0.571428571429 -2778168728 0.391304347826 9 9 0.363636363636 -2818832252 0.217391304348 5 5 0.181818181818 -2830981072 0.954545454545 21 21 0.952380952381 -2844041986 0.272727272727 5 5 0.190476190476 -2861376515 0.363636363636 8 8 0.333333333333 -2861911482 0.214285714286 3 3 0.153846153846 -2939920218 0.363636363636 8 7 0.333333333333 -3023531799 0.04347826087 1 1 0 -3105312559 0.684210526316 13 11 0.666666666667 -3126475872 0.521739130435 12 12 0.5 -3188005828 0.909090909091 20 18 0.904761904762 -3198969145 0.826086956522 19 19 0.818181818182 -3275293996 0.5 11 11 0.47619047619 -3276123488 0.272727272727 6 6 0.238095238095 -3314983189 0.727272727273 15 14 0.666666666667 -3342719438 0.285714285714 4 4 0.230769230769 -3373581039 0.5 7 7 0.461538461538 -3398507249 0.5 11 10 0.47619047619 -3455216719 0.818181818182 18 16 0.809523809524 -3457053821 0.428571428571 6 6 0.384615384615 -3473924576 0.842105263158 16 14 0.833333333333 -3521368277 0.869565217391 20 20 0.863636363636 -3542840110 0.181818181818 4 4 0.142857142857 +2610290479 0.5454545454545454 12 12 0.5238095238095238 +2669374863 0.4090909090909091 9 9 0.38095238095238093 +2705709344 0.7727272727272727 17 15 0.7619047619047619 +2712615025 0.5909090909090909 13 13 0.5714285714285714 +2778168728 0.391304347826087 9 9 0.36363636363636365 +2818832252 0.21739130434782608 5 5 0.18181818181818182 +2830981072 0.9545454545454546 21 21 0.9523809523809523 +2844041986 0.2727272727272727 5 5 0.19047619047619047 +2861376515 0.36363636363636365 8 8 0.3333333333333333 +2861911482 0.21428571428571427 3 3 0.15384615384615385 +2939920218 0.36363636363636365 8 7 0.3333333333333333 +3023531799 0.043478260869565216 1 1 0 +3105312559 0.6842105263157895 13 11 0.6666666666666666 +3126475872 0.5217391304347826 12 12 0.5 +3188005828 0.9090909090909091 20 18 0.9047619047619048 +3198969145 0.8260869565217391 19 19 0.8181818181818182 +3275293996 0.5 11 11 0.47619047619047616 +3276123488 0.2727272727272727 6 6 0.23809523809523808 +3314983189 0.7272727272727273 15 14 0.6666666666666666 +3342719438 0.2857142857142857 4 4 0.23076923076923078 +3373581039 0.5 7 7 0.46153846153846156 +3398507249 0.5 11 10 0.47619047619047616 +3455216719 0.8181818181818182 18 16 0.8095238095238095 +3457053821 0.42857142857142855 6 6 0.38461538461538464 +3473924576 0.8421052631578947 16 14 0.8333333333333334 +3521368277 0.8695652173913043 20 20 0.8636363636363636 +3542840110 0.18181818181818182 4 4 0.14285714285714285 3566741189 1 23 23 1 -3570297463 0.260869565217 6 6 0.227272727273 -3577318119 0.894736842105 17 15 0.888888888889 -3593959807 0.173913043478 4 4 0.136363636364 +3570297463 0.2608695652173913 6 6 0.22727272727272727 +3577318119 0.8947368421052632 17 15 0.8888888888888888 +3593959807 0.17391304347826086 4 4 0.13636363636363635 3625286410 1 22 22 1 -3717551163 0.318181818182 7 6 0.285714285714 -3759340273 0.947368421053 18 16 0.944444444444 -3766999078 0.909090909091 20 20 0.904761904762 -3862393166 0.315789473684 6 6 0.277777777778 -3959216334 0.263157894737 5 5 0.222222222222 -3998790955 0.421052631579 7 7 0.333333333333 -4015442341 0.863636363636 19 19 0.857142857143 +3717551163 0.3181818181818182 7 6 0.2857142857142857 +3759340273 0.9473684210526315 18 16 0.9444444444444444 +3766999078 0.9090909090909091 20 20 0.9047619047619048 +3862393166 0.3157894736842105 6 6 0.2777777777777778 +3959216334 0.2631578947368421 5 5 0.2222222222222222 +3998790955 0.42105263157894735 7 7 0.3333333333333333 +4015442341 0.8636363636363636 19 19 0.8571428571428571 4061635107 1 22 20 1 -4076864659 0.454545454545 10 10 0.428571428571 -4144173353 0.181818181818 4 4 0.142857142857 -4216440507 0.045454545455 1 1 0 -4229654142 0.818181818182 18 18 0.809523809524 -4268716378 0.142857142857 2 2 0.076923076923 +4076864659 0.45454545454545453 10 10 0.42857142857142855 +4144173353 0.18181818181818182 4 4 0.14285714285714285 +4216440507 0.045454545454545456 1 1 0 +4229654142 0.8181818181818182 18 18 0.8095238095238095 +4268716378 0.14285714285714285 2 2 0.07692307692307693 query IIIIIII diff --git a/datafusion/sqllogictest/test_files/predicates.slt b/datafusion/sqllogictest/test_files/predicates.slt index 878d7c8a4dfbf..e54923ebd7cd7 100644 --- a/datafusion/sqllogictest/test_files/predicates.slt +++ b/datafusion/sqllogictest/test_files/predicates.slt @@ -50,8 +50,8 @@ CREATE EXTERNAL TABLE alltypes_plain STORED AS PARQUET LOCATION '../../parquet-t query TR SELECT c1, c12 FROM aggregate_test_100 WHERE c12 > 0.376 AND c12 < 0.4 ---- -e 0.391444365692 -d 0.38870280984 +e 0.39144436569161134 +d 0.38870280983958583 # async fn csv_query_with_negative_predicate query TI diff --git a/datafusion/sqllogictest/test_files/projection.slt b/datafusion/sqllogictest/test_files/projection.slt index b5bcb5b4c6f77..30a132e761840 100644 --- a/datafusion/sqllogictest/test_files/projection.slt +++ b/datafusion/sqllogictest/test_files/projection.slt @@ -89,11 +89,11 @@ SELECT c1 as c3 FROM aggregate_simple ORDER BY c3 LIMIT 2; query RT rowsort SELECT avg(c12), c1 FROM aggregate_test_100 GROUP BY c1; ---- -0.410407092638 b -0.486006692713 e -0.487545174661 a -0.488553793875 d -0.660045653644 c +0.41040709263815384 b +0.48600669271341534 e +0.48754517466109415 a +0.48855379387549824 d +0.6600456536439784 c # parallel projection query II diff --git a/datafusion/sqllogictest/test_files/scalar.slt b/datafusion/sqllogictest/test_files/scalar.slt index fe7d1a90c5bd4..231bf22958a9f 100644 --- a/datafusion/sqllogictest/test_files/scalar.slt +++ b/datafusion/sqllogictest/test_files/scalar.slt @@ -93,7 +93,7 @@ select abs(a), abs(b), abs(c) from signed_integers; query RRR rowsort select acos(0), acos(0.5), acos(1); ---- -1.570796326795 1.047197551197 0 +1.5707963267948966 1.0471975511965976 0 # acos scalar nulls query R rowsort @@ -140,7 +140,7 @@ NaN 9.90349 NaN query RRR rowsort select asin(0), asin(0.5), asin(1); ---- -0 0.523598775598 1.570796326795 +0 0.5235987755982988 1.5707963267948966 # asin scalar nulls query R rowsort @@ -187,7 +187,7 @@ select round(asinh(a), 5), round(asinh(b), 5), round(asinh(c), 5) from small_flo query RRR rowsort select atan(0), atan(cbrt(3)), atan(1); ---- -0 0.964539792856 0.785398163397 +0 0.9645397928556647 0.7853981633974483 # atan scalar nulls query R rowsort @@ -211,7 +211,7 @@ select round(atan(a), 5), round(atan(b), 5), round(atan(c), 5) from small_floats query RRR rowsort select atanh((exp(2) - 1) / (exp(2) + 1)), atanh((exp(4) - 1) / (exp(4) + 1)), atanh((exp(6) - 1) / (exp(6) + 1)); ---- -1 2 3 +0.9999999999999999 2.0000000000000004 3.0000000000000013 # atanh scalar nulls query R rowsort @@ -304,10 +304,10 @@ NULL query RRR rowsort select ceil(a), ceil(b), ceil(c) from small_floats; ---- +-0 1 -1 -1 NULL NULL -0 1 -1 -1 0 0 -1 0 1 +1 -0 0 +1 -0 1 ## degrees @@ -338,7 +338,7 @@ select round(degrees(a), 5), round(degrees(e), 5), round(degrees(f), 5) from sig query RRR rowsort select cos(0), cos(pi() / 3), cos(pi() / 2); ---- -1 0.5 0 +1 0.5000000000000001 6.123233995736766e-17 # cos scalar nulls query R rowsort @@ -362,7 +362,7 @@ select round(cos(a), 5), round(cos(b), 5), round(cos(c), 5) from signed_integers query RRR rowsort select cosh(1), cosh(2), cosh(3); ---- -1.543080634815 3.762195691084 10.067661995778 +1.5430806348152437 3.7621956910836314 10.067661995777765 # cosh scalar nulls query R rowsort @@ -385,7 +385,7 @@ select round(cosh(a), 5), round(cosh(b), 5), round(cosh(c), 5) from small_floats query RRR rowsort select exp(0), exp(1), exp(2); ---- -1 2.718281828459 7.389056098931 +1 2.718281828459045 7.38905609893065 # exp scalar nulls query R rowsort @@ -454,7 +454,7 @@ select floor(a), floor(b), floor(c) from signed_integers; query RRR rowsort select ln(1), ln(exp(1)), ln(3); ---- -0 1 1.098612288668 +0 1 1.0986122886681098 # ln scalar nulls query R rowsort @@ -509,7 +509,7 @@ NULL NULL query RR rowsort select log(2, 2.0/3) a, log(10, 2.0/3) b; ---- --0.584962500721 -0.176091259056 +-0.5849625007211563 -0.17609125905568124 # log scalar ops with zero edgecases # please see https://github.com/apache/datafusion/pull/5245#issuecomment-1426828382 @@ -546,8 +546,8 @@ select log(arrow_cast(10, 'Float64')) a ,log(arrow_cast(100, 'Float32')) b; query RR rowsort select log(arrow_cast(a, 'Float64')), log(arrow_cast(b, 'Float32')) from signed_integers; ---- -0.301029995664 NaN -0.602059991328 NULL +0.30102999566398114 NaN +0.6020599913279623 NULL NaN 2 NaN 4 @@ -585,7 +585,7 @@ NULL query R rowsort select log10(2.0/3); ---- --0.176091259056 +-0.17609125905568127 # log10 scalar ops with zero edgecases # please see https://github.com/apache/datafusion/pull/5245#issuecomment-1426828382 @@ -621,7 +621,7 @@ NULL query R rowsort select log2(2.0/3); ---- --0.584962500721 +-0.5849625007211563 # log2 scalar ops with zero edgecases # please see https://github.com/apache/datafusion/pull/5245#issuecomment-1426828382 @@ -726,7 +726,7 @@ NULL NULL NULL NULL query RRR rowsort select pi(), pi() / 2, pi() / 3; ---- -3.14159265359 1.570796326795 1.047197551197 +3.141592653589793 1.5707963267948966 1.0471975511965976 ## power @@ -769,7 +769,7 @@ NaN NaN 2.32282 query RRR rowsort select radians(0), radians(90), radians(180); ---- -0 1.570796326795 3.14159265359 +0 1.5707963267948966 3.141592653589793 # radians scalar nulls query R rowsort @@ -806,8 +806,8 @@ select round(a), round(b), round(c) from small_floats; ---- -1 0 -1 -1 NULL NULL -0 0 1 -1 0 0 +0 -0 1 +1 -0 0 # round with too large # max Int32 is 2147483647 @@ -848,7 +848,7 @@ select signum(a), signum(b), signum(c) from signed_integers; query RRR rowsort select sin(0), sin(pi() / 3), sin(pi() / 2); ---- -0 0.866025403784 1 +0 0.8660254037844386 1 # sin scalar nulls query R rowsort @@ -872,7 +872,7 @@ select round(sin(a), 5), round(sin(b), 5), round(sin(c), 5) from small_floats; query RRR rowsort select sinh(1), sinh(2), sinh(3); ---- -1.175201193644 3.626860407847 10.01787492741 +1.1752011936438014 3.6268604078470186 10.017874927409903 # sinh scalar nulls query R rowsort @@ -916,7 +916,7 @@ NaN 100 NaN query RR rowsort select sqrt(1.4), sqrt(2.0/3); ---- -1.18321595662 0.816496580928 +1.1832159566199232 0.816496580927726 # sqrt scalar cast query R rowsort @@ -937,7 +937,7 @@ NaN query RRR rowsort select tan(0), tan(pi() / 6), tan(pi() / 4); ---- -0 0.57735026919 1 +0 0.5773502691896256 0.9999999999999999 # tan scalar nulls query R rowsort @@ -961,7 +961,7 @@ select round(tan(a), 5), round(tan(b), 5), round(tan(c), 5) from small_floats; query RRR rowsort select tanh(1), tanh(2), tanh(3); ---- -0.761594155956 0.964027580076 0.995054753687 +0.7615941559557649 0.9640275800758169 0.9950547536867305 # tanh scalar nulls query R rowsort @@ -996,10 +996,10 @@ NULL query RRR rowsort select trunc(a), trunc(b), trunc(c) from small_floats; ---- +-0 0 -1 -1 NULL NULL -0 0 -1 -0 0 0 -0 0 1 +0 -0 0 +0 -0 1 # trunc with precision query RRRRR rowsort @@ -1360,13 +1360,13 @@ SELECT COUNT(*), COUNT(1) AS c, COUNT(c1) FROM aggregate_test_100 query R SELECT sqrt(sqrt(c12)) FROM aggregate_test_100 LIMIT 1 ---- -0.98186505614 +0.9818650561397431 # csv query cbrt cbrt query R SELECT cbrt(cbrt(c12)) FROM aggregate_test_100 LIMIT 1 ---- -0.991899036678 +0.9918990366780552 # csv query cast query R rowsort @@ -1379,8 +1379,8 @@ SELECT CAST(c12 AS float) FROM aggregate_test_100 WHERE c12 > 0.376 AND c12 < 0. query RR rowsort SELECT c12, CAST(1 AS float) FROM aggregate_test_100 WHERE c12 > CAST(0 AS float) LIMIT 2 ---- -0.311471253986 1 -0.929409733247 1 +0.3114712539863804 1 +0.9294097332465232 1 statement ok drop table aggregate_test_100 @@ -1570,7 +1570,7 @@ drop table test_int32 query RRRR SELECT 0e0 AS c1, 0.e-0 AS c2, -.0e+0 AS c3, 00.00e-00 AS c4 ---- -0 0 0 0 +0 0 -0 0 # scientific notation (integer) query RRRR @@ -1595,7 +1595,7 @@ SELECT -2.e-1, 0.e0, .0002E+3, .02E+2; query RRRR SELECT -1.79e309, -2.22e-309, 2.22E-309, 1.79E+309; ---- --Infinity 0 0 Infinity +-Infinity -2.22e-309 2.22e-309 Infinity # scientific notation (other edgecases) query IRRR diff --git a/datafusion/sqllogictest/test_files/select.slt b/datafusion/sqllogictest/test_files/select.slt index c687429ae6ecf..7b6fc8ddc39a2 100644 --- a/datafusion/sqllogictest/test_files/select.slt +++ b/datafusion/sqllogictest/test_files/select.slt @@ -824,11 +824,11 @@ SELECT ALL c1 FROM aggregate_simple order by c1 query RRB rowsort SELECT DISTINCT * FROM aggregate_simple ---- -0.00001 0.000000000001 true -0.00002 0.000000000002 false -0.00003 0.000000000003 true -0.00004 0.000000000004 false -0.00005 0.000000000005 true +0.00001 1e-12 true +0.00002 2e-12 false +0.00003 3e-12 true +0.00004 4e-12 false +0.00005 5e-12 true # select distinct with projection and order by query R @@ -844,11 +844,11 @@ SELECT DISTINCT c1 FROM aggregate_simple order by c1 query RR SELECT DISTINCT c1, c2 FROM aggregate_simple order by c1 ---- -0.00001 0.000000000001 -0.00002 0.000000000002 -0.00003 0.000000000003 -0.00004 0.000000000004 -0.00005 0.000000000005 +0.00001 1e-12 +0.00002 2e-12 +0.00003 3e-12 +0.00004 4e-12 +0.00005 5e-12 # select distinct boolean column query B @@ -861,11 +861,11 @@ true query R rowsort SELECT DISTINCT c1 + c2 AS a FROM aggregate_simple ---- -0.000010000001 -0.000020000001 -0.000030000002 -0.000040000003 -0.000050000004 +0.000010000000747378751 +0.000020000001494757502 +0.000030000002242136256 +0.000040000002989515004 +0.00005000000373689376 # select distinct from query BBBBBBBB diff --git a/datafusion/sqllogictest/test_files/topk.slt b/datafusion/sqllogictest/test_files/topk.slt index 1dbce79e0f1a6..11ec3ada8ba82 100644 --- a/datafusion/sqllogictest/test_files/topk.slt +++ b/datafusion/sqllogictest/test_files/topk.slt @@ -193,11 +193,11 @@ ydkwycaISlYSlEq3TlkS2m15I2pcp8 query TIIIIIIIITRRT select * from aggregate_test_100 ORDER BY c13 desc limit 5; ---- -a 4 -38 20744 762932956 308913475857409919 7 45465 1787652631 878137512938218976 0.7459874 0.021825780392 ydkwycaISlYSlEq3TlkS2m15I2pcp8 -d 1 -98 13630 -1991133944 1184110014998006843 220 2986 225513085 9634106610243643486 0.89651865 0.164088254508 y7C453hRWd4E7ImjNDWlpexB8nUqjh -e 2 52 -12056 -1090239422 9011500141803970147 238 4168 2013662838 12565360638488684051 0.6694766 0.391444365692 xipQ93429ksjNcXPX5326VSg1xJZcW -d 1 -72 25590 1188089983 3090286296481837049 241 832 3542840110 5885937420286765261 0.41980565 0.215354023438 wwXqSGKLyBQyPkonlzBNYUJTCo4LRS -a 1 -5 12636 794623392 2909750622865366631 15 24022 2669374863 4776679784701509574 0.29877836 0.253725340799 waIGbOGl1PM6gnzZ4uuZt4E2yDWRHs +a 4 -38 20744 762932956 308913475857409919 7 45465 1787652631 878137512938218976 0.7459874 0.02182578039211991 ydkwycaISlYSlEq3TlkS2m15I2pcp8 +d 1 -98 13630 -1991133944 1184110014998006843 220 2986 225513085 9634106610243643486 0.89651865 0.1640882545084913 y7C453hRWd4E7ImjNDWlpexB8nUqjh +e 2 52 -12056 -1090239422 9011500141803970147 238 4168 2013662838 12565360638488684051 0.6694766 0.39144436569161134 xipQ93429ksjNcXPX5326VSg1xJZcW +d 1 -72 25590 1188089983 3090286296481837049 241 832 3542840110 5885937420286765261 0.41980565 0.21535402343780985 wwXqSGKLyBQyPkonlzBNYUJTCo4LRS +a 1 -5 12636 794623392 2909750622865366631 15 24022 2669374863 4776679784701509574 0.29877836 0.2537253407987472 waIGbOGl1PM6gnzZ4uuZt4E2yDWRHs @@ -208,12 +208,11 @@ set datafusion.execution.batch_size = 2 query TIIIIIIIITRRT select * from aggregate_test_100 ORDER BY c13 desc limit 5; ---- -a 4 -38 20744 762932956 308913475857409919 7 45465 1787652631 878137512938218976 0.7459874 0.021825780392 ydkwycaISlYSlEq3TlkS2m15I2pcp8 -d 1 -98 13630 -1991133944 1184110014998006843 220 2986 225513085 9634106610243643486 0.89651865 0.164088254508 y7C453hRWd4E7ImjNDWlpexB8nUqjh -e 2 52 -12056 -1090239422 9011500141803970147 238 4168 2013662838 12565360638488684051 0.6694766 0.391444365692 xipQ93429ksjNcXPX5326VSg1xJZcW -d 1 -72 25590 1188089983 3090286296481837049 241 832 3542840110 5885937420286765261 0.41980565 0.215354023438 wwXqSGKLyBQyPkonlzBNYUJTCo4LRS -a 1 -5 12636 794623392 2909750622865366631 15 24022 2669374863 4776679784701509574 0.29877836 0.253725340799 waIGbOGl1PM6gnzZ4uuZt4E2yDWRHs - +a 4 -38 20744 762932956 308913475857409919 7 45465 1787652631 878137512938218976 0.7459874 0.02182578039211991 ydkwycaISlYSlEq3TlkS2m15I2pcp8 +d 1 -98 13630 -1991133944 1184110014998006843 220 2986 225513085 9634106610243643486 0.89651865 0.1640882545084913 y7C453hRWd4E7ImjNDWlpexB8nUqjh +e 2 52 -12056 -1090239422 9011500141803970147 238 4168 2013662838 12565360638488684051 0.6694766 0.39144436569161134 xipQ93429ksjNcXPX5326VSg1xJZcW +d 1 -72 25590 1188089983 3090286296481837049 241 832 3542840110 5885937420286765261 0.41980565 0.21535402343780985 wwXqSGKLyBQyPkonlzBNYUJTCo4LRS +a 1 -5 12636 794623392 2909750622865366631 15 24022 2669374863 4776679784701509574 0.29877836 0.2537253407987472 waIGbOGl1PM6gnzZ4uuZt4E2yDWRHs ## make an example for dictionary encoding diff --git a/datafusion/sqllogictest/test_files/wildcard.slt b/datafusion/sqllogictest/test_files/wildcard.slt index 7c076f040feb7..4d9324158e306 100644 --- a/datafusion/sqllogictest/test_files/wildcard.slt +++ b/datafusion/sqllogictest/test_files/wildcard.slt @@ -52,41 +52,41 @@ OPTIONS ('format.has_header' 'true'); query RRB nosort SELECT agg.* FROM aggregate_simple as agg ORDER BY c1 ---- -0.00001 0.000000000001 true -0.00002 0.000000000002 false -0.00002 0.000000000002 false -0.00003 0.000000000003 true -0.00003 0.000000000003 true -0.00003 0.000000000003 true -0.00004 0.000000000004 false -0.00004 0.000000000004 false -0.00004 0.000000000004 false -0.00004 0.000000000004 false -0.00005 0.000000000005 true -0.00005 0.000000000005 true -0.00005 0.000000000005 true -0.00005 0.000000000005 true -0.00005 0.000000000005 true +0.00001 1e-12 true +0.00002 2e-12 false +0.00002 2e-12 false +0.00003 3e-12 true +0.00003 3e-12 true +0.00003 3e-12 true +0.00004 4e-12 false +0.00004 4e-12 false +0.00004 4e-12 false +0.00004 4e-12 false +0.00005 5e-12 true +0.00005 5e-12 true +0.00005 5e-12 true +0.00005 5e-12 true +0.00005 5e-12 true # select_non_alias_qualified_wildcard query RRB nosort SELECT aggregate_simple.* FROM aggregate_simple ORDER BY c1 ---- -0.00001 0.000000000001 true -0.00002 0.000000000002 false -0.00002 0.000000000002 false -0.00003 0.000000000003 true -0.00003 0.000000000003 true -0.00003 0.000000000003 true -0.00004 0.000000000004 false -0.00004 0.000000000004 false -0.00004 0.000000000004 false -0.00004 0.000000000004 false -0.00005 0.000000000005 true -0.00005 0.000000000005 true -0.00005 0.000000000005 true -0.00005 0.000000000005 true -0.00005 0.000000000005 true +0.00001 1e-12 true +0.00002 2e-12 false +0.00002 2e-12 false +0.00003 3e-12 true +0.00003 3e-12 true +0.00003 3e-12 true +0.00004 4e-12 false +0.00004 4e-12 false +0.00004 4e-12 false +0.00004 4e-12 false +0.00005 5e-12 true +0.00005 5e-12 true +0.00005 5e-12 true +0.00005 5e-12 true +0.00005 5e-12 true # select_qualified_wildcard_join query ITIITI nosort diff --git a/datafusion/sqllogictest/test_files/window.slt b/datafusion/sqllogictest/test_files/window.slt index 6c48ac68ab6b3..467854dc6e29e 100644 --- a/datafusion/sqllogictest/test_files/window.slt +++ b/datafusion/sqllogictest/test_files/window.slt @@ -450,7 +450,7 @@ ORDER BY c9 LIMIT 5 ---- -48302 -16100.666666666666 3 -11243 3747.666666666666 3 +11243 3747.6666666666665 3 -51311 -17103.666666666668 3 -2391 -797 3 46756 15585.333333333334 3 @@ -467,11 +467,11 @@ FROM aggregate_test_100 ORDER BY c9 LIMIT 5 ---- -46721.33333333174 31147.555555554496 216.151181660734 176.486700789477 -2639429.333333332 1759619.5555555548 1624.632060908971 1326.50652299774 -746202.3333333324 497468.2222222216 863.830037295146 705.314271954156 -768422.9999999981 512281.9999999988 876.597399037892 715.738779164577 -66526.3333333288 44350.88888888587 257.926992254259 210.596507304575 +46721.33333333174 31147.555555554496 216.15118166073427 176.4867007894773 +2639429.333333332 1759619.5555555548 1624.6320609089714 1326.5065229977404 +746202.3333333324 497468.2222222216 863.8300372951455 705.3142719541563 +768422.9999999981 512281.9999999988 876.5973990378925 715.7387791645767 +66526.3333333288 44350.88888888587 257.9269922542594 210.5965073045749 # window_frame_rows_preceding_with_partition_unique_order_by query IRI @@ -886,11 +886,11 @@ SELECT ORDER BY C9 LIMIT 5 ---- -2.547670180363 -10.629941254821 -2.547670180363 -20.349518503437 -21.408674363508 +2.5476701803634296 +10.6299412548214 +2.5476701803634296 +20.349518503437288 +21.408674363507753 #fn window_frame_ranges_timestamp @@ -1161,10 +1161,10 @@ SELECT ORDER BY c9 LIMIT 5 ---- -28774375 80 80 5 5 0.79797979798 0.79797979798 -63044568 62 62 4 4 0.616161616162 0.616161616162 +28774375 80 80 5 5 0.797979797979798 0.797979797979798 +63044568 62 62 4 4 0.6161616161616161 0.6161616161616161 141047417 1 1 1 1 0 0 -141680161 41 41 3 3 0.40404040404 0.40404040404 +141680161 41 41 3 3 0.40404040404040403 0.40404040404040403 145294611 1 1 1 1 0 0 #fn test_lag_lead @@ -2219,11 +2219,11 @@ SELECT SUM(c12) OVER(ORDER BY c1, c2 GROUPS BETWEEN 1 PRECEDING AND 1 FOLLOWING) SUM(c12) OVER(ORDER BY c1 GROUPS BETWEEN 5 PRECEDING AND 3 PRECEDING) as sum2 FROM aggregate_test_100 ORDER BY c9 LIMIT 5 ---- -4.561269874379 18.036183428008 -6.808931568966 10.238448667883 -2.994840293343 NULL -9.674390599321 NULL -7.728066219895 NULL +4.561269874378835 18.036183428007902 +6.808931568965548 10.238448667882977 +2.9948402933428193 NULL +9.674390599320919 NULL +7.72806621989478 NULL # test_c9_rn_ordering_alias # These tests check whether DataFusion is aware of the ordering generated by the ROW_NUMBER() window function. @@ -2760,9 +2760,9 @@ SELECT ORDER BY inc_col ASC LIMIT 5 ---- -16 6 1 1 10 5 3 2 5.333333333333 3 -16 6 1 1 10 5 3 2 5.333333333333 3 -51 16 1 1 20 10 5 3 10.2 5.333333333333 +16 6 1 1 10 5 3 2 5.333333333333333 3 +16 6 1 1 10 5 3 2 5.333333333333333 3 +51 16 1 1 20 10 5 3 10.2 5.333333333333333 72 72 1 1 21 21 6 6 12 12 72 72 1 1 21 21 6 6 12 12 @@ -3303,11 +3303,11 @@ SELECT ORDER BY C3, max2 LIMIT 5 ---- --117 0.850672105305 0.850672105305 --117 0.970671228336 0.970671228336 --111 0.152498292972 0.152498292972 --107 0.369363046006 0.369363046006 --106 0.56535284223 0.56535284223 +-117 0.8506721053047003 0.8506721053047003 +-117 0.9706712283358269 0.9706712283358269 +-111 0.152498292971736 0.152498292971736 +-107 0.36936304600612724 0.36936304600612724 +-106 0.565352842229935 0.565352842229935 query TT EXPLAIN SELECT @@ -3350,11 +3350,11 @@ SELECT ORDER BY C3, min1 LIMIT 5 ---- --117 0.850672105305 0.014793053078 --117 0.970671228336 0.014793053078 --111 0.152498292972 0.014793053078 --107 0.369363046006 0.014793053078 --106 0.56535284223 0.014793053078 +-117 0.8506721053047003 0.01479305307777301 +-117 0.9706712283358269 0.01479305307777301 +-111 0.152498292971736 0.01479305307777301 +-107 0.36936304600612724 0.01479305307777301 +-106 0.565352842229935 0.01479305307777301 query TT EXPLAIN SELECT @@ -5098,8 +5098,8 @@ select percent_rank() over (order by bool_col) from t1; ---- 0 0 -0.666666666667 -0.666666666667 +0.6666666666666666 +0.6666666666666666 query I select ntile(2) over (order by bool_col) from t1; @@ -5120,9 +5120,9 @@ select from t1 order by id; ---- -3 3 2 1 0.666666666667 2 +3 3 2 1 0.6666666666666666 2 1 1 1 0.5 0 1 -4 3 2 1 0.666666666667 2 +4 3 2 1 0.6666666666666666 2 2 1 1 0.5 0 1 statement ok