Skip to content

Commit

Permalink
Internal duckdb#2186: Nanosecond Formatting
Browse files Browse the repository at this point in the history
Fix test_all_types tests.
  • Loading branch information
hawkfish committed Jun 3, 2024
1 parent 115898f commit e4f6888
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion test/sql/copy/parquet/writer/parquet_test_all_types.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ COPY all_types TO "__TEST_DIR__/all_types.parquet" (FORMAT PARQUET);
# we have to make some replacements to get result equivalence
# hugeint/uhugeint is stored as double -> we have to cast
# TIME WITH TIME ZONE loses the offset
# TIMESTAMP_NS loses precision
query I nosort alltypes
SELECT * REPLACE (
hugeint::DOUBLE AS hugeint,
uhugeint::DOUBLE AS uhugeint,
time_tz::TIME::TIMETZ AS time_tz
time_tz::TIME::TIMETZ AS time_tz,
timestamp_ns::TIMESTAMP AS timestamp_ns
)
FROM all_types
----
Expand Down
4 changes: 2 additions & 2 deletions test/sql/types/test_all_types.test_slow
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ PRAGMA enable_verification
query IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
SELECT * FROM test_all_types();
----
False -128 -32768 -2147483648 -9223372036854775808 -170141183460469231731687303715884105728 0 0 0 0 0 5877642-06-25 (BC) 00:00:00 290309-12-22 (BC) 00:00:00 290309-12-22 (BC) 00:00:00 290309-12-22 (BC) 00:00:00 1677-09-21 00:12:43.145225 00:00:00+15:59:59 290309-12-22 (BC) 00:00:00+00 -340282346638528859811704183484516925440.000000 -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -999.9 -99999.9999 -999999999999.999999 -9999999999999999999999999999.9999999999 00000000-0000-0000-0000-000000000000 00:00:00 🦆🦆🦆🦆🦆🦆 thisisalongblob\x00withnullbytes 0010001001011100010101011010111 DUCK_DUCK_ENUM enum_0 enum_0 [] [] [] [] [] [] [] {'a': NULL, 'b': NULL} {'a': NULL, 'b': NULL} [] {} Frank [NULL, 2, 3] [a, NULL, c] [[NULL, 2, 3], NULL, [NULL, 2, 3]] [[a, NULL, c], NULL, [a, NULL, c]] [{'a': NULL, 'b': NULL}, {'a': 42, 'b': 🦆🦆🦆🦆🦆🦆}, {'a': NULL, 'b': NULL}] {'a': [NULL, 2, 3], 'b': [a, NULL, c]} [[], [42, 999, NULL, NULL, -42], []] [[NULL, 2, 3], [4, 5, 6], [NULL, 2, 3]]
True 127 32767 2147483647 9223372036854775807 170141183460469231731687303715884105727 340282366920938463463374607431768211455 255 65535 4294967295 18446744073709551615 5881580-07-10 24:00:00 294247-01-10 04:00:54.775806 294247-01-10 04:00:54 294247-01-10 04:00:54.775 2262-04-11 23:47:16.854775 24:00:00-15:59:59 294247-01-10 04:00:54.775806+00 340282346638528859811704183484516925440.000000 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 999.9 99999.9999 999999999999.999999 9999999999999999999999999999.9999999999 ffffffff-ffff-ffff-ffff-ffffffffffff 83 years 3 months 999 days 00:16:39.999999 goo\0se \x00\x00\x00a 10101 GOOSE enum_299 enum_69999 [42, 999, NULL, NULL, -42] [42.0, nan, inf, -inf, NULL, -42.0] [1970-01-01, infinity, -infinity, NULL, 2022-05-12] [1970-01-01 00:00:00, infinity, -infinity, NULL, 2022-05-12 16:23:45] [1970-01-01 00:00:00+00, infinity, -infinity, NULL, 2022-05-12 23:23:45+00] [🦆🦆🦆🦆🦆🦆, goose, NULL, ] [[], [42, 999, NULL, NULL, -42], NULL, [], [42, 999, NULL, NULL, -42]] {'a': 42, 'b': 🦆🦆🦆🦆🦆🦆} {'a': [42, 999, NULL, NULL, -42], 'b': [🦆🦆🦆🦆🦆🦆, goose, NULL, ]} [{'a': NULL, 'b': NULL}, {'a': 42, 'b': 🦆🦆🦆🦆🦆🦆}, NULL] {key1=🦆🦆🦆🦆🦆🦆, key2=goose} 5 [4, 5, 6] [d, e, f] [[4, 5, 6], [NULL, 2, 3], [4, 5, 6]] [[d, e, f], [a, NULL, c], [d, e, f]] [{'a': 42, 'b': 🦆🦆🦆🦆🦆🦆}, {'a': NULL, 'b': NULL}, {'a': 42, 'b': 🦆🦆🦆🦆🦆🦆}] {'a': [4, 5, 6], 'b': [d, e, f]} [[42, 999, NULL, NULL, -42], [], [42, 999, NULL, NULL, -42]] [[4, 5, 6], [NULL, 2, 3], [4, 5, 6]]
False -128 -32768 -2147483648 -9223372036854775808 -170141183460469231731687303715884105728 0 0 0 0 0 5877642-06-25 (BC) 00:00:00 290309-12-22 (BC) 00:00:00 290309-12-22 (BC) 00:00:00 290309-12-22 (BC) 00:00:00 1677-09-21 00:12:43.145225192 00:00:00+15:59:59 290309-12-22 (BC) 00:00:00+00 -340282346638528859811704183484516925440.000000 -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -999.9 -99999.9999 -999999999999.999999 -9999999999999999999999999999.9999999999 00000000-0000-0000-0000-000000000000 00:00:00 🦆🦆🦆🦆🦆🦆 thisisalongblob\x00withnullbytes 0010001001011100010101011010111 DUCK_DUCK_ENUM enum_0 enum_0 [] [] [] [] [] [] [] {'a': NULL, 'b': NULL} {'a': NULL, 'b': NULL} [] {} Frank [NULL, 2, 3] [a, NULL, c] [[NULL, 2, 3], NULL, [NULL, 2, 3]] [[a, NULL, c], NULL, [a, NULL, c]] [{'a': NULL, 'b': NULL}, {'a': 42, 'b': 🦆🦆🦆🦆🦆🦆}, {'a': NULL, 'b': NULL}] {'a': [NULL, 2, 3], 'b': [a, NULL, c]} [[], [42, 999, NULL, NULL, -42], []] [[NULL, 2, 3], [4, 5, 6], [NULL, 2, 3]]
True 127 32767 2147483647 9223372036854775807 170141183460469231731687303715884105727 340282366920938463463374607431768211455 255 65535 4294967295 18446744073709551615 5881580-07-10 24:00:00 294247-01-10 04:00:54.775806 294247-01-10 04:00:54 294247-01-10 04:00:54.775 2262-04-11 23:47:16.854775806 24:00:00-15:59:59 294247-01-10 04:00:54.775806+00 340282346638528859811704183484516925440.000000 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 999.9 99999.9999 999999999999.999999 9999999999999999999999999999.9999999999 ffffffff-ffff-ffff-ffff-ffffffffffff 83 years 3 months 999 days 00:16:39.999999 goo\0se \x00\x00\x00a 10101 GOOSE enum_299 enum_69999 [42, 999, NULL, NULL, -42] [42.0, nan, inf, -inf, NULL, -42.0] [1970-01-01, infinity, -infinity, NULL, 2022-05-12] [1970-01-01 00:00:00, infinity, -infinity, NULL, 2022-05-12 16:23:45] [1970-01-01 00:00:00+00, infinity, -infinity, NULL, 2022-05-12 23:23:45+00] [🦆🦆🦆🦆🦆🦆, goose, NULL, ] [[], [42, 999, NULL, NULL, -42], NULL, [], [42, 999, NULL, NULL, -42]] {'a': 42, 'b': 🦆🦆🦆🦆🦆🦆} {'a': [42, 999, NULL, NULL, -42], 'b': [🦆🦆🦆🦆🦆🦆, goose, NULL, ]} [{'a': NULL, 'b': NULL}, {'a': 42, 'b': 🦆🦆🦆🦆🦆🦆}, NULL] {key1=🦆🦆🦆🦆🦆🦆, key2=goose} 5 [4, 5, 6] [d, e, f] [[4, 5, 6], [NULL, 2, 3], [4, 5, 6]] [[d, e, f], [a, NULL, c], [d, e, f]] [{'a': 42, 'b': 🦆🦆🦆🦆🦆🦆}, {'a': NULL, 'b': NULL}, {'a': 42, 'b': 🦆🦆🦆🦆🦆🦆}] {'a': [4, 5, 6], 'b': [d, e, f]} [[42, 999, NULL, NULL, -42], [], [42, 999, NULL, NULL, -42]] [[4, 5, 6], [NULL, 2, 3], [4, 5, 6]]
NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL

statement ok
Expand Down

0 comments on commit e4f6888

Please sign in to comment.