From 49466f2d028b68b4a1c564d2eecdda9358f2a831 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Thu, 12 Dec 2024 15:23:25 +0100 Subject: [PATCH] Round floats but not decimals in SqlLogicTests - stop rounding decimal values in SLT. It's the very nature of decimal arithmetics that it should in general be exact. - round float values taking into account the bit width of the float. The Float64 carries more information than Float32 or Float16. --- .../sqllogictest/src/engines/conversion.rs | 217 ++++-- .../sqllogictest/test_files/aggregate.slt | 304 ++++---- .../test_files/aggregate_skip_partial.slt | 146 ++-- datafusion/sqllogictest/test_files/array.slt | 24 +- .../sqllogictest/test_files/arrow_typeof.slt | 2 +- .../sqllogictest/test_files/clickbench.slt | 2 +- .../sqllogictest/test_files/coalesce.slt | 4 +- datafusion/sqllogictest/test_files/ddl.slt | 2 +- .../sqllogictest/test_files/decimal.slt | 622 ++++++++-------- .../sqllogictest/test_files/distinct_on.slt | 6 +- datafusion/sqllogictest/test_files/expr.slt | 8 +- .../test_files/expr/date_part.slt | 10 +- .../sqllogictest/test_files/functions.slt | 16 +- datafusion/sqllogictest/test_files/group.slt | 70 +- .../sqllogictest/test_files/group_by.slt | 2 +- datafusion/sqllogictest/test_files/join.slt | 4 +- datafusion/sqllogictest/test_files/joins.slt | 20 +- 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 | 212 +++--- .../test_files/pg_compat/pg_compat_types.slt | 2 +- .../test_files/pg_compat/pg_compat_window.slt | 666 +++++++++--------- .../sqllogictest/test_files/predicates.slt | 6 +- .../sqllogictest/test_files/projection.slt | 10 +- datafusion/sqllogictest/test_files/scalar.slt | 64 +- datafusion/sqllogictest/test_files/select.slt | 10 +- datafusion/sqllogictest/test_files/topk.slt | 20 +- datafusion/sqllogictest/test_files/window.slt | 86 +-- 29 files changed, 1307 insertions(+), 1244 deletions(-) diff --git a/datafusion/sqllogictest/src/engines/conversion.rs b/datafusion/sqllogictest/src/engines/conversion.rs index 58b34d2483247..f640111ba4325 100644 --- a/datafusion/sqllogictest/src/engines/conversion.rs +++ b/datafusion/sqllogictest/src/engines/conversion.rs @@ -16,7 +16,7 @@ // under the License. use arrow::datatypes::{i256, Decimal128Type, Decimal256Type, DecimalType}; -use bigdecimal::BigDecimal; +use bigdecimal::{BigDecimal, RoundingMode}; use half::f16; use rust_decimal::prelude::*; @@ -40,34 +40,18 @@ 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()) - } + float_to_str(value.into(), 4) } pub(crate) fn f32_to_str(value: f32) -> 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 == f32::INFINITY { - "Infinity".to_string() - } else if value == f32::NEG_INFINITY { - "-Infinity".to_string() - } else { - big_decimal_to_str(BigDecimal::from_str(&value.to_string()).unwrap()) - } + float_to_str(value.into(), 6) } pub(crate) fn f64_to_str(value: f64) -> String { + float_to_str(value, 10) +} + +fn float_to_str(value: f64, max_significant_digits: u8) -> String { if value.is_nan() { // The sign of NaN can be different depending on platform. // So the string representation of NaN ignores the sign. @@ -77,79 +61,158 @@ 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()) + let mut big_decimal = BigDecimal::from_f64(value) + .unwrap() + // Truncate trailing decimal zeros + .normalized(); + let precision = big_decimal.digits(); + if precision > max_significant_digits as u64 { + let scale = big_decimal.as_bigint_and_exponent().1; + big_decimal = big_decimal + .with_scale_round( + scale + (max_significant_digits as i64 - precision as i64), + RoundingMode::HalfUp, + ) + // Truncate trailing decimal zeros + .normalized(); + } + big_decimal.to_plain_string() } } pub(crate) fn decimal_128_to_str(value: i128, scale: i8) -> String { let precision = u8::MAX; // does not matter - big_decimal_to_str( - BigDecimal::from_str(&Decimal128Type::format_decimal(value, precision, scale)) - .unwrap(), - ) + BigDecimal::from_str(&Decimal128Type::format_decimal(value, precision, scale)) + .unwrap() + .to_plain_string() } pub(crate) fn decimal_256_to_str(value: i256, scale: i8) -> String { let precision = u8::MAX; // does not matter - big_decimal_to_str( - BigDecimal::from_str(&Decimal256Type::format_decimal(value, precision, scale)) - .unwrap(), - ) + BigDecimal::from_str(&Decimal256Type::format_decimal(value, precision, scale)) + .unwrap() + .to_plain_string() } #[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 - value.to_plain_string() + BigDecimal::from_str(&value.to_string()) + .unwrap() + .to_plain_string() } #[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 - ); - }; + use super::*; + use half::f16; + + #[test] + fn test_f16_to_str() { + assert_eq!(f16_to_str(f16::from_f32(0.)), "0"); + assert_eq!(f16_to_str(f16::from_f32(1.)), "1"); + assert_eq!(f16_to_str(f16::from_f32(12.345)), "12.34"); + assert_eq!(f16_to_str(f16::from_f32(-12.345)), "-12.34"); + assert_eq!(f16_to_str(f16::MAX), "65500"); + assert_eq!(f16_to_str(f16::MIN), "-65500"); + assert_eq!(f16_to_str(f16::EPSILON), "0.0009766"); + assert_eq!(f16_to_str(f16::from_f32(f32::INFINITY)), "Infinity"); + assert_eq!(f16_to_str(f16::from_f32(f32::NEG_INFINITY)), "-Infinity"); + assert_eq!(f16_to_str(f16::from_f32(f32::NAN)), "NaN"); + } + + #[test] + fn test_f32_to_str() { + assert_eq!(f32_to_str(0.), "0"); + assert_eq!(f32_to_str(1.), "1"); + assert_eq!(f32_to_str(12.345), "12.345"); + assert_eq!(f32_to_str(-12.345), "-12.345"); + assert_eq!(f32_to_str(0.0000012345), "0.0000012345"); + assert_eq!(f32_to_str(-0.0000012345), "-0.0000012345"); + assert_eq!(f32_to_str(12.345678), "12.3457"); + assert_eq!(f32_to_str(-12.345678), "-12.3457"); + assert_eq!( + f32_to_str(f32::MAX), + "340282000000000000000000000000000000000" + ); + assert_eq!( + f32_to_str(f32::MIN), + "-340282000000000000000000000000000000000" + ); + assert_eq!(f32_to_str(f32::EPSILON), "0.000000119209"); + assert_eq!(f32_to_str(f32::INFINITY), "Infinity"); + assert_eq!(f32_to_str(f32::NEG_INFINITY), "-Infinity"); + assert_eq!(f32_to_str(f32::NAN), "NaN"); + } + + #[test] + fn test_f64_to_str() { + assert_eq!(f64_to_str(0.), "0"); + assert_eq!(f64_to_str(1.), "1"); + assert_eq!(f64_to_str(12.345), "12.345"); + assert_eq!(f64_to_str(-12.345), "-12.345"); + assert_eq!(f64_to_str(12.345678), "12.345678"); + assert_eq!(f64_to_str(-12.345678), "-12.345678"); + assert_eq!(f64_to_str(0.00000000012345678), "0.00000000012345678"); + assert_eq!(f64_to_str(-0.00000000012345678), "-0.00000000012345678"); + assert_eq!(f64_to_str(12.34567890123456), "12.3456789"); + assert_eq!(f64_to_str(-12.34567890123456), "-12.3456789"); + assert_eq!(f64_to_str(0.99999999999999999999999), "1"); + assert_eq!(f64_to_str(0.0000000000999999999999999), "0.0000000001"); + assert_eq!(f64_to_str(f64::MAX), "179769313500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); + assert_eq!(f64_to_str(f64::MIN), "-179769313500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); + assert_eq!(f64_to_str(f64::EPSILON), "0.0000000000000002220446049"); + assert_eq!(f64_to_str(f64::INFINITY), "Infinity"); + assert_eq!(f64_to_str(f64::NEG_INFINITY), "-Infinity"); + assert_eq!(f64_to_str(f64::NAN), "NaN"); + } + + #[test] + fn test_decimal_128_to_str() { + assert_eq!(decimal_128_to_str(1, 0), "1"); + assert_eq!(decimal_128_to_str(1, 5), "0.00001"); + assert_eq!(decimal_128_to_str(1, 20), "0.00000000000000000001"); + assert_eq!( + decimal_128_to_str(1, 38), + "0.00000000000000000000000000000000000001" + ); + assert_eq!( + decimal_128_to_str(12345678901234567890123456789012345678, 20), + "123456789012345678.90123456789012345678" + ); + assert_eq!( + decimal_128_to_str(12345678901234567890123456789012345678, 0), + "12345678901234567890123456789012345678" + ); } #[test] - fn test_big_decimal_to_str() { - assert_decimal_str_eq!(110, 3, "0.11"); - 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"); - assert_decimal_str_eq!(12345678901234567890123456789012345678_i128, 0, "12345678901234567890123456789012345678"); - assert_decimal_str_eq!(12345678901234567890123456789012345678_i128, 38, "0.123456789012"); - - // Negative cases - assert_decimal_str_eq!(-110, 3, "-0.11"); - 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!(-12345678901234567890123456789012345678_i128, 0, "-12345678901234567890123456789012345678"); - assert_decimal_str_eq!(-12345678901234567890123456789012345678_i128, 38, "-0.123456789012"); - - // Round to 12 decimal places - // 1.0000000000011 -> 1.000000000001 - assert_decimal_str_eq!(10_i128.pow(13) + 11, 13, "1.000000000001"); + fn test_decimal_256_to_str() { + assert_eq!(decimal_256_to_str(i256::from_str("1").unwrap(), 0), "1"); + assert_eq!( + decimal_256_to_str(i256::from_str("1").unwrap(), 5), + "0.00001" + ); + assert_eq!( + decimal_256_to_str(i256::from_str("1").unwrap(), 20), + "0.00000000000000000001" + ); + assert_eq!( + decimal_256_to_str(i256::from_str("1").unwrap(), 38), + "0.00000000000000000000000000000000000001" + ); + assert_eq!( + decimal_256_to_str( + i256::from_str("12345678901234567890123456789012345678").unwrap(), + 20 + ), + "123456789012345678.90123456789012345678" + ); + assert_eq!( + decimal_256_to_str( + i256::from_str("12345678901234567890123456789012345678").unwrap(), + 0 + ), + "12345678901234567890123456789012345678" + ); } } diff --git a/datafusion/sqllogictest/test_files/aggregate.slt b/datafusion/sqllogictest/test_files/aggregate.slt index e76c1466a5476..29c250c94d0c0 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.5089725099 # 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.07916932235 # csv_query_covariance_2 query R SELECT covar(c2, c12) FROM aggregate_test_100 ---- --0.079969012479 +-0.07996901248 # 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.6666666667 # csv_query_correlation query R SELECT corr(c2, c12) FROM aggregate_test_100 ---- --0.190645441906 +-0.1906454419 # 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 +26156334340000000000000000000000000000 # csv_query_variance_3 query R SELECT var_pop(c12) FROM aggregate_test_100 ---- -0.092342237216 +0.09234223722 # csv_query_variance_4 query R SELECT var(c2) FROM aggregate_test_100 ---- -1.886363636364 +1.886363636 # csv_query_distinct_variance query R @@ -473,90 +473,90 @@ 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.886363636 # csv_query_stddev_1 query R SELECT stddev_pop(c2) FROM aggregate_test_100 ---- -1.366565036872 +1.366565037 # csv_query_stddev_2 query R SELECT stddev_pop(c6) FROM aggregate_test_100 ---- -5114326382039172000 +5114326382000000000 # csv_query_stddev_3 query R SELECT stddev_pop(c12) FROM aggregate_test_100 ---- -0.303878655413 +0.3038786554 # csv_query_stddev_4 query R SELECT stddev(c12) FROM aggregate_test_100 ---- -0.305409539941 +0.3054095399 # csv_query_stddev_5 query R SELECT stddev_samp(c12) FROM aggregate_test_100 ---- -0.305409539941 +0.3054095399 # csv_query_stddev_6 query R select stddev(sq.column1) from (values (1.1), (2.0), (3.0)) as sq ---- -0.950438495292 +0.9504384953 # 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.3036410323 +2 0.2845819674 +3 0.2960026605 +4 0.2843246091 +5 0.3310344868 # 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.2966598455 +2 0.2780389786 +3 0.2881078335 +4 0.2780749534 +5 0.3189928132 # 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.08800706391 +2 0.07730567362 +3 0.08300612371 +4 0.07732567972 +5 0.1017564149 # 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.09219787647 +2 0.08098689618 +3 0.08761757503 +4 0.08084048335 +5 0.1095838314 # 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 +2 0.0007858782719 3 NULL 4 NULL 5 0.000269544643 @@ -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.0007912434788 +2 0.0000615219026 3 NULL 4 NULL 5 NULL @@ -584,7 +584,7 @@ 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 +2 0.0007858782719 3 NULL 4 NULL 5 0.000269544643 @@ -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.5550065411 # 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.5513900544 # median_i8 query I @@ -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.33333333 a 3 -4.5 a 4 -32 a 5 -32 -a NULL -18.333333333333 -b 1 31.666666666667 +a NULL -18.33333333 +b 1 31.66666667 b 2 25.5 b 3 -42 b 4 -44.6 b 5 -0.2 -b NULL -5.842105263158 +b NULL -5.842105263 c 1 47.5 -c 2 -55.571428571429 +c 2 -55.57142857 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.333333333 +d 1 -8.142857143 +d 2 109.3333333 +d 3 41.33333333 d 4 54 d 5 -49.5 -d NULL 25.444444444444 -e 1 75.666666666667 +d NULL 25.44444444 +e 1 75.66666667 e 2 37.8 e 3 48 -e 4 37.285714285714 +e 4 37.28571429 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.33333333 +NULL 1 16.68181818 +NULL 2 8.363636364 +NULL 3 20.78947368 +NULL 4 1.260869565 +NULL 5 -13.85714286 NULL NULL 7.81 # csv_query_rollup_avg @@ -1463,7 +1463,7 @@ a 3 -12 -9168 a 3 13 22338.5 a 3 14 28162 a 3 17 -22796 -a 3 NULL 4958.833333333333 +a 3 NULL 4958.833333 a 4 -101 11640 a 4 -54 -2376 a 4 -38 20744 @@ -1472,12 +1472,12 @@ a 4 NULL 386.5 a 5 -101 -12484 a 5 -31 -12907 a 5 36 -16974 -a 5 NULL -14121.666666666666 -a NULL NULL 306.047619047619 +a 5 NULL -14121.66667 +a NULL NULL 306.047619 b 1 12 7652 b 1 29 -18218 b 1 54 -18410 -b 1 NULL -9658.666666666666 +b 1 NULL -9658.666667 b 2 -60 -21739 b 2 31 23127 b 2 63 21456 @@ -1498,7 +1498,7 @@ b 5 -5 24896 b 5 62 16337 b 5 68 21576 b 5 NULL 20135.4 -b NULL NULL 7732.315789473684 +b NULL NULL 7732.315789 NULL NULL NULL 3833.525 # csv_query_groupingsets_avg @@ -1524,7 +1524,7 @@ a 3 -12 -9168 a 3 13 22338.5 a 3 14 28162 a 3 17 -22796 -a 3 NULL 4958.833333333333 +a 3 NULL 4958.833333 a 4 -101 11640 a 4 -54 -2376 a 4 -38 20744 @@ -1533,12 +1533,12 @@ a 4 NULL 386.5 a 5 -101 -12484 a 5 -31 -12907 a 5 36 -16974 -a 5 NULL -14121.666666666666 -a NULL NULL 306.047619047619 +a 5 NULL -14121.66667 +a NULL NULL 306.047619 b 1 12 7652 b 1 29 -18218 b 1 54 -18410 -b 1 NULL -9658.666666666666 +b 1 NULL -9658.666667 b 2 -60 -21739 b 2 31 23127 b 2 63 21456 @@ -1559,7 +1559,7 @@ b 5 -5 24896 b 5 62 16337 b 5 68 21576 b 5 NULL 20135.4 -b NULL NULL 7732.315789473684 +b NULL NULL 7732.315789 # csv_query_singlecol_with_rollup_avg query TIIR @@ -1584,7 +1584,7 @@ a 3 -12 -9168 a 3 13 22338.5 a 3 14 28162 a 3 17 -22796 -a 3 NULL 4958.833333333333 +a 3 NULL 4958.833333 a 4 -101 11640 a 4 -54 -2376 a 4 -38 20744 @@ -1593,12 +1593,12 @@ a 4 NULL 386.5 a 5 -101 -12484 a 5 -31 -12907 a 5 36 -16974 -a 5 NULL -14121.666666666666 -a NULL NULL 306.047619047619 +a 5 NULL -14121.66667 +a NULL NULL 306.047619 b 1 12 7652 b 1 29 -18218 b 1 54 -18410 -b 1 NULL -9658.666666666666 +b 1 NULL -9658.666667 b 2 -60 -21739 b 2 31 23127 b 2 63 21456 @@ -1619,7 +1619,7 @@ b 5 -5 24896 b 5 62 16337 b 5 68 21576 b 5 NULL 20135.4 -b NULL NULL 7732.315789473684 +b NULL NULL 7732.315789 # csv_query_approx_percentile_cont_with_weight query TI @@ -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.68181818 125 -99 22 +2 184 8.363636364 122 -117 22 +3 395 20.78947368 123 -101 19 +4 29 1.260869565 123 -117 23 +5 -194 -13.85714286 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.33333333 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.33333333 83 -101 21 +b 1 95 31.66666667 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.842105263 68 -117 19 c 1 190 47.5 103 -24 4 -c 2 -389 -55.571428571429 29 -117 7 +c 2 -389 -55.57142857 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.333333333 123 -117 21 +d 1 -57 -8.142857143 125 -99 7 +d 2 328 109.3333333 122 93 3 +d 3 124 41.33333333 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.44444444 125 -99 18 +e 1 227 75.66666667 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.28571429 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.33333333 120 -95 21 +NULL 1 367 16.68181818 125 -99 22 +NULL 2 184 8.363636364 122 -117 22 +NULL 3 395 20.78947368 123 -101 19 +NULL 4 29 1.260869565 123 -117 23 +NULL 5 -194 -13.85714286 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.01479305308 0.9965400388 +0.01479305308 0.980019341 +0.01479305308 0.9706712283 +0.2667177795 0.9965400388 +0.3600766362 0.9706712283 # 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.01479305308 0.9965400388 +0.01479305308 0.980019341 +0.01479305308 0.980019341 +0.01479305308 0.9965400388 +0.01479305308 0.980019341 # aggregate_avg_add query RRRR @@ -2242,7 +2242,7 @@ create table t (c1 decimal(10, 0)) as values (1), (2), (3), (4), (5), (6); query RT select avg(c1), arrow_typeof(avg(c1)) from t; ---- -3.5 Decimal128(14, 4) +3.5000 Decimal128(14, 4) statement ok drop table t; @@ -2254,7 +2254,7 @@ create table t (c1 decimal(10, 0)) as values (1), (NULL), (3), (4), (5); query RT select avg(c1), arrow_typeof(avg(c1)) from t; ---- -3.25 Decimal128(14, 4) +3.2500 Decimal128(14, 4) statement ok drop table t; @@ -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.6666666667 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.9033333333 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.6022222222 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.7616666667 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.6666666667 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.6666666667 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.6666666667 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.6666666667 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.7760297818 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.414213562 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.9504384953 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.414213562 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.414213562 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.414213562 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.479019946 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.9033333333 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.9033333333 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.414213562 1 @@ -3408,7 +3408,7 @@ INSERT INTO decimals VALUES (123.0001), (124.00); query RR SELECT MIN(value), MAX(value) FROM decimals; ---- -123 124 +123.00 124.00 statement ok DROP TABLE decimals; @@ -3477,7 +3477,7 @@ INSERT INTO decimals_error VALUES (123.00), (arrow_cast(124.001, 'Decimal128(10, query RR SELECT MIN(value), MAX(value) FROM decimals_error; ---- -123 124 +123.00 124.00 statement ok DROP TABLE decimals_error; @@ -4509,7 +4509,7 @@ NULL query RT select sum(c1), arrow_typeof(sum(c1)) from d_table; ---- -100 Decimal128(20, 3) +100.000 Decimal128(20, 3) # aggregate sum with decimal statement ok @@ -4518,7 +4518,7 @@ create table t (c decimal(35, 3)) as values (10), (null), (20); query RT select sum(c), arrow_typeof(sum(c)) from t; ---- -30 Decimal128(38, 3) +30.000 Decimal128(38, 3) statement ok drop table t; @@ -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.799999997 Float64 statement ok drop table t; @@ -4597,13 +4597,13 @@ B -1000.045 Decimal128(20, 3) query RT select avg(c1), arrow_typeof(avg(c1)) from d_table ---- -5 Decimal128(14, 7) +5.0000000 Decimal128(14, 7) query TRT select c2, avg(c1), arrow_typeof(avg(c1)) from d_table GROUP BY c2 ORDER BY c2 ---- -A 110.0045 Decimal128(14, 7) -B -100.0045 Decimal128(14, 7) +A 110.0045000 Decimal128(14, 7) +B -100.0045000 Decimal128(14, 7) # aggregate_decimal_count_distinct query I @@ -4737,18 +4737,18 @@ INSERT INTO test_decimal_table VALUES (1, 10.10, 100.1, NULL), (1, 20.20, 200.2, query IIRRRRIIRR rowsort select c1, count(c2), avg(c2), sum(c2), min(c2), max(c2), count(c3), count(c4), sum(c4), avg(c4) from test_decimal_table group by c1 ---- -1 2 15.15 30.3 10.1 20.2 2 0 NULL NULL -2 2 15.15 30.3 10.1 20.2 2 0 NULL NULL -3 2 10.1 20.2 10.1 10.1 1 0 NULL NULL +1 2 15.150000 30.30 10.10 20.20 2 0 NULL NULL +2 2 15.150000 30.30 10.10 20.20 2 0 NULL NULL +3 2 10.100000 20.20 10.10 10.10 1 0 NULL NULL # aggregate_decimal_with_group_by_decimal query RIRRRRIR rowsort select c3, count(c2), avg(c2), sum(c2), min(c2), max(c2), count(c4), sum(c4) from test_decimal_table group by c3 ---- -100.1 2 10.1 20.2 10.1 10.1 0 NULL -200.2 1 20.2 20.2 20.2 20.2 0 NULL -700.1 2 15.15 30.3 10.1 20.2 0 NULL -NULL 1 10.1 10.1 10.1 10.1 0 NULL +100.1 2 10.100000 20.20 10.10 10.10 0 NULL +200.2 1 20.200000 20.20 20.20 20.20 0 NULL +700.1 2 15.150000 30.30 10.10 20.20 0 NULL +NULL 1 10.100000 10.10 10.10 10.10 0 NULL # Restore the default dialect statement ok @@ -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.666666667 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.05153400263 0.4842735535 100 0.001929150558 0.4792749482 0.5089725099 6.707779293 9.234223722 0.3456787157 @@ -5308,7 +5308,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.05153400263 0.4842735535 100 0.001929150558 0.4792749482 0.5089725099 6.707779293 9.234223722 0.3456787157 statement ok set datafusion.execution.batch_size = 2; @@ -5326,7 +5326,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.05153400263 0.4842735535 100 0.001929150558 0.4792749482 0.5089725099 6.707779293 9.234223722 0.3456787157 statement ok set datafusion.execution.batch_size = 3; @@ -5344,7 +5344,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.05153400263 0.4842735535 100 0.001929150558 0.4792749482 0.5089725099 6.707779293 9.234223722 0.3456787157 statement ok set datafusion.execution.batch_size = 8192; @@ -5369,8 +5369,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.666666667 3 0.9230769231 3 7.333333333 2 34.66666667 8 +4.5 -7 3 0.9642857143 4 11 2 42 9 3 0 3 1 5 15 2 18 6 query RRIRRRRRR @@ -5503,7 +5503,7 @@ drop table string_agg_large_utf8; query RRRRI select min(col_f32), max(col_f32), avg(col_f32), sum(col_f32), count(col_f32) from float_table; ---- --128.2 32768.3 10889.13359451294 32667.40078353882 3 +-128.2 32768.3 10889.13359 32667.40078 3 query RRRRI select min(col_f32_nan), max(col_f32_nan), avg(col_f32_nan), sum(col_f32_nan), count(col_f32_nan) from float_table; @@ -5513,7 +5513,7 @@ select min(col_f32_nan), max(col_f32_nan), avg(col_f32_nan), sum(col_f32_nan), c query RRRRI select min(col_f64), max(col_f64), avg(col_f64), sum(col_f64), count(col_f64) from float_table; ---- --128.2 32768.3 10889.133333333333 32667.4 3 +-128.2 32768.3 10889.13333 32667.4 3 query RRRRI select min(col_f64_nan), max(col_f64_nan), avg(col_f64_nan), sum(col_f64_nan), count(col_f64_nan) from float_table; @@ -6074,7 +6074,7 @@ FROM data GROUP BY k ORDER BY k; ---- -1 1.8125 6.8007813 Float16 Float16 +1 1.813 6.801 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..c33f573253761 100644 --- a/datafusion/sqllogictest/test_files/aggregate_skip_partial.slt +++ b/datafusion/sqllogictest/test_files/aggregate_skip_partial.slt @@ -251,41 +251,41 @@ SELECT c2, count(c1), count(c5), count(c11) FROM aggregate_test_100 GROUP BY c2 query IIIRR SELECT c2, min(c5), max(c5), min(c11), max(c11) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2; ---- -1 -1991133944 2143473091 0.064453244 0.89651865 -2 -2138770630 2053379412 0.055064857 0.8315913 -3 -2141999138 2030965207 0.034291923 0.9488028 -4 -1885422396 2064155045 0.028003037 0.7459874 -5 -2117946883 2025611582 0.12559289 0.87989986 +1 -1991133944 2143473091 0.0644532 0.896519 +2 -2138770630 2053379412 0.0550649 0.831591 +3 -2141999138 2030965207 0.0342919 0.948803 +4 -1885422396 2064155045 0.028003 0.745987 +5 -2117946883 2025611582 0.125593 0.8799 # Test sum for int / float 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.15325379 +2 -8259865364 9.577824473 +3 1956035476 9.590891361 +4 16155718643 9.531112969 +5 6449337880 7.074412227 # Test median for int / float query IIR SELECT c2, median(c5), median(c11) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2; ---- -1 23971150 0.5922606 -2 -562486880 0.43422085 -3 240273900 0.40199697 -4 762932956 0.48515016 -5 604973998 0.49842384 +1 23971150 0.592261 +2 -562486880 0.434221 +3 240273900 0.401997 +4 762932956 0.48515 +5 604973998 0.498424 # Test approx_median for int / float query IIR SELECT c2, approx_median(c5), approx_median(c11) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2; ---- -1 191655437 0.59926736 -2 -587831330 0.43230486 -3 240273900 0.40199697 -4 762932956 0.48515016 -5 593204320 0.5156586 +1 191655437 0.599267 +2 -587831330 0.432305 +3 240273900 0.401997 +4 762932956 0.48515 +5 593204320 0.515659 # Test approx_distinct for varchar / int query III @@ -311,41 +311,41 @@ SELECT c2, count(c3), count(c11) FROM aggregate_test_100_null GROUP BY c2 ORDER query IIIRR SELECT c2, min(c3), max(c3), min(c11), max(c11) FROM aggregate_test_100_null GROUP BY c2 ORDER BY c2; ---- -1 -99 125 0.064453244 0.89651865 -2 -117 122 0.09683716 0.8315913 -3 -101 123 0.034291923 0.94669616 -4 -117 123 0.028003037 0.7085086 -5 -101 118 0.12559289 0.87989986 +1 -99 125 0.0644532 0.896519 +2 -117 122 0.0968372 0.831591 +3 -101 123 0.0342919 0.946696 +4 -117 123 0.028003 0.708509 +5 -101 118 0.125593 0.8799 # Test sum with nullable fields 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.15325379 +2 184 9.577824473 +3 395 9.590891361 +4 29 9.531112969 +5 -194 7.074412227 # Test median with nullable fields query IIR SELECT c2, median(c3), median(c11) FROM aggregate_test_100_null GROUP BY c2 ORDER BY c2; ---- -1 12 0.6067944 -2 1 0.46076488 -3 14 0.40154034 -4 -17 0.48515016 -5 -35 0.5536642 +1 12 0.606794 +2 1 0.460765 +3 14 0.40154 +4 -17 0.48515 +5 -35 0.553664 # Test approx_median with nullable fields query IIR SELECT c2, approx_median(c3), approx_median(c11) FROM aggregate_test_100_null GROUP BY c2 ORDER BY c2; ---- -1 12 0.6067944 -2 1 0.46076488 -3 14 0.40154034 -4 -7 0.48515016 -5 -39 0.5536642 +1 12 0.606794 +2 1 0.460765 +3 14 0.40154 +4 -7 0.48515 +5 -39 0.553664 # Test approx_distinct with nullable fields query II @@ -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.857142857 0.4382234216 +b 3.263157895 0.4964812084 +c 2.666666667 0.4252411383 +d 2.444444444 0.5415194763 +e 3 0.5054402635 # 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.4490718875 +b 2.642857143 0.4454862986 +c 2.421052632 0.4228821177 +d 2.125 0.5187061913 +e 2.789473684 0.5367853234 # Test count with nullable fields and nullable filter query III @@ -534,11 +534,11 @@ SELECT c2, MAX(c11) FILTER (WHERE c5 < 0) FROM aggregate_test_100_null GROUP BY c2 ORDER BY c2; ---- -1 -99 103 0.2578469 0.89651865 -2 -48 93 0.09683716 0.8315913 -3 -76 123 0.034291923 0.94669616 -4 -117 123 0.06563997 0.57360977 -5 -94 68 0.12559289 0.75173044 +1 -99 103 0.257847 0.896519 +2 -48 93 0.0968372 0.831591 +3 -76 123 0.0342919 0.946696 +4 -117 123 0.06564 0.57361 +5 -94 68 0.125593 0.75173 # Test min / max 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.214695632 5.085060358 +2 100 77 6.197732747 3.150197089 +3 109 211 2.80575043 2.80632931 +4 -171 56 2.107405066 1.939846396 +5 -86 -76 1.874171019 1.600569308 # Test approx_distinct with nullable fields and filter query II @@ -599,11 +599,11 @@ SELECT c2, median(c11) FILTER (WHERE c5 < 0) FROM aggregate_test_100_null GROUP BY c2 ORDER BY c2; ---- -1 -5 0.6623719 -2 15 0.52930677 -3 13 0.32792538 -4 -38 0.49774808 -5 -18 0.49842384 +1 -5 0.662372 +2 15 0.529307 +3 13 0.327925 +4 -38 0.497748 +5 -18 0.498424 # Test min / max with nullable fields and nullable filter query II @@ -624,11 +624,11 @@ SELECT c2, approx_median(c11) FILTER (WHERE c5 < 0) FROM aggregate_test_100_null GROUP BY c2 ORDER BY c2; ---- -1 -5 0.6623719 -2 12 0.52930677 -3 13 0.32792538 -4 -38 0.49774808 -5 -21 0.47652745 +1 -5 0.662372 +2 12 0.529307 +3 13 0.327925 +4 -38 0.497748 +5 -21 0.476527 # Test approx_median with nullable fields and nullable filter query II @@ -660,9 +660,9 @@ FROM decimal_table CROSS JOIN t GROUP BY i ORDER BY i; ---- -1 66 -2 66 -3 33 +1 66.000 +2 66.000 +3 33.000 statement ok DROP TABLE decimal_table; diff --git a/datafusion/sqllogictest/test_files/array.slt b/datafusion/sqllogictest/test_files/array.slt index 7578692ddb0f8..25b93e1b3bc7a 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.3741657387 NULL +5.196152423 6.063827174 NULL +10.39230485 11.77879451 NULL +15.58845727 15.93549497 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.3741657387 NULL +5.196152423 6.063827174 NULL +10.39230485 11.77879451 NULL +15.58845727 15.93549497 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.3741657387 NULL +5.196152423 6.063827174 NULL +10.39230485 11.77879451 NULL +15.58845727 15.93549497 NULL ## array_dims (aliases: `list_dims`) diff --git a/datafusion/sqllogictest/test_files/arrow_typeof.slt b/datafusion/sqllogictest/test_files/arrow_typeof.slt index 77b10b41ccb3d..608ded526b3b6 100644 --- a/datafusion/sqllogictest/test_files/arrow_typeof.slt +++ b/datafusion/sqllogictest/test_files/arrow_typeof.slt @@ -201,7 +201,7 @@ SELECT col_d256 FROM foo; ---- -100 100 +100.00 100.00 statement ok drop table foo diff --git a/datafusion/sqllogictest/test_files/clickbench.slt b/datafusion/sqllogictest/test_files/clickbench.slt index dfcd924758574..c4a821d4df68b 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 +-304548765900000000 query I SELECT COUNT(DISTINCT "UserID") FROM hits; diff --git a/datafusion/sqllogictest/test_files/coalesce.slt b/datafusion/sqllogictest/test_files/coalesce.slt index 06460a005c207..a7c8483c2b44f 100644 --- a/datafusion/sqllogictest/test_files/coalesce.slt +++ b/datafusion/sqllogictest/test_files/coalesce.slt @@ -167,14 +167,14 @@ select coalesce(arrow_cast(2, 'Decimal128(7, 2)'), 0), arrow_typeof(coalesce(arrow_cast(2, 'Decimal128(7, 2)'), 0)) ---- -2 Decimal128(22, 2) +2.00 Decimal128(22, 2) query RT select coalesce(arrow_cast(2, 'Decimal256(7, 2)'), 0), arrow_typeof(coalesce(arrow_cast(2, 'Decimal256(7, 2)'), 0)); ---- -2 Decimal256(22, 2) +2.00 Decimal256(22, 2) # coalesce string query TT diff --git a/datafusion/sqllogictest/test_files/ddl.slt b/datafusion/sqllogictest/test_files/ddl.slt index 4a0ba87bfa1aa..739c8b26cb1a1 100644 --- a/datafusion/sqllogictest/test_files/ddl.slt +++ b/datafusion/sqllogictest/test_files/ddl.slt @@ -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.110831 0.9294097332 6WfVFBVGJSQb7FhA7E0lBwdvjfZnSW diff --git a/datafusion/sqllogictest/test_files/decimal.slt b/datafusion/sqllogictest/test_files/decimal.slt index f082a79c55087..bfb4baf2cbca1 100644 --- a/datafusion/sqllogictest/test_files/decimal.slt +++ b/datafusion/sqllogictest/test_files/decimal.slt @@ -19,14 +19,14 @@ query TR select arrow_typeof(cast(1.23 as decimal(10,4))), cast(1.23 as decimal(10,4)); ---- -Decimal128(10, 4) 1.23 +Decimal128(10, 4) 1.2300 query TR select arrow_typeof(cast(cast(1.23 as decimal(10,3)) as decimal(10,4))), cast(cast(1.23 as decimal(10,3)) as decimal(10,4)); ---- -Decimal128(10, 4) 1.23 +Decimal128(10, 4) 1.2300 query TR @@ -57,55 +57,55 @@ Decimal128(10, 6) Decimal128(12, 7) query R rowsort SELECT c1 from decimal_simple; ---- -0.00001 -0.00002 -0.00002 -0.00003 -0.00003 -0.00003 -0.00004 -0.00004 -0.00004 -0.00004 -0.00005 -0.00005 -0.00005 -0.00005 -0.00005 +0.000010 +0.000020 +0.000020 +0.000030 +0.000030 +0.000030 +0.000040 +0.000040 +0.000040 +0.000040 +0.000050 +0.000050 +0.000050 +0.000050 +0.000050 query R rowsort select c1 from decimal_simple where c1 > 0.000030; ---- -0.00004 -0.00004 -0.00004 -0.00004 -0.00005 -0.00005 -0.00005 -0.00005 -0.00005 +0.000040 +0.000040 +0.000040 +0.000040 +0.000050 +0.000050 +0.000050 +0.000050 +0.000050 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.000020 0.000000000002 3 false 0.0000190 +0.000030 0.000000000003 5 true 0.0000110 +0.000050 0.000000000005 8 false 0.0000330 query TR select arrow_typeof(min(c1)), min(c1) from decimal_simple where c4=false; ---- -Decimal128(10, 6) 0.00002 +Decimal128(10, 6) 0.000020 query TR select arrow_typeof(max(c1)), max(c1) from decimal_simple where c4=false; ---- -Decimal128(10, 6) 0.00005 +Decimal128(10, 6) 0.000050 # inferred precision is 10+10 @@ -113,7 +113,7 @@ Decimal128(10, 6) 0.00005 query TR select arrow_typeof(sum(c1)), sum(c1) from decimal_simple; ---- -Decimal128(20, 6) 0.00055 +Decimal128(20, 6) 0.000550 # inferred precision is original precision + 4 @@ -127,14 +127,14 @@ Decimal128(14, 10) 0.0000366666 query TR select arrow_typeof(median(c1)), median(c1) from decimal_simple; ---- -Decimal128(10, 6) 0.00004 +Decimal128(10, 6) 0.000040 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.000020 0.000000000002 2 true 0.0000250 +0.000020 0.000000000002 3 false 0.0000190 query RI rowsort @@ -158,51 +158,51 @@ select c2,c3 from decimal_simple where c1!=0.00002; query RRIBR select * from decimal_simple where 0.00002 > c1; ---- -0.00001 0.000000000001 1 true 0.000014 +0.000010 0.000000000001 1 true 0.0000140 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.000010 0.000000000001 1 true 0.0000140 +0.000020 0.000000000002 2 true 0.0000250 +0.000020 0.000000000002 3 false 0.0000190 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.000030 0.000000000003 4 true 0.0000320 +0.000030 0.000000000003 5 false 0.0000350 +0.000030 0.000000000003 5 true 0.0000110 +0.000040 0.000000000004 12 false 0.0000400 +0.000040 0.000000000004 14 true 0.0000400 +0.000040 0.000000000004 5 true 0.0000440 +0.000040 0.000000000004 8 false 0.0000440 +0.000050 0.000000000005 1 false 0.0001000 +0.000050 0.000000000005 100 true 0.0000680 +0.000050 0.000000000005 4 true 0.0000780 +0.000050 0.000000000005 8 false 0.0000330 +0.000050 0.000000000005 9 true 0.0000520 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.000020 0.000000000002 2 true 0.0000250 +0.000020 0.000000000002 3 false 0.0000190 +0.000030 0.000000000003 4 true 0.0000320 +0.000030 0.000000000003 5 false 0.0000350 +0.000030 0.000000000003 5 true 0.0000110 +0.000040 0.000000000004 12 false 0.0000400 +0.000040 0.000000000004 14 true 0.0000400 +0.000040 0.000000000004 5 true 0.0000440 +0.000040 0.000000000004 8 false 0.0000440 +0.000050 0.000000000005 1 false 0.0001000 +0.000050 0.000000000005 100 true 0.0000680 +0.000050 0.000000000005 4 true 0.0000780 +0.000050 0.000000000005 8 false 0.0000330 +0.000050 0.000000000005 9 true 0.0000520 query T @@ -214,21 +214,21 @@ Decimal128(27, 6) query R rowsort select c1+1 from decimal_simple; ---- -1.00001 -1.00002 -1.00002 -1.00003 -1.00003 -1.00003 -1.00004 -1.00004 -1.00004 -1.00004 -1.00005 -1.00005 -1.00005 -1.00005 -1.00005 +1.000010 +1.000020 +1.000020 +1.000030 +1.000030 +1.000030 +1.000040 +1.000040 +1.000040 +1.000040 +1.000050 +1.000050 +1.000050 +1.000050 +1.000050 # array decimal(10,6) + array decimal(12,7) => decimal(13,7) @@ -241,21 +241,21 @@ Decimal128(13, 7) query R rowsort select c1+c5 from decimal_simple; ---- -0.000024 -0.000039 -0.000041 -0.000045 -0.000062 -0.000065 -0.00008 -0.00008 -0.000083 -0.000084 -0.000084 -0.000102 -0.000118 -0.000128 -0.00015 +0.0000240 +0.0000390 +0.0000410 +0.0000450 +0.0000620 +0.0000650 +0.0000800 +0.0000800 +0.0000830 +0.0000840 +0.0000840 +0.0001020 +0.0001180 +0.0001280 +0.0001500 query T @@ -267,21 +267,21 @@ Decimal128(27, 6) query R rowsort select c1-1 from decimal_simple; ---- --0.99995 --0.99995 --0.99995 --0.99995 --0.99995 --0.99996 --0.99996 --0.99996 --0.99996 --0.99997 --0.99997 --0.99997 --0.99998 --0.99998 --0.99999 +-0.999950 +-0.999950 +-0.999950 +-0.999950 +-0.999950 +-0.999960 +-0.999960 +-0.999960 +-0.999960 +-0.999970 +-0.999970 +-0.999970 +-0.999980 +-0.999980 +-0.999990 query T @@ -293,21 +293,21 @@ Decimal128(13, 7) query R rowsort select c1-c5 from decimal_simple; ---- --0.000002 --0.000002 --0.000004 --0.000004 --0.000004 --0.000005 --0.000005 --0.000018 --0.000028 --0.00005 -0 -0 -0.000001 -0.000017 -0.000019 +-0.0000020 +-0.0000020 +-0.0000040 +-0.0000040 +-0.0000040 +-0.0000050 +-0.0000050 +-0.0000180 +-0.0000280 +-0.0000500 +0.0000000 +0.0000000 +0.0000010 +0.0000170 +0.0000190 query T @@ -319,21 +319,21 @@ Decimal128(31, 6) query R rowsort select c1*20 from decimal_simple; ---- -0.0002 -0.0004 -0.0004 -0.0006 -0.0006 -0.0006 -0.0008 -0.0008 -0.0008 -0.0008 -0.001 -0.001 -0.001 -0.001 -0.001 +0.000200 +0.000400 +0.000400 +0.000600 +0.000600 +0.000600 +0.000800 +0.000800 +0.000800 +0.000800 +0.001000 +0.001000 +0.001000 +0.001000 +0.001000 query T @@ -345,21 +345,21 @@ Decimal128(23, 13) query R rowsort select c1*c5 from decimal_simple; ---- -0.00000000014 -0.00000000033 -0.00000000038 -0.0000000005 -0.00000000096 -0.00000000105 -0.0000000016 -0.0000000016 -0.00000000165 -0.00000000176 -0.00000000176 -0.0000000026 -0.0000000034 -0.0000000039 -0.000000005 +0.0000000001400 +0.0000000003300 +0.0000000003800 +0.0000000005000 +0.0000000009600 +0.0000000010500 +0.0000000016000 +0.0000000016000 +0.0000000016500 +0.0000000017600 +0.0000000017600 +0.0000000026000 +0.0000000034000 +0.0000000039000 +0.0000000050000 query T @@ -371,21 +371,21 @@ Decimal128(19, 10) query R rowsort select c1/cast(0.00001 as decimal(5,5)) from decimal_simple; ---- -1 -2 -2 -3 -3 -3 -4 -4 -4 -4 -5 -5 -5 -5 -5 +1.0000000000 +2.0000000000 +2.0000000000 +3.0000000000 +3.0000000000 +3.0000000000 +4.0000000000 +4.0000000000 +4.0000000000 +4.0000000000 +5.0000000000 +5.0000000000 +5.0000000000 +5.0000000000 +5.0000000000 query T @@ -397,18 +397,18 @@ Decimal128(21, 10) query R rowsort select c1/c5 from decimal_simple; ---- -0.5 -0.641025641 +0.5000000000 +0.6410256410 0.7142857142 0.7352941176 -0.8 +0.8000000000 0.8571428571 -0.909090909 -0.909090909 -0.9375 +0.9090909090 +0.9090909090 +0.9375000000 0.9615384615 -1 -1 +1.0000000000 +1.0000000000 1.0526315789 1.5151515151 2.7272727272 @@ -423,21 +423,21 @@ Decimal128(7, 7) query R rowsort select c5%cast(0.00001 as decimal(5,5)) from decimal_simple; ---- -0 -0 -0 -0.000001 -0.000002 -0.000002 -0.000003 -0.000004 -0.000004 -0.000004 -0.000005 -0.000005 -0.000008 -0.000008 -0.000009 +0.0000000 +0.0000000 +0.0000000 +0.0000010 +0.0000020 +0.0000020 +0.0000030 +0.0000040 +0.0000040 +0.0000040 +0.0000050 +0.0000050 +0.0000080 +0.0000080 +0.0000090 query T @@ -449,21 +449,21 @@ Decimal128(11, 7) query R rowsort select c1%c5 from decimal_simple; ---- -0 -0 -0.000001 -0.000008 -0.00001 -0.000017 -0.00002 -0.00003 -0.00003 -0.00004 -0.00004 -0.00005 -0.00005 -0.00005 -0.00005 +0.0000000 +0.0000000 +0.0000010 +0.0000080 +0.0000100 +0.0000170 +0.0000200 +0.0000300 +0.0000300 +0.0000400 +0.0000400 +0.0000500 +0.0000500 +0.0000500 +0.0000500 query T @@ -475,104 +475,104 @@ Decimal128(10, 6) query R rowsort SELECT abs(c1) from decimal_simple; ---- -0.00001 -0.00002 -0.00002 -0.00003 -0.00003 -0.00003 -0.00004 -0.00004 -0.00004 -0.00004 -0.00005 -0.00005 -0.00005 -0.00005 -0.00005 +0.000010 +0.000020 +0.000020 +0.000030 +0.000030 +0.000030 +0.000040 +0.000040 +0.000040 +0.000040 +0.000050 +0.000050 +0.000050 +0.000050 +0.000050 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.000040 0.000000000004 5 true 0.0000440 +0.000040 0.000000000004 12 false 0.0000400 +0.000040 0.000000000004 14 true 0.0000400 +0.000040 0.000000000004 8 false 0.0000440 +0.000050 0.000000000005 9 true 0.0000520 +0.000050 0.000000000005 4 true 0.0000780 +0.000050 0.000000000005 8 false 0.0000330 +0.000050 0.000000000005 100 true 0.0000680 +0.000050 0.000000000005 1 false 0.0001000 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.000040 0.000000000004 5 true 0.0000440 +0.000040 0.000000000004 8 false 0.0000440 +0.000040 0.000000000004 12 false 0.0000400 +0.000040 0.000000000004 14 true 0.0000400 +0.000050 0.000000000005 1 false 0.0001000 +0.000050 0.000000000005 4 true 0.0000780 +0.000050 0.000000000005 8 false 0.0000330 +0.000050 0.000000000005 9 true 0.0000520 +0.000050 0.000000000005 100 true 0.0000680 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.000040 0.000000000004 5 true 0.0000440 +0.000040 0.000000000004 8 false 0.0000440 +0.000040 0.000000000004 12 false 0.0000400 +0.000040 0.000000000004 14 true 0.0000400 +0.000050 0.000000000005 1 false 0.0001000 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.000050 0.000000000005 9 true 0.0000520 +0.000050 0.000000000005 4 true 0.0000780 +0.000050 0.000000000005 8 false 0.0000330 +0.000050 0.000000000005 100 true 0.0000680 +0.000050 0.000000000005 1 false 0.0001000 +0.000040 0.000000000004 5 true 0.0000440 +0.000040 0.000000000004 12 false 0.0000400 +0.000040 0.000000000004 14 true 0.0000400 +0.000040 0.000000000004 8 false 0.0000440 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.000020 0.000000000002 3 false 0.0000190 +0.000020 0.000000000002 2 true 0.0000250 +0.000010 0.000000000001 1 true 0.0000140 query IR select count(*),c1 from decimal_simple group by c1 order by c1; ---- -1 0.00001 -2 0.00002 -3 0.00003 -4 0.00004 -5 0.00005 +1 0.000010 +2 0.000020 +3 0.000030 +4 0.000040 +5 0.000050 query IRB select count(*),c1,c4 from decimal_simple group by c1,c4 order by c1,c4; ---- -1 0.00001 true -1 0.00002 false -1 0.00002 true -1 0.00003 false -2 0.00003 true -2 0.00004 false -2 0.00004 true -2 0.00005 false -3 0.00005 true +1 0.000010 true +1 0.000020 false +1 0.000020 true +1 0.000030 false +2 0.000030 true +2 0.000040 false +2 0.000040 true +2 0.000050 false +3 0.000050 true query TR @@ -584,7 +584,7 @@ Decimal128(12, 2) 400420638.54 query TR select arrow_typeof(cast(400420638.54 as decimal(12,2)) * 1.0), cast(400420638.54 as decimal(12,2)) * 1.0; ---- -Float64 400420638.54 +Float64 400420638.5 query TB @@ -612,7 +612,7 @@ insert into foo VALUES (1, 5); query R select a / b from foo; ---- -0.2 +0.200000000000000000000000 statement ok create table t as values (arrow_cast(123, 'Decimal256(5,2)')); @@ -625,7 +625,7 @@ set datafusion.execution.target_partitions = 1; query R select AVG(column1) from t; ---- -123 +123.000000 statement ok drop table t; @@ -650,41 +650,41 @@ Decimal256(50, 6) Decimal256(52, 7) query R rowsort SELECT c1 from decimal256_simple; ---- -0.00001 -0.00002 -0.00002 -0.00003 -0.00003 -0.00003 -0.00004 -0.00004 -0.00004 -0.00004 -0.00005 -0.00005 -0.00005 -0.00005 -0.00005 +0.000010 +0.000020 +0.000020 +0.000030 +0.000030 +0.000030 +0.000040 +0.000040 +0.000040 +0.000040 +0.000050 +0.000050 +0.000050 +0.000050 +0.000050 query R rowsort select c1 from decimal256_simple where c1 > 0.000030; ---- -0.00004 -0.00004 -0.00004 -0.00004 -0.00005 -0.00005 -0.00005 -0.00005 -0.00005 +0.000040 +0.000040 +0.000040 +0.000040 +0.000050 +0.000050 +0.000050 +0.000050 +0.000050 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.000020 0.000000000002 3 false 0.0000190 +0.000030 0.000000000003 5 true 0.0000110 +0.000050 0.000000000005 8 false 0.0000330 query TR select arrow_typeof(avg(c1)), avg(c1) from decimal256_simple; @@ -694,31 +694,31 @@ Decimal256(54, 10) 0.0000366666 query TR select arrow_typeof(min(c1)), min(c1) from decimal256_simple where c4=false; ---- -Decimal256(50, 6) 0.00002 +Decimal256(50, 6) 0.000020 query TR select arrow_typeof(max(c1)), max(c1) from decimal256_simple where c4=false; ---- -Decimal256(50, 6) 0.00005 +Decimal256(50, 6) 0.000050 query TR select arrow_typeof(sum(c1)), sum(c1) from decimal256_simple; ---- -Decimal256(60, 6) 0.00055 +Decimal256(60, 6) 0.000550 query TR select arrow_typeof(median(c1)), median(c1) from decimal256_simple; ---- -Decimal256(50, 6) 0.00004 +Decimal256(50, 6) 0.000040 query IR select count(*),c1 from decimal256_simple group by c1 order by c1; ---- -1 0.00001 -2 0.00002 -3 0.00003 -4 0.00004 -5 0.00005 +1 0.000010 +2 0.000020 +3 0.000030 +4 0.000040 +5 0.000050 query I select count(DISTINCT cast(c1 AS DECIMAL(42, 4))) from decimal256_simple; diff --git a/datafusion/sqllogictest/test_files/distinct_on.slt b/datafusion/sqllogictest/test_files/distinct_on.slt index cc0ebf83a843b..047c1d263bd14 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.122852 0.6864391963 0keZ5G8BffGwgF2RwQD59TFzMStxCB +b 1 29 -18218 994303988 5983957848665088916 204 9489 3275293996 14857091259186476033 0.538404 0.1790903512 AyYVExXK6AR2qUTxNZ7qRHQOVGMLcz +c 2 1 18109 2033001162 -6513304855495910254 25 43062 1491205016 5863949479783605708 0.110831 0.9294097332 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 2306eda77d355..94ef00f81d0e3 100644 --- a/datafusion/sqllogictest/test_files/expr.slt +++ b/datafusion/sqllogictest/test_files/expr.slt @@ -1742,25 +1742,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.570796327 # 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.09900990099 1.471623943 # 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.09900990099 1.471623943 # 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.09900990099 1.471623943 statement ok diff --git a/datafusion/sqllogictest/test_files/expr/date_part.slt b/datafusion/sqllogictest/test_files/expr/date_part.slt index cec80a165f306..2079e5331f30a 100644 --- a/datafusion/sqllogictest/test_files/expr/date_part.slt +++ b/datafusion/sqllogictest/test_files/expr/date_part.slt @@ -490,12 +490,12 @@ SELECT extract(nanosecond from arrow_cast('23:32:50.123456'::time, 'Time64(Micro query R SELECT date_part('epoch', arrow_cast('23:32:50.123456'::time, 'Time64(Microsecond)')) ---- -84770.123456 +84770.12346 query R SELECT extract(epoch from arrow_cast('23:32:50.123456'::time, 'Time64(Microsecond)')) ---- -84770.123456 +84770.12346 ## time64 nanoseconds query I @@ -570,19 +570,19 @@ SELECT date_part('nanosecond', arrow_cast('23:32:50.123456789'::time, 'Time64(Na query R SELECT date_part('epoch', arrow_cast('23:32:50.123456789'::time, 'Time64(Nanosecond)')) ---- -84770.123456789 +84770.12346 query R SELECT extract(epoch from arrow_cast('23:32:50.123456789'::time, 'Time64(Nanosecond)')) ---- -84770.123456789 +84770.12346 # test_extract_epoch query R SELECT extract(epoch from '1870-01-01T07:29:10.256'::timestamp) ---- --3155646649.744 +-3155646650 query R SELECT extract(epoch from '2000-01-01T00:00:00.000'::timestamp) diff --git a/datafusion/sqllogictest/test_files/functions.slt b/datafusion/sqllogictest/test_files/functions.slt index 4b770a19fe20c..9f392db8c65c6 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.6584408486 query R SELECT avg(CAST(sqrt(c11) AS double)) FROM aggregate_test_100 ---- -0.658440848589 +0.6584408486 query R SELECT avg(sqrt(CAST(c11 AS double))) FROM aggregate_test_100 ---- -0.658440848342 +0.6584408483 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.414213562 query R SELECT SQRT(column1) FROM t ---- -1.414213562373 +1.414213562 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.414213562 # 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.414213562 1.414213562 1.414213562 1.414213562 1.414213562 1.414213562 1.414213562 1.414213562 1.41421 1.414213562 statement ok drop table t @@ -834,7 +834,7 @@ SELECT greatest(-1, 1, 2.3, 123456789, 3 + 5, -(-4)) query R SELECT greatest(-1.123, 1.21313, 2.3, 123456789.321, 3 + 5.3213, -(-4.3213), abs(-9)) ---- -123456789.321 +123456789.3 query R SELECT greatest(-1, 1, 2.3, 123456789, 3 + 5, -(-4), abs(-9.0)) diff --git a/datafusion/sqllogictest/test_files/group.slt b/datafusion/sqllogictest/test_files/group.slt index a6b5f9b72a53d..cb5288162ae31 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.05636955102 0.9965400388 +2 0.1630111052 0.9915178287 +3 0.04734343429 0.9293883502 +4 0.02182578039 0.9237877978 +5 0.01479305308 0.9723580397 # csv_query_group_by_float32 query IR @@ -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.4875451747 +b 0.4104070926 +c 0.6600456536 +d 0.4885537939 +e 0.4860066927 # 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.4875451747 +b 0.4104070926 +c 0.6600456536 +d 0.4885537939 +e 0.4860066927 # 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.02182578039 0.980019341 +b 0.04893135682 0.9185813971 +c 0.04949244655 0.9915178287 +d 0.06102937535 0.9748360509 +e 0.01479305308 0.9965400388 # 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.4875451747 +b 0.4104070926 +c 0.6600456536 +d 0.4885537939 +e 0.4860066927 # 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.4875451747 +b 0.4104070926 +c 0.6600456536 +d 0.4885537939 +e 0.4860066927 # 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.4104070926 +e 0.4860066927 +a 0.4875451747 +d 0.4885537939 +c 0.6600456536 diff --git a/datafusion/sqllogictest/test_files/group_by.slt b/datafusion/sqllogictest/test_files/group_by.slt index df7e21c2da447..b51d51ea8ce6d 100644 --- a/datafusion/sqllogictest/test_files/group_by.slt +++ b/datafusion/sqllogictest/test_files/group_by.slt @@ -5527,7 +5527,7 @@ select a, b, count(*) from t group by a, b order by a, b; ---- 1 123.45 2 1 NULL 1 -2 678.9 3 +2 678.90 3 2 1011.12 2 3 1314.15 2 NULL 123.45 2 diff --git a/datafusion/sqllogictest/test_files/join.slt b/datafusion/sqllogictest/test_files/join.slt index 1feacc5ebe53e..5489c7112d1ba 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.05112015194 -1.663563947 # 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.05112015194 # 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/joins.slt b/datafusion/sqllogictest/test_files/joins.slt index 49aaa877caa6b..08c8f048ac0ab 100644 --- a/datafusion/sqllogictest/test_files/joins.slt +++ b/datafusion/sqllogictest/test_files/joins.slt @@ -861,7 +861,7 @@ ORDER BY a.population ---- c 626.443 c 626.443 a 838.698 a 838.698 -b 1778.934 b 1778.934 +b 1778.93 b 1778.93 statement ok DROP TABLE population; @@ -2676,7 +2676,7 @@ query DDRTDDRT rowsort select * from hashjoin_datatype_table_t1 t1 join hashjoin_datatype_table_t2 t2 on t1.c1 = t2.c1 ---- 1970-01-02 1970-01-02T00:00:00 1.23 abc 1970-01-02 1970-01-02T00:00:00 -123.12 abc -1970-01-04 NULL -123.12 jkl 1970-01-04 NULL 789 qwe +1970-01-04 NULL -123.12 jkl 1970-01-04 NULL 789.00 qwe # explain hash_join_with_date64 @@ -2695,9 +2695,9 @@ query DDRTDDRT rowsort select * from hashjoin_datatype_table_t1 t1 left join hashjoin_datatype_table_t2 t2 on t1.c2 = t2.c2 ---- 1970-01-02 1970-01-02T00:00:00 1.23 abc 1970-01-02 1970-01-02T00:00:00 -123.12 abc -1970-01-03 1970-01-03T00:00:00 456 def NULL NULL NULL NULL +1970-01-03 1970-01-03T00:00:00 456.00 def NULL NULL NULL NULL 1970-01-04 NULL -123.12 jkl NULL NULL NULL NULL -NULL 1970-01-04T00:00:00 789 ghi NULL 1970-01-04T00:00:00 0 qwerty +NULL 1970-01-04T00:00:00 789.00 ghi NULL 1970-01-04T00:00:00 0.00 qwerty # explain hash_join_with_decimal @@ -2716,9 +2716,9 @@ query DDRTDDRT rowsort select * from hashjoin_datatype_table_t1 t1 right join hashjoin_datatype_table_t1 t2 on t1.c3 = t2.c3 ---- 1970-01-02 1970-01-02T00:00:00 1.23 abc 1970-01-02 1970-01-02T00:00:00 1.23 abc -1970-01-03 1970-01-03T00:00:00 456 def 1970-01-03 1970-01-03T00:00:00 456 def +1970-01-03 1970-01-03T00:00:00 456.00 def 1970-01-03 1970-01-03T00:00:00 456.00 def 1970-01-04 NULL -123.12 jkl 1970-01-04 NULL -123.12 jkl -NULL 1970-01-04T00:00:00 789 ghi NULL 1970-01-04T00:00:00 789 ghi +NULL 1970-01-04T00:00:00 789.00 ghi NULL 1970-01-04T00:00:00 789.00 ghi # explain hash_join_with_dictionary query TT @@ -2787,7 +2787,7 @@ query DDRTDDRT rowsort select * from hashjoin_datatype_table_t1 t1 join hashjoin_datatype_table_t2 t2 on t1.c1 = t2.c1 ---- 1970-01-02 1970-01-02T00:00:00 1.23 abc 1970-01-02 1970-01-02T00:00:00 -123.12 abc -1970-01-04 NULL -123.12 jkl 1970-01-04 NULL 789 qwe +1970-01-04 NULL -123.12 jkl 1970-01-04 NULL 789.00 qwe # explain sort_merge_join_on_decimal right join on data type (Decimal) query TT @@ -2819,9 +2819,9 @@ query DDRTDDRT rowsort select * from hashjoin_datatype_table_t1 t1 right join hashjoin_datatype_table_t2 t2 on t1.c3 = t2.c3 ---- 1970-01-04 NULL -123.12 jkl 1970-01-02 1970-01-02T00:00:00 -123.12 abc -NULL 1970-01-04T00:00:00 789 ghi 1970-01-04 NULL 789 qwe -NULL NULL NULL NULL NULL 1970-01-04T00:00:00 0 qwerty -NULL NULL NULL NULL NULL NULL 100000 abcdefg +NULL 1970-01-04T00:00:00 789.00 ghi 1970-01-04 NULL 789.00 qwe +NULL NULL NULL NULL NULL 1970-01-04T00:00:00 0.00 qwerty +NULL NULL NULL NULL NULL NULL 100000.00 abcdefg #### # Config teardown diff --git a/datafusion/sqllogictest/test_files/math.slt b/datafusion/sqllogictest/test_files/math.slt index e86d78a623538..b30045b7dc0af 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.107148718 -1.107148718 2.034443936 -2.034443936 NULL NULL NULL # nanvl query RRR @@ -521,9 +521,9 @@ NULL query R SELECT c1*0 FROM test_nullable_decimal WHERE c1 IS NOT NULL; ---- -0 -0 -0 +0.00 +0.00 +0.00 query error DataFusion error: Arrow error: Divide by zero error SELECT c1/0 FROM test_nullable_decimal WHERE c1 IS NOT NULL; @@ -546,7 +546,7 @@ Decimal128(10, 2) Decimal128(38, 10) Decimal256(40, 2) Decimal256(76, 10) query RRRR rowsort SELECT abs(c1), abs(c2), abs(c3), abs(c4) FROM test_nullable_decimal ---- -0 0 0 0 +0.00 0.0000000000 0.00 0.0000000000 99999999.99 9999999999999999999999999999.9999999999 99999999999999999999999999999999999999.99 999999999999999999999999999999999999999999999999999999999999999999.9999999999 99999999.99 9999999999999999999999999999.9999999999 99999999999999999999999999999999999999.99 999999999999999999999999999999999999999999999999999999999999999999.9999999999 NULL NULL NULL NULL diff --git a/datafusion/sqllogictest/test_files/options.slt b/datafusion/sqllogictest/test_files/options.slt index aafaa054964e1..aae9ddadcb1b2 100644 --- a/datafusion/sqllogictest/test_files/options.slt +++ b/datafusion/sqllogictest/test_files/options.slt @@ -101,7 +101,7 @@ query IIRIIIR select 0, -9223372036854775808, -9223372036854775809, 9223372036854775807, 9223372036854775808, 18446744073709551615, 18446744073709551616 ---- -0 -9223372036854775808 -9223372036854776000 9223372036854775807 9223372036854775808 18446744073709551615 18446744073709552000 +0 -9223372036854775808 -9223372037000000000 9223372036854775807 9223372036854775808 18446744073709551615 18446744070000000000 query TTTTTTT select arrow_typeof(0), arrow_typeof(-9223372036854775808), arrow_typeof(-9223372036854775809), @@ -142,7 +142,7 @@ Int64 Int64 Decimal128(19, 0) Int64 UInt64 UInt64 Decimal128(20, 0) query RRRR select .0 as c1, 0. as c2, 0000. as c3, 00000.00 as c4 ---- -0 0 0 0 +0.0 0 0 0.00 query TTTT select arrow_typeof(.0) as c1, arrow_typeof(0.) as c2, arrow_typeof(0000.) as c3, arrow_typeof(00000.00) as c4 diff --git a/datafusion/sqllogictest/test_files/order.slt b/datafusion/sqllogictest/test_files/order.slt index a46040aa532ed..a699b0c6905e1 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.01479305308 # 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..23cf31cec0945 100644 --- a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_simple.slt +++ b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_simple.slt @@ -81,7 +81,7 @@ SELECT cos(4.0) as cos, tan(5.0) as tan; ---- -1.1 7.389056098931 0.14112000806 -0.653643620864 -3.380515006247 +1.1 7.389056099 0.1411200081 -0.6536436209 -3.380515006 query I @@ -356,11 +356,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 16.68181818 125 -99 22 0 -1 -47 +2 184 8.363636364 122 -117 22 0 -1 -2 +3 395 20.78947368 123 -101 19 0 -1 101 +4 29 1.260869565 123 -117 23 0 -1 15 +5 -194 -13.85714286 118 -101 14 0 -1 -122 query I @@ -477,106 +477,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.122852 0.6864391963 0keZ5G8BffGwgF2RwQD59TFzMStxCB +a 1 -56 8692 2106705285 -7811675384226570375 231 15573 1454057357 677091006469429514 0.427948 0.2739938529 JN0VclewmjwYlSl8386MlWv5rEhWCz +a 1 -25 15295 383352709 4980135132406487265 231 102 3276123488 12763583666216333412 0.537963 0.1759248691 XemNcT1xp61xcM1Qz3wZ1VECCnq06O +a 1 -5 12636 794623392 2909750622865366631 15 24022 2669374863 4776679784701509574 0.298778 0.2537253408 waIGbOGl1PM6gnzZ4uuZt4E2yDWRHs +a 1 83 -14704 2143473091 -4387559599038777245 37 829 4015442341 4602675983996931623 0.895425 0.9567595541 ErJFw6hzZ5fmI5r8bhE4JzlscnhKZU +a 2 -48 -18025 439738328 -313657814587041987 222 13763 3717551163 9135746610908713318 0.0550649 0.980019341 ukyD7b0Efj7tNlFSRmzZ0IqkEzg2a8 +a 2 -43 13080 370975815 5881039805148485053 2 20120 2939920218 906367167997372130 0.427338 0.1630111052 m6jD0LBIQWaMfenwRCTANI9eOdyyto +a 2 45 15673 -1899175111 398282800995316041 99 2555 145294611 8554426087132697832 0.173333 0.640526243 b3b9esRhTzFEawbs6XhpKnD9ojutHB +a 3 -72 -11122 -2141451704 -2578916903971263854 83 30296 1995343206 17452974532402389080 0.942093 0.323175061 e2Gh6Ov8XkXoFdJWhl0EjwEHlMDYyG +a 3 -12 -9168 1489733240 -1569376002217735076 206 33821 3959216334 16060348691054629425 0.948803 0.9293883502 oLZ21P2JEDooxV1pU31cIxQHEeeoLu +a 3 13 12613 1299719633 2020498574254265315 191 17835 3998790955 14881411008939145569 0.0414454 0.8813167498 Amn2K87Db5Es3dFQO9cw9cvpAM6h35 +a 3 13 32064 912707948 3826618523497875379 42 21463 2214035726 10771380284714693539 0.613347 0.7325106679 i6RQVXKUh7MzuGMDaNclUYnFUAireU +a 3 14 28162 397430452 -452851601758273256 57 14722 431948861 8164671015278284913 0.401997 0.07260475961 TtDKUZxzVxsq758G6AWPSYuZgVgbcl +a 3 17 -22796 1337043149 -1282905594104562444 167 2809 754775609 732272194388185106 0.388413 0.658671129 VDhtJkYjAYPykCgOU9x3v7v3t4SO1a +a 4 -101 11640 1993193190 2992662416070659899 230 40566 466439833 16778113360088370541 0.399112 0.5742108382 NEhyk8uIx4kEULJGa8qIyFjjBcP2G6 +a 4 -54 -2376 434021400 5502271306323260832 113 15777 2502326480 7966148640299601101 0.572093 0.3058537515 KJFcmTVjdkCMv94wYCtfHMFhzyRsmH +a 4 -38 20744 762932956 308913475857409919 7 45465 1787652631 878137512938218976 0.745987 0.02182578039 ydkwycaISlYSlEq3TlkS2m15I2pcp8 +a 4 65 -28462 -1813935549 7602389238442209730 18 363 1865307672 11378396836996498283 0.091302 0.5593249815 WHmjWk2AY4c6m7DA4GitUx6nmb1yYS +a 5 -101 -12484 -842693467 -6140627905445351305 57 57885 2496054700 2243924747182709810 0.595206 0.9491397433 QJYm7YRA3YetcBHI5wkMZeLXVmfuNy +a 5 -31 -12907 586844478 -4862189775214031241 170 28086 1013876852 11005002152861474932 0.353192 0.05573662213 MeSTAXq8gVxVjbEjgkvU9YLte0X9uE +a 5 36 -16974 623103518 6834444206535996609 71 29458 141047417 17448660630302620693 0.171 0.04429073092 OF7fQ37GzaZ5ikA2oMyvleKtgnLjXh +b 1 12 7652 -1448995523 -5332734971209541785 136 49283 4076864659 15449267433866484283 0.621458 0.05636955102 akiiY5N0I44CMwEnBL6RTBk7BRkxEj +b 1 29 -18218 994303988 5983957848665088916 204 9489 3275293996 14857091259186476033 0.538404 0.1790903512 AyYVExXK6AR2qUTxNZ7qRHQOVGMLcz +b 1 54 -18410 1413111008 -7145106120930085900 249 5382 1842680163 17818611040257178339 0.888119 0.2489979431 6FPJlLAcaQ5uokyOWZ9HGdLZObFvOZ +b 2 -60 -21739 -1908480893 -8897292622858103761 59 50009 2525744318 1719090662556698549 0.529307 0.5603331886 l7uwDoTepWwnAP0ufqtHJS3CRi7RfP +b 2 31 23127 -800561771 -8706387435232961848 153 27034 1098639440 3343692635488765507 0.356927 0.5590205548 okOkcWflkNXIy4R8LzmySyY1EC3sYd +b 2 63 21456 -2138770630 -2380041687053733364 181 57594 2705709344 13144161537396946288 0.0968372 0.3051364089 nYVJnVicpGRqKZibHyBAmtmzBXAFfT +b 2 68 15874 49866617 1179733259727844435 121 23948 3455216719 3898128009708892708 0.630625 0.9185813971 802bgTGl6Bk5TlkPYYTxp5JkKyaYUA +b 3 -101 -13217 -346989627 5456800329302529236 26 54276 243203849 17929716297117857676 0.0542218 0.09465635124 MXhhH1Var3OzzJCtI9VNyYvA0q8UyJ +b 3 17 14457 670497898 -2390782464845307388 255 24770 1538863055 12662506238151717757 0.340776 0.7614304101 6x93sxYioWuq5c9Kkk8oTAAORM7cH0 +b 4 -117 19316 2051224722 -5534418579506232438 133 52046 3023531799 13684453606722360110 0.626088 0.8506721053 mhjME0zBHbrK6NMkytMTQzOssOa1gF +b 4 -111 -1967 -4229382 1892872227362838079 67 9832 1243785310 8382489916947120498 0.06564 0.152498293 Sfx0vxv1skzZWT1PqVdoRDdO6Sb6xH +b 4 -59 25286 1423957796 2646602445954944051 0 61069 3570297463 15100310750150419896 0.496194 0.04893135682 fuyvs0w7WsKSlXqJ1e6HFSoLmx03AG +b 4 17 -28070 -673237643 1904316899655860234 188 27744 933879086 3732692885824435932 0.418601 0.403422832 JHNgc2UCaiXOdmkxwDDyGhRlO0mnBQ +b 4 47 20690 -1009656194 -2027442591571700798 200 7781 326151275 2881913079548128905 0.57361 0.2145232647 52mKlRE3aHCBZtjECq6sY9OqVf8Dze +b 5 -82 22080 1824882165 7373730676428214987 208 34331 3342719438 3330177516592499461 0.826346 0.4097538353 Ig1QcuKsjHXkproePdERo2w0mYzIqd +b 5 -44 15788 -629486480 5822642169425315613 13 11872 3457053821 2413406423648025909 0.443183 0.3286937469 ALuRhobVWbnQTTWZdSOk0iVe8oYFhW +b 5 -5 24896 1955646088 2430204191283109071 118 43655 2424630722 11429640193932435507 0.8799 0.7328050041 JafwVLSVk5AVoXFuzclesQ000EE2k1 +b 5 62 16337 41423756 -2274773899098124524 121 34206 2307004493 10575647935385523483 0.237948 0.1754261587 qnPOOmslCJaT45buUisMRnM0rc77EK +b 5 68 21576 1188285940 5717755781990389024 224 27600 974297360 9865419128970328044 0.808957 0.7973920073 ioEncce3mPOXD2hWhpZpCPWGATG6GU +c 1 -24 -24085 -1882293856 7385529783747709716 41 48048 520189543 2402288956117186783 0.397615 0.3600766362 Fi4rJeTQq4eXj8Lxg3Hja5hBVTVV5u +c 1 41 -4667 -644225469 7049620391314639084 196 48099 2125812933 15419512479294091215 0.578074 0.9255031346 mzbkwXKrPeZnxg2Kn1LRF5hYSsmksS +c 1 70 27752 1325868318 1241882478563331892 63 61637 473294098 4976799313755010034 0.138016 0.5081765563 Ktb7GQ0N1DrxwkCkEUsTaIXk0xYinn +c 1 103 -22186 431378678 1346564663822463162 146 12393 3766999078 10901819591635583995 0.0644532 0.7784918984 2T3wSlHdEmASmO0xcXHnndkKEt6bz8 +c 2 -117 -30187 -1222533990 -191957437217035800 136 47061 2293105904 12659011877190539078 0.204738 0.9706712283 pLk3i59bZwd5KBZrI1FiweYTd5hteG +c 2 -107 -2904 -1011669561 782342092880993439 18 29527 1157161427 4403623840168496677 0.319884 0.369363046 QYlaIAnJA6r8rlAb6f59wcxvcPcWFf +c 2 -106 -1114 -1927628110 1080308211931669384 177 20421 141680161 7464432081248293405 0.567491 0.5653528422 Vp3gmWunM5A7wOC9YW2JroFqTWjvTi +c 2 -60 -16312 -1808210365 -3368300253197863813 71 39635 2844041986 7045482583778080653 0.805363 0.6425694115 BJqx5WokrmrrezZA0dUbleMYkG5U2O +c 2 -29 25305 -537142430 -7683452043175617798 150 31648 598822671 11759014161799384683 0.831591 0.9463251649 9UbObCsVkmYpJGcGrgfK90qOnwb2Lj +c 2 1 18109 2033001162 -6513304855495910254 25 43062 1491205016 5863949479783605708 0.110831 0.9294097332 6WfVFBVGJSQb7FhA7E0lBwdvjfZnSW +c 2 29 -3855 1354539333 4742062657200940467 81 53815 3398507249 562977550464243101 0.712453 0.9915178287 Oq6J4Rx6nde0YlhOIJkFsX2MsSvAQ0 +c 3 -2 -18655 -2141999138 -3154042970870838072 251 34970 3862393166 13062025193350212516 0.0342919 0.7697753383 IWl0G3ZlMNf7WT8yjIB49cx7MmYOmr +c 3 22 13741 -2098805236 8604102724776612452 45 2516 1362369177 196777795886465166 0.946696 0.04949244655 6oIXZuIPIqEoPBvFmbt2Nxy3tryGUE +c 3 73 -9565 -382483011 1765659477910680019 186 1535 1088543984 2906943497598597237 0.680652 0.6009475545 Ow5PGpfTm4dXCfTDsXAOTatXRoAydR +c 3 97 29106 -903316089 2874859437662206732 207 42171 3473924576 8188072741116415408 0.327925 0.2667177795 HKSMQ9nTnwXCJIte1JrM1dtYnDtJ8g +c 4 -90 -2935 1579876740 6733733506744649678 254 12876 3593959807 4094315663314091142 0.570869 0.5603062368 Ld2ej8NEv5zNcqU60FwpHeZKBhfpiV +c 4 -79 5281 -237425046 373011991904079451 121 55620 2818832252 2464584078983135763 0.497748 0.9237877978 t6fQUjJejPcjc04wHvHTPe55S65B4V +c 4 3 -30508 659422734 -6455460736227846736 133 59663 2306130875 8622584762448622224 0.169999 0.4273123319 EcCuckwsF3gV1Ecgmh5v4KM8g1ozif +c 4 123 16620 852509237 -3087630526856906991 196 33715 3566741189 4546434653720168472 0.0760699 0.8197158651 8LIh0b6jmDGm87BmIyjdxNIpX4ugjD +c 5 -94 -15880 2025611582 -3348824099853919681 5 40622 4268716378 12849419495718510869 0.341639 0.4830878559 RilTlL1tKkPOUFuzmLydHAVZwv1OGl +c 5 118 19208 -134213907 -2120241105523909127 86 57751 1229567292 16493024289408725403 0.553664 0.9723580397 TTQUwpMNSXZqVBKAFvXu7OlWvKXJKX +d 1 -99 5613 1213926989 -8863698443222021480 19 18736 4216440507 14933742247195536130 0.606794 0.3363959066 aDxBtor7Icd9C5hnTvvw5NrIre740e +d 1 -98 13630 -1991133944 1184110014998006843 220 2986 225513085 9634106610243643486 0.896519 0.1640882545 y7C453hRWd4E7ImjNDWlpexB8nUqjh +d 1 -72 25590 1188089983 3090286296481837049 241 832 3542840110 5885937420286765261 0.419806 0.2153540234 wwXqSGKLyBQyPkonlzBNYUJTCo4LRS +d 1 -8 27138 -1383162419 7682021027078563072 36 64517 2861376515 9904216782086286050 0.809545 0.9463098244 AFGCj7OWlEB5QfniEFgonMq90Tq5uH +d 1 38 18384 -335410409 -1632237090406591229 26 57510 2712615025 1842662804748246269 0.606448 0.6404495093 4HX6feIvmNXBN7XGqgO4YVBkhu8GDI +d 1 57 28781 -1143802338 2662536767954229885 202 62167 879082834 4338034436871150616 0.761838 0.4295052173 VY0zXmXeksCT8BzvpzpPLbmU9Kp9Y4 +d 1 125 31106 -1176490478 -4306856842351827308 90 17910 3625286410 17869394731126786457 0.888251 0.763123907 dVdvo6nUD5FgCgsbOZLds28RyGTpnx +d 2 93 -12642 2053379412 6468763445799074329 147 50842 1000948272 5536487915963301239 0.427927 0.2853442858 lqhzgLsXZ8JhtpeeUWWNbMz8PHI705 +d 2 113 3917 -108973366 -7220140168410319165 197 24380 63044568 4225581724448081782 0.118671 0.2944158618 90gAtmGEeIqUTbo1ZrxCvWtsseukXC +d 2 122 10130 -168758331 -3179091803916845592 30 794 4061635107 15695681119022625322 0.695925 0.9748360509 OPwBqCEK5PWTjWaiOyL45u2NLTaDWv +d 3 -76 8809 141218956 -9110406195556445909 58 5494 1824517658 12046662515387914426 0.855729 0.6668423897 Z2sWcQr0qyCJRMHDpRy3aQr7PkHtkK +d 3 77 15091 -1302295658 8795481303066536947 154 35477 2093538928 17419098323248948387 0.119529 0.7035635283 O66j6PaYuZhEUtqV6fuU7TyjM2WxC5 +d 3 123 29533 240273900 1176001466590906949 117 30972 2592330556 12883447461717956514 0.390751 0.3887028098 1aOcrEGd0cOqZe2I5XBOm0nDcwtBZO +d 4 5 -7688 702611616 6239356364381313700 4 39363 3126475872 35363005357834672 0.376693 0.06102937535 H5j5ZHy1FGesOAHjkQEDYCucbpKWRu +d 4 55 -1471 1902023838 1252101628560265705 157 3691 811650497 1524771507450695976 0.29687 0.543759554 f9ALCzwDAKmdu7Rk2msJaB1wxe5IBX +d 4 102 -24558 1991172974 -7823479531661596016 14 36599 1534194097 2240998421986827216 0.028003 0.8824879448 0og6hSkhbX8AC1ktFS4kounvTzy8Vo +d 5 -59 2045 -2117946883 1170799768349713170 189 63353 1365198901 2501626630745849169 0.75173 0.1862885927 F7NSTjWvQJyBburN7CXRUlbgp2dIrA +d 5 -40 22614 706441268 -7542719935673075327 155 14337 3373581039 11720144131976083864 0.696321 0.311471254 C2GT5KVyOPZpgKVl110TyZO0NcJ434 +e 1 36 -21481 -928766616 -3471238138418013024 150 52569 2610290479 7788847578701297242 0.257847 0.7670021786 gpo8K5qtYePve6jyPt6xgJx4YOVjms +e 1 71 -5479 -1339586153 -3920238763788954243 123 53012 4229654142 10297218950720052365 0.73473 0.5773498217 cBGc0kSm32ylBDnxogG727C0uhZEYZ +e 1 120 10837 -1331533190 6342019705133850847 245 3975 2830981072 16439861276703750332 0.662372 0.9965400388 LiEBxds3X0Uw0lxiYjDqrkAaAwoiIW +e 2 -61 -2888 -1660426473 2553892468492435401 126 35429 4144173353 939909697866979632 0.440514 0.9231889897 BPtQMxnuSPpxMExYV9YkDa6cAN7GP3 +e 2 49 24495 -587831330 9178511478067509438 129 12757 1289293657 10948666249269100825 0.561008 0.5991138115 bgK1r6v3BCTh0aejJUhkA1Hn6idXGp +e 2 52 -12056 -1090239422 9011500141803970147 238 4168 2013662838 12565360638488684051 0.669477 0.3914443657 xipQ93429ksjNcXPX5326VSg1xJZcW +e 2 52 23388 715235348 605432070100399212 165 56980 3314983189 7386391799827871203 0.460765 0.9808096313 jQimhdepw3GKmioWUlVSWeBVRKFkY3 +e 2 97 18167 1593800404 -9112448817105133638 163 45185 3188005828 2792105417953811674 0.381754 0.4094218354 ukOiFGGFnQJDHFgZxHMpvhD3zybF0M +e 3 -95 13611 2030965207 927403809957470678 119 59134 559847112 10966649192992996919 0.530129 0.04734343429 gTpyQnEODMcpsPnJMZC66gh33i3m0b +e 3 71 194 1436496767 -5639533800082367925 158 44507 3105312559 3998472996619161534 0.930117 0.6108938308 pTeu0WMjBRTaNRT15rLCuEh3tBJVc5 +e 3 104 -25136 1738331255 300633854973581194 139 20807 3577318119 13079037564113702254 0.40154 0.776436099 DuJNG8tufSqW0ZstHqWj3aGvFLMg4A +e 3 112 -6823 -421042466 8535335158538929274 129 32712 3759340273 9916295859593918600 0.642434 0.6316565297 BsM5ZAYifRh5Lw3Y8X1r53I0cTJnfE +e 4 -56 -31500 1544188174 3096047390018154410 220 417 557517119 2774306934041974261 0.154596 0.1911329358 IZTkHMLvIKuiLjhDjYMmIHxh166we4 +e 4 -53 13788 2064155045 -691093532952651300 243 35106 2778168728 9463973906560740422 0.345152 0.2715919052 0VVIHzxWtNOFLtnhjHEKjXaJOSLJfm +e 4 30 -16110 61035129 -3356533792537910152 159 299 28774375 13526465947516666293 0.699978 0.03968347086 cq4WSAIFwx3wwTUS5bp1wCe71R6U5I +e 4 73 -22501 1282464673 2541794052864382235 67 21119 538589788 9575476605699527641 0.48515 0.2960365387 4JznSdBajNWhu4hRQwjV1FjTTxY68i +e 4 74 -12612 -1885422396 1702850374057819332 130 3583 3198969145 10767179755613315144 0.551806 0.5614503755 QEHVvcP8gxI6EMJIrvcnIhgzPNjIvv +e 4 96 -30336 427197269 7506304308750926996 95 48483 3521368277 5437030162957481122 0.581043 0.4207312533 3BEOHQsMEFZ58VcNTOJYShTBpAPzbt +e 4 97 -13181 2047637360 6176835796788944083 158 53000 2042457019 9726016502640071617 0.708509 0.1235753999 oHJMNvWuunsIMIWFnYG31RCfkOo2V7 +e 5 -86 32514 -467659022 -8012578250188146150 254 2684 2861911482 2126626171973341689 0.125593 0.01479305308 gxfHWUF8XgY2KdFxigxvNEXe2V2XMl +e 5 64 -26526 1689098844 8950618259486183091 224 45253 662099130 16127995415060805595 0.289732 0.5759450484 56MZa5O1hVtX4c5sbnCfxuX5kDChqI # distinct_from logic for floats query BBBBBBBBBBB diff --git a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_types.slt b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_types.slt index 7e315a448b48e..8339fb4fab24a 100644 --- a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_types.slt +++ b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_types.slt @@ -99,7 +99,7 @@ select 1.0::DOUBLE, 1.023::DOUBLE, 'NaN'::DOUBLE,'+Inf'::DOUBLE,'-Inf'::DOUBLE query RRR select 1.0::DECIMAL(5,3) as one, 2.023::DECIMAL(5,3) as two, 3.023::DECIMAL(5,2) as three ---- -1 2.023 3.02 +1.000 2.023 3.02 query D select '2018-01-01'::DATE 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..fc0cdf30c6227 100644 --- a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_window.slt +++ b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_window.slt @@ -704,92 +704,92 @@ 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 +225513085 1 6 16.68181818 367 125 -99 0 -1 -47 +473294098 2 11 16.68181818 367 125 -99 0 -1 -47 +520189543 3 12 16.68181818 367 125 -99 0 -1 -47 +774637006 4 19 16.68181818 367 125 -99 0 -1 -47 +879082834 5 21 16.68181818 367 125 -99 0 -1 -47 +1454057357 6 34 16.68181818 367 125 -99 0 -1 -47 +1842680163 7 40 16.68181818 367 125 -99 0 -1 -47 +2125812933 8 46 16.68181818 367 125 -99 0 -1 -47 +2610290479 9 56 16.68181818 367 125 -99 0 -1 -47 +2669374863 10 57 16.68181818 367 125 -99 0 -1 -47 +2712615025 11 59 16.68181818 367 125 -99 0 -1 -47 +2830981072 12 62 16.68181818 367 125 -99 0 -1 -47 +2861376515 13 64 16.68181818 367 125 -99 0 -1 -47 +3275293996 14 72 16.68181818 367 125 -99 0 -1 -47 +3276123488 15 73 16.68181818 367 125 -99 0 -1 -47 +3542840110 16 82 16.68181818 367 125 -99 0 -1 -47 +3625286410 17 87 16.68181818 367 125 -99 0 -1 -47 +3766999078 18 90 16.68181818 367 125 -99 0 -1 -47 +4015442341 19 94 16.68181818 367 125 -99 0 -1 -47 +4076864659 20 96 16.68181818 367 125 -99 0 -1 -47 +4216440507 21 98 16.68181818 367 125 -99 0 -1 -47 +4229654142 22 99 16.68181818 367 125 -99 0 -1 -47 +63044568 23 2 12.52272727 551 125 -117 0 -1 47 +141680161 24 4 12.52272727 551 125 -117 0 -1 47 +145294611 25 5 12.52272727 551 125 -117 0 -1 47 +598822671 26 16 12.52272727 551 125 -117 0 -1 47 +1000948272 27 24 12.52272727 551 125 -117 0 -1 47 +1098639440 28 27 12.52272727 551 125 -117 0 -1 47 +1157161427 29 28 12.52272727 551 125 -117 0 -1 47 +1289293657 30 31 12.52272727 551 125 -117 0 -1 47 +1491205016 31 35 12.52272727 551 125 -117 0 -1 47 +2013662838 32 43 12.52272727 551 125 -117 0 -1 47 +2293105904 33 48 12.52272727 551 125 -117 0 -1 47 +2525744318 34 54 12.52272727 551 125 -117 0 -1 47 +2705709344 35 58 12.52272727 551 125 -117 0 -1 47 +2844041986 36 63 12.52272727 551 125 -117 0 -1 47 +2939920218 37 66 12.52272727 551 125 -117 0 -1 47 +3188005828 38 70 12.52272727 551 125 -117 0 -1 47 +3314983189 39 74 12.52272727 551 125 -117 0 -1 47 +3398507249 40 77 12.52272727 551 125 -117 0 -1 47 +3455216719 41 78 12.52272727 551 125 -117 0 -1 47 +3717551163 42 88 12.52272727 551 125 -117 0 -1 47 +4061635107 43 95 12.52272727 551 125 -117 0 -1 47 +4144173353 44 97 12.52272727 551 125 -117 0 -1 47 +243203849 45 7 15.01587302 946 125 -117 0 -1 74 +431948861 46 9 15.01587302 946 125 -117 0 -1 74 +559847112 47 15 15.01587302 946 125 -117 0 -1 74 +754775609 48 18 15.01587302 946 125 -117 0 -1 74 +1088543984 49 26 15.01587302 946 125 -117 0 -1 74 +1362369177 50 32 15.01587302 946 125 -117 0 -1 74 +1538863055 51 37 15.01587302 946 125 -117 0 -1 74 +1824517658 52 39 15.01587302 946 125 -117 0 -1 74 +1995343206 53 42 15.01587302 946 125 -117 0 -1 74 +2093538928 54 45 15.01587302 946 125 -117 0 -1 74 +2214035726 55 47 15.01587302 946 125 -117 0 -1 74 +2592330556 56 55 15.01587302 946 125 -117 0 -1 74 +3105312559 57 68 15.01587302 946 125 -117 0 -1 74 +3473924576 58 80 15.01587302 946 125 -117 0 -1 74 +3577318119 59 85 15.01587302 946 125 -117 0 -1 74 +3759340273 60 89 15.01587302 946 125 -117 0 -1 74 +3862393166 61 91 15.01587302 946 125 -117 0 -1 74 +3959216334 62 92 15.01587302 946 125 -117 0 -1 74 +3998790955 63 93 15.01587302 946 125 -117 0 -1 74 +28774375 64 1 11.3372093 975 125 -117 0 -1 69 +326151275 65 8 11.3372093 975 125 -117 0 -1 69 +466439833 66 10 11.3372093 975 125 -117 0 -1 69 +538589788 67 13 11.3372093 975 125 -117 0 -1 69 +557517119 68 14 11.3372093 975 125 -117 0 -1 69 +811650497 69 20 11.3372093 975 125 -117 0 -1 69 +933879086 70 22 11.3372093 975 125 -117 0 -1 69 +1243785310 71 30 11.3372093 975 125 -117 0 -1 69 +1534194097 72 36 11.3372093 975 125 -117 0 -1 69 +1787652631 73 38 11.3372093 975 125 -117 0 -1 69 +1865307672 74 41 11.3372093 975 125 -117 0 -1 69 +2042457019 75 44 11.3372093 975 125 -117 0 -1 69 +2306130875 76 49 11.3372093 975 125 -117 0 -1 69 +2502326480 77 53 11.3372093 975 125 -117 0 -1 69 +2778168728 78 60 11.3372093 975 125 -117 0 -1 69 +2818832252 79 61 11.3372093 975 125 -117 0 -1 69 +3023531799 80 67 11.3372093 975 125 -117 0 -1 69 +3126475872 81 69 11.3372093 975 125 -117 0 -1 69 +3198969145 82 71 11.3372093 975 125 -117 0 -1 69 +3521368277 83 81 11.3372093 975 125 -117 0 -1 69 +3566741189 84 83 11.3372093 975 125 -117 0 -1 69 +3570297463 85 84 11.3372093 975 125 -117 0 -1 69 +3593959807 86 86 11.3372093 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 @@ -821,106 +821,106 @@ 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 1.260869565 29 123 -117 0 -1 15 +63044568 1 22 8.363636364 184 122 -117 0 -1 -2 +141047417 1 14 -13.85714286 -194 118 -101 0 -1 -122 +141680161 1 22 8.363636364 184 122 -117 0 -1 -2 +145294611 1 22 8.363636364 184 122 -117 0 -1 -2 +225513085 1 22 16.68181818 367 125 -99 0 -1 -47 +243203849 1 19 20.78947368 395 123 -101 0 -1 101 +326151275 1 23 1.260869565 29 123 -117 0 -1 15 +431948861 1 19 20.78947368 395 123 -101 0 -1 101 +466439833 1 23 1.260869565 29 123 -117 0 -1 15 +473294098 1 22 16.68181818 367 125 -99 0 -1 -47 +520189543 1 22 16.68181818 367 125 -99 0 -1 -47 +538589788 1 23 1.260869565 29 123 -117 0 -1 15 +557517119 1 23 1.260869565 29 123 -117 0 -1 15 +559847112 1 19 20.78947368 395 123 -101 0 -1 101 +598822671 1 22 8.363636364 184 122 -117 0 -1 -2 +662099130 1 14 -13.85714286 -194 118 -101 0 -1 -122 +754775609 1 19 20.78947368 395 123 -101 0 -1 101 +774637006 1 22 16.68181818 367 125 -99 0 -1 -47 +811650497 1 23 1.260869565 29 123 -117 0 -1 15 +879082834 1 22 16.68181818 367 125 -99 0 -1 -47 +933879086 1 23 1.260869565 29 123 -117 0 -1 15 +974297360 1 14 -13.85714286 -194 118 -101 0 -1 -122 +1000948272 1 22 8.363636364 184 122 -117 0 -1 -2 +1013876852 1 14 -13.85714286 -194 118 -101 0 -1 -122 +1088543984 1 19 20.78947368 395 123 -101 0 -1 101 +1098639440 1 22 8.363636364 184 122 -117 0 -1 -2 +1157161427 1 22 8.363636364 184 122 -117 0 -1 -2 +1229567292 1 14 -13.85714286 -194 118 -101 0 -1 -122 +1243785310 1 23 1.260869565 29 123 -117 0 -1 15 +1289293657 1 22 8.363636364 184 122 -117 0 -1 -2 +1362369177 1 19 20.78947368 395 123 -101 0 -1 101 +1365198901 1 14 -13.85714286 -194 118 -101 0 -1 -122 +1454057357 1 22 16.68181818 367 125 -99 0 -1 -47 +1491205016 1 22 8.363636364 184 122 -117 0 -1 -2 +1534194097 1 23 1.260869565 29 123 -117 0 -1 15 +1538863055 1 19 20.78947368 395 123 -101 0 -1 101 +1787652631 1 23 1.260869565 29 123 -117 0 -1 15 +1824517658 1 19 20.78947368 395 123 -101 0 -1 101 +1842680163 1 22 16.68181818 367 125 -99 0 -1 -47 +1865307672 1 23 1.260869565 29 123 -117 0 -1 15 +1995343206 1 19 20.78947368 395 123 -101 0 -1 101 +2013662838 1 22 8.363636364 184 122 -117 0 -1 -2 +2042457019 1 23 1.260869565 29 123 -117 0 -1 15 +2093538928 1 19 20.78947368 395 123 -101 0 -1 101 +2125812933 1 22 16.68181818 367 125 -99 0 -1 -47 +2214035726 1 19 20.78947368 395 123 -101 0 -1 101 +2293105904 1 22 8.363636364 184 122 -117 0 -1 -2 +2306130875 1 23 1.260869565 29 123 -117 0 -1 15 +2307004493 1 14 -13.85714286 -194 118 -101 0 -1 -122 +2424630722 1 14 -13.85714286 -194 118 -101 0 -1 -122 +2496054700 1 14 -13.85714286 -194 118 -101 0 -1 -122 +2502326480 1 23 1.260869565 29 123 -117 0 -1 15 +2525744318 1 22 8.363636364 184 122 -117 0 -1 -2 +2592330556 1 19 20.78947368 395 123 -101 0 -1 101 +2610290479 1 22 16.68181818 367 125 -99 0 -1 -47 +2669374863 1 22 16.68181818 367 125 -99 0 -1 -47 +2705709344 1 22 8.363636364 184 122 -117 0 -1 -2 +2712615025 1 22 16.68181818 367 125 -99 0 -1 -47 +2778168728 1 23 1.260869565 29 123 -117 0 -1 15 +2818832252 1 23 1.260869565 29 123 -117 0 -1 15 +2830981072 1 22 16.68181818 367 125 -99 0 -1 -47 +2844041986 1 22 8.363636364 184 122 -117 0 -1 -2 +2861376515 1 22 16.68181818 367 125 -99 0 -1 -47 +2861911482 1 14 -13.85714286 -194 118 -101 0 -1 -122 +2939920218 1 22 8.363636364 184 122 -117 0 -1 -2 +3023531799 1 23 1.260869565 29 123 -117 0 -1 15 +3105312559 1 19 20.78947368 395 123 -101 0 -1 101 +3126475872 1 23 1.260869565 29 123 -117 0 -1 15 +3188005828 1 22 8.363636364 184 122 -117 0 -1 -2 +3198969145 1 23 1.260869565 29 123 -117 0 -1 15 +3275293996 1 22 16.68181818 367 125 -99 0 -1 -47 +3276123488 1 22 16.68181818 367 125 -99 0 -1 -47 +3314983189 1 22 8.363636364 184 122 -117 0 -1 -2 +3342719438 1 14 -13.85714286 -194 118 -101 0 -1 -122 +3373581039 1 14 -13.85714286 -194 118 -101 0 -1 -122 +3398507249 1 22 8.363636364 184 122 -117 0 -1 -2 +3455216719 1 22 8.363636364 184 122 -117 0 -1 -2 +3457053821 1 14 -13.85714286 -194 118 -101 0 -1 -122 +3473924576 1 19 20.78947368 395 123 -101 0 -1 101 +3521368277 1 23 1.260869565 29 123 -117 0 -1 15 +3542840110 1 22 16.68181818 367 125 -99 0 -1 -47 +3566741189 1 23 1.260869565 29 123 -117 0 -1 15 +3570297463 1 23 1.260869565 29 123 -117 0 -1 15 +3577318119 1 19 20.78947368 395 123 -101 0 -1 101 +3593959807 1 23 1.260869565 29 123 -117 0 -1 15 +3625286410 1 22 16.68181818 367 125 -99 0 -1 -47 +3717551163 1 22 8.363636364 184 122 -117 0 -1 -2 +3759340273 1 19 20.78947368 395 123 -101 0 -1 101 +3766999078 1 22 16.68181818 367 125 -99 0 -1 -47 +3862393166 1 19 20.78947368 395 123 -101 0 -1 101 +3959216334 1 19 20.78947368 395 123 -101 0 -1 101 +3998790955 1 19 20.78947368 395 123 -101 0 -1 101 +4015442341 1 22 16.68181818 367 125 -99 0 -1 -47 +4061635107 1 22 8.363636364 184 122 -117 0 -1 -2 +4076864659 1 22 16.68181818 367 125 -99 0 -1 -47 +4144173353 1 22 8.363636364 184 122 -117 0 -1 -2 +4216440507 1 22 16.68181818 367 125 -99 0 -1 -47 +4229654142 1 22 16.68181818 367 125 -99 0 -1 -47 +4268716378 1 14 -13.85714286 -194 118 -101 0 -1 -122 query IIIRIIIIII @@ -942,102 +942,102 @@ ORDER BY c9; 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 +145294611 3 3 17.33333333 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 +520189543 3 3 -17.33333333 -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 +559847112 3 3 -60.66666667 -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 +933879086 7 7 9.285714286 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 +1157161427 7 7 5.714285714 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 +1362369177 6 6 -11.66666667 -70 73 -101 0 -1 122 +1365198901 6 6 32.66666667 196 118 -59 0 -9 114 +1454057357 6 6 -22.66666667 -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 +1534194097 9 9 6.222222222 56 102 -111 0 -1 -6 +1538863055 7 7 -7.571428571 -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 +1842680163 7 7 -11.71428571 -82 70 -98 0 -1 92 +1865307672 11 11 7.545454545 83 102 -111 0 -1 97 +1995343206 9 9 -22.33333333 -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 +2214035726 11 11 -10.09090909 -111 77 -101 0 -1 39 +2293105904 11 11 2.272727273 25 113 -117 0 -1 113 +2306130875 13 13 14.07692308 183 102 -111 0 -1 3 +2307004493 7 7 36.85714286 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 +2496054700 9 9 16.88888889 152 118 -101 0 -1 44 +2502326480 14 14 9.214285714 129 102 -111 0 -1 -55 +2525744318 12 12 -2.916666667 -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 +2610290479 9 9 -0.5555555556 -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 +2705709344 13 13 2.153846154 28 113 -117 0 -1 -118 +2712615025 11 11 2.545454545 28 70 -98 0 -1 -116 +2778168728 15 15 5.066666667 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 +2830981072 12 12 12.33333333 148 120 -98 0 -1 -12 +2844041986 14 14 -2.285714286 -32 113 -117 0 -1 78 +2861376515 13 13 10.76923077 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 +3023531799 17 17 -7.058823529 -120 102 -117 0 -1 56 +3105312559 13 13 6.384615385 83 123 -101 0 -1 27 +3126475872 18 18 -6.388888889 -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 +3198969145 19 19 -2.157894737 -41 102 -117 0 -1 119 +3275293996 14 14 12.07142857 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 +3314983189 17 17 4.352941176 74 113 -117 0 -1 -50 +3342719438 11 11 -1.454545455 -16 118 -101 0 -1 40 +3373581039 12 12 -4.666666667 -56 118 -101 0 -1 -16 +3398507249 18 18 5.722222222 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 +3457053821 13 13 -7.692307692 -100 118 -101 0 -1 36 +3473924576 14 14 12.85714286 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 +3566741189 21 21 8.476190476 178 123 -117 0 -1 108 +3570297463 22 22 5.409090909 119 123 -117 0 -1 -87 +3577318119 15 15 18.93333333 284 123 -101 0 -1 18 +3593959807 23 23 1.260869565 29 123 -117 0 -1 15 +3625286410 17 17 11.58823529 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 +3766999078 18 18 16.66666667 300 125 -98 0 -1 84 +3862393166 17 17 23.17647059 394 123 -101 0 -1 -100 +3959216334 18 18 21.22222222 382 123 -101 0 -1 104 +3998790955 19 19 20.78947368 395 123 -101 0 -1 101 +4015442341 19 19 20.15789474 383 125 -98 0 -1 7 +4061635107 21 21 11.66666667 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 +4144173353 22 22 8.363636364 184 122 -117 0 -1 -2 +4216440507 21 21 14.0952381 296 125 -99 0 -1 -106 +4229654142 22 22 16.68181818 367 125 -99 0 -1 -47 +4268716378 14 14 -13.85714286 -194 118 -101 0 -1 -122 query IIIIIIIIII @@ -1167,106 +1167,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.6086956522 14 14 0.5909090909 +63044568 0.9545454545 21 19 0.9523809524 +141047417 0.7142857143 10 10 0.6923076923 +141680161 0.1363636364 3 3 0.09523809524 +145294611 0.5909090909 13 12 0.5714285714 +225513085 0.09090909091 2 2 0.04761904762 +243203849 0.05263157895 1 1 0 +326151275 0.652173913 15 15 0.6363636364 +431948861 0.4736842105 9 8 0.4444444444 +466439833 0.1304347826 3 3 0.09090909091 +473294098 0.7727272727 17 17 0.7619047619 +520189543 0.3181818182 7 7 0.2857142857 +538589788 0.7826086957 18 18 0.7727272727 +557517119 0.3043478261 7 7 0.2727272727 +559847112 0.1052631579 2 2 0.05555555556 +598822671 0.4090909091 9 8 0.380952381 +662099130 0.8571428571 12 12 0.8461538462 +754775609 0.5789473684 10 9 0.5 +774637006 0.1363636364 3 3 0.09523809524 +811650497 0.6956521739 16 16 0.6818181818 +879082834 0.7272727273 16 16 0.7142857143 +933879086 0.5652173913 13 13 0.5454545455 +974297360 0.9285714286 13 13 0.9230769231 +1000948272 0.8636363636 19 17 0.8571428571 +1013876852 0.5714285714 8 8 0.5384615385 +1088543984 0.7368421053 14 12 0.7222222222 +1098639440 0.5454545455 12 11 0.5238095238 +1157161427 0.09090909091 2 2 0.04761904762 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.08695652174 2 2 0.04545454545 +1289293657 0.6363636364 14 13 0.619047619 +1362369177 0.6315789474 12 10 0.6111111111 +1365198901 0.3571428571 5 5 0.3076923077 +1454057357 0.2272727273 5 5 0.1904761905 +1491205016 0.4545454545 10 9 0.4285714286 +1534194097 0.9565217391 22 22 0.9545454545 +1538863055 0.5789473684 10 9 0.5 +1787652631 0.4347826087 10 10 0.4090909091 +1824517658 0.1578947368 3 3 0.1111111111 +1842680163 0.6818181818 15 15 0.6666666667 +1865307672 0.7391304348 17 17 0.7272727273 +1995343206 0.2105263158 4 4 0.1666666667 +2013662838 0.7272727273 15 14 0.6666666667 +2042457019 0.9130434783 21 21 0.9090909091 +2093538928 0.7894736842 15 13 0.7777777778 +2125812933 0.6363636364 14 14 0.619047619 +2214035726 0.4210526316 7 7 0.3333333333 +2293105904 0.04545454545 1 1 0 +2306130875 0.4782608696 11 11 0.4545454545 +2307004493 0.7857142857 11 11 0.7692307692 +2424630722 0.6428571429 9 9 0.6153846154 +2496054700 0.07142857143 1 1 0 +2502326480 0.347826087 8 8 0.3181818182 +2525744318 0.2727272727 5 5 0.1904761905 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 +2610290479 0.5454545455 12 12 0.5238095238 +2669374863 0.4090909091 9 9 0.380952381 +2705709344 0.7727272727 17 15 0.7619047619 +2712615025 0.5909090909 13 13 0.5714285714 +2778168728 0.3913043478 9 9 0.3636363636 +2818832252 0.2173913043 5 5 0.1818181818 +2830981072 0.9545454545 21 21 0.9523809524 +2844041986 0.2727272727 5 5 0.1904761905 +2861376515 0.3636363636 8 8 0.3333333333 +2861911482 0.2142857143 3 3 0.1538461538 +2939920218 0.3636363636 8 7 0.3333333333 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 +3105312559 0.6842105263 13 11 0.6666666667 +3126475872 0.5217391304 12 12 0.5 +3188005828 0.9090909091 20 18 0.9047619048 +3198969145 0.8260869565 19 19 0.8181818182 +3275293996 0.5 11 11 0.4761904762 +3276123488 0.2727272727 6 6 0.2380952381 +3314983189 0.7272727273 15 14 0.6666666667 +3342719438 0.2857142857 4 4 0.2307692308 +3373581039 0.5 7 7 0.4615384615 +3398507249 0.5 11 10 0.4761904762 +3455216719 0.8181818182 18 16 0.8095238095 +3457053821 0.4285714286 6 6 0.3846153846 +3473924576 0.8421052632 16 14 0.8333333333 +3521368277 0.8695652174 20 20 0.8636363636 +3542840110 0.1818181818 4 4 0.1428571429 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.2608695652 6 6 0.2272727273 +3577318119 0.8947368421 17 15 0.8888888889 +3593959807 0.1739130435 4 4 0.1363636364 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.3181818182 7 6 0.2857142857 +3759340273 0.9473684211 18 16 0.9444444444 +3766999078 0.9090909091 20 20 0.9047619048 +3862393166 0.3157894737 6 6 0.2777777778 +3959216334 0.2631578947 5 5 0.2222222222 +3998790955 0.4210526316 7 7 0.3333333333 +4015442341 0.8636363636 19 19 0.8571428571 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.4545454545 10 10 0.4285714286 +4144173353 0.1818181818 4 4 0.1428571429 +4216440507 0.04545454545 1 1 0 +4229654142 0.8181818182 18 18 0.8095238095 +4268716378 0.1428571429 2 2 0.07692307692 query IIIIIII diff --git a/datafusion/sqllogictest/test_files/predicates.slt b/datafusion/sqllogictest/test_files/predicates.slt index 878d7c8a4dfbf..60217d3fad641 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.3914443657 +d 0.3887028098 # async fn csv_query_with_negative_predicate query TI @@ -720,7 +720,7 @@ OR ) GROUP BY p_partkey; ---- -63700 13309.6 0.1 1 +63700 13309.60 0.100000 1 query TT diff --git a/datafusion/sqllogictest/test_files/projection.slt b/datafusion/sqllogictest/test_files/projection.slt index b5bcb5b4c6f77..53de42a9ee127 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.4104070926 b +0.4860066927 e +0.4875451747 a +0.4885537939 d +0.6600456536 c # parallel projection query II diff --git a/datafusion/sqllogictest/test_files/scalar.slt b/datafusion/sqllogictest/test_files/scalar.slt index fe7d1a90c5bd4..db7ec13db942d 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.570796327 1.047197551 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.5235987756 1.570796327 # 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.9645397929 0.7853981634 # atan scalar nulls query R rowsort @@ -234,7 +234,7 @@ select round(atanh(a), 5), round(atanh(b), 5), round(atanh(c), 5) from small_flo query RRR rowsort select atan2(0, 1), atan2(1, 2), atan2(2, 2); ---- -0 0.4636476 0.7853982 +0 0.463648 0.785398 # atan2 scalar nulls query R rowsort @@ -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.5 0.00000000000000006123233996 # 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.543080635 3.762195691 10.067662 # 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.718281828 7.389056099 # exp scalar nulls query R rowsort @@ -397,7 +397,7 @@ NULL query RRR rowsort select round(exp(a), 5), round(exp(e), 5), round(exp(f), 5) from signed_integers; ---- -0.04979 0.00248 162754.79142 +0.04979 0.00248 162754.7914 0.36788 0.01832 22026.46579 54.59815 NULL NULL 7.38906 148.41316 0.00002 @@ -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.098612289 # 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.5849625007 -0.1760912591 # log scalar ops with zero edgecases # please see https://github.com/apache/datafusion/pull/5245#issuecomment-1426828382 @@ -523,7 +523,7 @@ query RRR rowsort select log(a, 64) a, log(b), log(10, b) from unsigned_integers; ---- 3 NULL NULL -3.7855785 4 4 +3.78558 4 4 6 3 3 Infinity 2 2 @@ -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.3010299957 NaN +0.6020599913 NULL NaN 2 NaN 4 @@ -563,8 +563,8 @@ select log(2,arrow_cast(a, 'Float64')), log(4,arrow_cast(b, 'Float32')) from sig ---- 1 NaN 2 NULL -NaN 3.321928 -NaN 6.643856 +NaN 3.32193 +NaN 6.64386 ## log10 @@ -585,7 +585,7 @@ NULL query R rowsort select log10(2.0/3); ---- --0.176091259056 +-0.1760912591 # 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.5849625007 # 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.141592654 1.570796327 1.047197551 ## 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.570796327 3.141592654 # radians scalar nulls query R rowsort @@ -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.8660254038 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.175201194 3.626860408 10.01787493 # sinh scalar nulls query R rowsort @@ -916,13 +916,13 @@ NaN 100 NaN query RR rowsort select sqrt(1.4), sqrt(2.0/3); ---- -1.18321595662 0.816496580928 +1.183215957 0.8164965809 # sqrt scalar cast query R rowsort select sqrt(cast(10e8 as double)); ---- -31622.776601683792 +31622.7766 # sqrt scalar negative @@ -937,7 +937,7 @@ NaN query RRR rowsort select tan(0), tan(pi() / 6), tan(pi() / 4); ---- -0 0.57735026919 1 +0 0.5773502692 1 # 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.761594156 0.9640275801 0.9950547537 # tanh scalar nulls query R rowsort @@ -1360,27 +1360,27 @@ 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.9818650561 # csv query cbrt cbrt query R SELECT cbrt(cbrt(c12)) FROM aggregate_test_100 LIMIT 1 ---- -0.991899036678 +0.9918990367 # csv query cast query R rowsort SELECT CAST(c12 AS float) FROM aggregate_test_100 WHERE c12 > 0.376 AND c12 < 0.4 ---- -0.3887028 -0.39144436 +0.388703 +0.391444 # csv query cast literal 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.311471254 1 +0.9294097332 1 statement ok drop table aggregate_test_100 @@ -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 -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222 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..5ce6f8ef57c78 100644 --- a/datafusion/sqllogictest/test_files/select.slt +++ b/datafusion/sqllogictest/test_files/select.slt @@ -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.00001000000075 +0.00002000000149 +0.00003000000224 +0.00004000000299 +0.00005000000374 # select distinct from query BBBBBBBB diff --git a/datafusion/sqllogictest/test_files/topk.slt b/datafusion/sqllogictest/test_files/topk.slt index 1dbce79e0f1a6..574e876f01638 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.745987 0.02182578039 ydkwycaISlYSlEq3TlkS2m15I2pcp8 +d 1 -98 13630 -1991133944 1184110014998006843 220 2986 225513085 9634106610243643486 0.896519 0.1640882545 y7C453hRWd4E7ImjNDWlpexB8nUqjh +e 2 52 -12056 -1090239422 9011500141803970147 238 4168 2013662838 12565360638488684051 0.669477 0.3914443657 xipQ93429ksjNcXPX5326VSg1xJZcW +d 1 -72 25590 1188089983 3090286296481837049 241 832 3542840110 5885937420286765261 0.419806 0.2153540234 wwXqSGKLyBQyPkonlzBNYUJTCo4LRS +a 1 -5 12636 794623392 2909750622865366631 15 24022 2669374863 4776679784701509574 0.298778 0.2537253408 waIGbOGl1PM6gnzZ4uuZt4E2yDWRHs @@ -208,11 +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.745987 0.02182578039 ydkwycaISlYSlEq3TlkS2m15I2pcp8 +d 1 -98 13630 -1991133944 1184110014998006843 220 2986 225513085 9634106610243643486 0.896519 0.1640882545 y7C453hRWd4E7ImjNDWlpexB8nUqjh +e 2 52 -12056 -1090239422 9011500141803970147 238 4168 2013662838 12565360638488684051 0.669477 0.3914443657 xipQ93429ksjNcXPX5326VSg1xJZcW +d 1 -72 25590 1188089983 3090286296481837049 241 832 3542840110 5885937420286765261 0.419806 0.2153540234 wwXqSGKLyBQyPkonlzBNYUJTCo4LRS +a 1 -5 12636 794623392 2909750622865366631 15 24022 2669374863 4776679784701509574 0.298778 0.2537253408 waIGbOGl1PM6gnzZ4uuZt4E2yDWRHs ## make an example for dictionary encoding diff --git a/datafusion/sqllogictest/test_files/window.slt b/datafusion/sqllogictest/test_files/window.slt index 188e2ae0915fc..f07f45182d4ae 100644 --- a/datafusion/sqllogictest/test_files/window.slt +++ b/datafusion/sqllogictest/test_files/window.slt @@ -111,8 +111,8 @@ limit 5 ---- 28774375 61035129 61035129 1 61035129 61035129 61035129 61035129 NULL 63044568 -47938237 -23969118.5 2 61035129 -108973366 61035129 -108973366 -108973366 -141047417 575165281 191721760.33333334 3 623103518 -108973366 61035129 623103518 -108973366 -141680161 -1352462829 -338115707.25 4 623103518 -1927628110 61035129 -1927628110 -108973366 +141047417 575165281 191721760.3 3 623103518 -108973366 61035129 623103518 -108973366 +141680161 -1352462829 -338115707.3 4 623103518 -1927628110 61035129 -1927628110 -108973366 145294611 -3251637940 -650327588 5 623103518 -1927628110 61035129 -1899175111 -108973366 # csv_query_window_with_partition_by_order_by @@ -449,11 +449,11 @@ FROM aggregate_test_100 ORDER BY c9 LIMIT 5 ---- --48302 -16100.666666666666 3 -11243 3747.666666666666 3 --51311 -17103.666666666668 3 +-48302 -16100.66667 3 +11243 3747.666667 3 +-51311 -17103.66667 3 -2391 -797 3 -46756 15585.333333333334 3 +46756 15585.33333 3 # window_frame_rows_preceding_stddev_variance @@ -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.33333 31147.55556 216.1511817 176.4867008 +2639429.333 1759619.556 1624.632061 1326.506523 +746202.3333 497468.2222 863.8300373 705.314272 +768423 512282 876.597399 715.7387792 +66526.33333 44350.88889 257.9269923 210.5965073 # window_frame_rows_preceding_with_partition_unique_order_by query IRI @@ -487,7 +487,7 @@ LIMIT 5 17547 8773.5 2 -1301 -650.5 2 26638 13319 3 -26861 8953.666666666666 3 +26861 8953.666667 3 # /// The partition by clause conducts sorting according to given partition column by default. If the # /// sorting columns have non unique values, the unstable sorting may produce indeterminate results. @@ -886,11 +886,11 @@ SELECT ORDER BY C9 LIMIT 5 ---- -2.547670180363 -10.629941254821 -2.547670180363 -20.349518503437 -21.408674363508 +2.54767018 +10.62994125 +2.54767018 +20.3495185 +21.40867436 #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.797979798 0.797979798 +63044568 62 62 4 4 0.6161616162 0.6161616162 141047417 1 1 1 1 0 0 -141680161 41 41 3 3 0.40404040404 0.40404040404 +141680161 41 41 3 3 0.404040404 0.404040404 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.561269874 18.03618343 +6.808931569 10.23844867 +2.994840293 NULL +9.674390599 NULL +7.72806622 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.333333333 3 +16 6 1 1 10 5 3 2 5.333333333 3 +51 16 1 1 20 10 5 3 10.2 5.333333333 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.8506721053 0.8506721053 +-117 0.9706712283 0.9706712283 +-111 0.152498293 0.152498293 +-107 0.369363046 0.369363046 +-106 0.5653528422 0.5653528422 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.8506721053 0.01479305308 +-117 0.9706712283 0.01479305308 +-111 0.152498293 0.01479305308 +-107 0.369363046 0.01479305308 +-106 0.5653528422 0.01479305308 query TT EXPLAIN SELECT @@ -5054,7 +5054,7 @@ select b, row_number() over (order by a) from (select TRUE as a, 1 as b); 1 1 # test window functions on boolean columns -query T +statement count 0 create table t1 (id int, bool_col boolean) as values (1, true), (2, false), @@ -5098,8 +5098,8 @@ select percent_rank() over (order by bool_col) from t1; ---- 0 0 -0.666666666667 -0.666666666667 +0.6666666667 +0.6666666667 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.6666666667 2 1 1 1 0.5 0 1 -4 3 2 1 0.666666666667 2 +4 3 2 1 0.6666666667 2 2 1 1 0.5 0 1 statement ok