Skip to content

Commit

Permalink
fix slt
Browse files Browse the repository at this point in the history
Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia committed Jun 4, 2024
1 parent eb65e18 commit d13a9fe
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion datafusion/sqllogictest/test_files/arrow_typeof.slt
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ select arrow_cast(timestamp '2000-01-01T00:00:00Z', 'Timestamp(Nanosecond, Some(
----
2000-01-01T00:00:00+08:00

statement error DataFusion error: Arrow error: Parser error: Invalid timezone "\+25:00": '\+25:00' is not a valid timezone
statement error DataFusion error: Arrow error: Parser error: Invalid timezone "\+25:00": failed to parse timezone
select arrow_cast(timestamp '2000-01-01T00:00:00', 'Timestamp(Nanosecond, Some( "+25:00" ))');


Expand Down
2 changes: 1 addition & 1 deletion datafusion/sqllogictest/test_files/expr.slt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ SELECT
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

# test_array_cast_invalid_timezone_will_panic
statement error Parser error: Invalid timezone "Foo": 'Foo' is not a valid timezone
statement error Parser error: Invalid timezone "Foo": failed to parse timezone
SELECT arrow_cast('2021-01-02T03:04:00', 'Timestamp(Nanosecond, Some("Foo"))')

# test_array_index
Expand Down
8 changes: 4 additions & 4 deletions datafusion/sqllogictest/test_files/group_by.slt
Original file line number Diff line number Diff line change
Expand Up @@ -4226,7 +4226,7 @@ logical_plan
01)Limit: skip=0, fetch=5
02)--Sort: time_chunks DESC NULLS FIRST, fetch=5
03)----Projection: date_bin(Utf8("15 minutes"),unbounded_csv_with_timestamps.ts) AS time_chunks
04)------Aggregate: groupBy=[[date_bin(IntervalMonthDayNano("900000000000"), unbounded_csv_with_timestamps.ts) AS date_bin(Utf8("15 minutes"),unbounded_csv_with_timestamps.ts)]], aggr=[[]]
04)------Aggregate: groupBy=[[date_bin(IntervalMonthDayNano("IntervalMonthDayNano { months: 0, days: 0, nanoseconds: 900000000000 }"), unbounded_csv_with_timestamps.ts) AS date_bin(Utf8("15 minutes"),unbounded_csv_with_timestamps.ts)]], aggr=[[]]
05)--------TableScan: unbounded_csv_with_timestamps projection=[ts]
physical_plan
01)GlobalLimitExec: skip=0, fetch=5
Expand All @@ -4235,7 +4235,7 @@ physical_plan
04)------AggregateExec: mode=FinalPartitioned, gby=[date_bin(Utf8("15 minutes"),unbounded_csv_with_timestamps.ts)@0 as date_bin(Utf8("15 minutes"),unbounded_csv_with_timestamps.ts)], aggr=[], ordering_mode=Sorted
05)--------CoalesceBatchesExec: target_batch_size=2
06)----------RepartitionExec: partitioning=Hash([date_bin(Utf8("15 minutes"),unbounded_csv_with_timestamps.ts)@0], 8), input_partitions=8, preserve_order=true, sort_exprs=date_bin(Utf8("15 minutes"),unbounded_csv_with_timestamps.ts)@0 DESC
07)------------AggregateExec: mode=Partial, gby=[date_bin(900000000000, ts@0) as date_bin(Utf8("15 minutes"),unbounded_csv_with_timestamps.ts)], aggr=[], ordering_mode=Sorted
07)------------AggregateExec: mode=Partial, gby=[date_bin(IntervalMonthDayNano { months: 0, days: 0, nanoseconds: 900000000000 }, ts@0) as date_bin(Utf8("15 minutes"),unbounded_csv_with_timestamps.ts)], aggr=[], ordering_mode=Sorted
08)--------------RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=1
09)----------------StreamingTableExec: partition_sizes=1, projection=[ts], infinite_source=true, output_ordering=[ts@0 DESC]

Expand Down Expand Up @@ -4328,12 +4328,12 @@ EXPLAIN SELECT name, date_bin('15 minutes', ts) as time_chunks
logical_plan
01)Limit: skip=0, fetch=5
02)--Sort: unbounded_csv_with_timestamps2.name DESC NULLS FIRST, time_chunks DESC NULLS FIRST, fetch=5
03)----Projection: unbounded_csv_with_timestamps2.name, date_bin(IntervalMonthDayNano("900000000000"), unbounded_csv_with_timestamps2.ts) AS time_chunks
03)----Projection: unbounded_csv_with_timestamps2.name, date_bin(IntervalMonthDayNano("IntervalMonthDayNano { months: 0, days: 0, nanoseconds: 900000000000 }"), unbounded_csv_with_timestamps2.ts) AS time_chunks
04)------TableScan: unbounded_csv_with_timestamps2 projection=[name, ts]
physical_plan
01)GlobalLimitExec: skip=0, fetch=5
02)--SortPreservingMergeExec: [name@0 DESC,time_chunks@1 DESC], fetch=5
03)----ProjectionExec: expr=[name@0 as name, date_bin(900000000000, ts@1) as time_chunks]
03)----ProjectionExec: expr=[name@0 as name, date_bin(IntervalMonthDayNano { months: 0, days: 0, nanoseconds: 900000000000 }, ts@1) as time_chunks]
04)------RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=1
05)--------StreamingTableExec: partition_sizes=1, projection=[name, ts], infinite_source=true, output_ordering=[name@0 DESC, ts@1 DESC]

Expand Down
4 changes: 2 additions & 2 deletions datafusion/sqllogictest/test_files/order.slt
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,11 @@ ORDER BY db15;
----
logical_plan
01)Sort: db15 ASC NULLS LAST
02)--Projection: date_bin(IntervalMonthDayNano("900000000000"), csv_with_timestamps.ts, TimestampNanosecond(1659537600000000000, None)) AS db15
02)--Projection: date_bin(IntervalMonthDayNano("IntervalMonthDayNano { months: 0, days: 0, nanoseconds: 900000000000 }"), csv_with_timestamps.ts, TimestampNanosecond(1659537600000000000, None)) AS db15
03)----TableScan: csv_with_timestamps projection=[ts]
physical_plan
01)SortPreservingMergeExec: [db15@0 ASC NULLS LAST]
02)--ProjectionExec: expr=[date_bin(900000000000, ts@0, 1659537600000000000) as db15]
02)--ProjectionExec: expr=[date_bin(IntervalMonthDayNano { months: 0, days: 0, nanoseconds: 900000000000 }, ts@0, 1659537600000000000) as db15]
03)----RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1
04)------CsvExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/timestamps.csv]]}, projection=[ts], output_ordering=[ts@0 ASC NULLS LAST], has_header=false

Expand Down
8 changes: 4 additions & 4 deletions datafusion/sqllogictest/test_files/set_variable.slt
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,19 @@ set datafusion.catalog.information_schema = true
statement ok
SET TIME ZONE = '+08:00:00'

statement error Arrow error: Parser error: Invalid timezone "\+08:00:00": '\+08:00:00' is not a valid timezone
statement error Arrow error: Parser error: Invalid timezone "\+08:00:00": failed to parse timezone
SELECT '2000-01-01T00:00:00'::TIMESTAMP::TIMESTAMPTZ

statement ok
SET TIME ZONE = '08:00'

statement error Arrow error: Parser error: Invalid timezone "08:00": '08:00' is not a valid timezone
statement error Arrow error: Parser error: Invalid timezone "08:00": failed to parse timezone
SELECT '2000-01-01T00:00:00'::TIMESTAMP::TIMESTAMPTZ

statement ok
SET TIME ZONE = '08'

statement error Arrow error: Parser error: Invalid timezone "08": '08' is not a valid timezone
statement error Arrow error: Parser error: Invalid timezone "08": failed to parse timezone
SELECT '2000-01-01T00:00:00'::TIMESTAMP::TIMESTAMPTZ

statement ok
Expand All @@ -242,5 +242,5 @@ SELECT '2000-01-01T00:00:00'::TIMESTAMP::TIMESTAMPTZ
statement ok
SET TIME ZONE = 'Asia/Taipei2'

statement error Arrow error: Parser error: Invalid timezone "Asia/Taipei2": 'Asia/Taipei2' is not a valid timezone
statement error Arrow error: Parser error: Invalid timezone "Asia/Taipei2": failed to parse timezone
SELECT '2000-01-01T00:00:00'::TIMESTAMP::TIMESTAMPTZ
2 changes: 1 addition & 1 deletion datafusion/sqllogictest/test_files/timestamps.slt
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ query error Cannot cast string '24:01:02' to value of Time64\(Nanosecond\) type
SELECT TIME '24:01:02' as time;

# invalid timezone
query error Arrow error: Parser error: Invalid timezone "ZZ": 'ZZ' is not a valid timezone
query error Arrow error: Parser error: Invalid timezone "ZZ": failed to parse timezone
SELECT TIMESTAMP '2023-12-05T21:58:10.45ZZ';

statement ok
Expand Down

0 comments on commit d13a9fe

Please sign in to comment.