Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update tests
  • Loading branch information
alamb committed Jan 30, 2025
commit 412e2efdf0264cd116f44a3b3dee361801175d18
12 changes: 12 additions & 0 deletions datafusion/sqllogictest/test_files/string/dictionary_utf8.slt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ statement ok
create table test_substr as
select arrow_cast(col1, 'Dictionary(Int32, Utf8)') as c1 from test_substr_base;

statement ok
create table test_datetime as
select
arrow_cast(column1, 'Dictionary(Int32, Utf8)') as ts,
arrow_cast(column2, 'Dictionary(Int32, Utf8)') as d,
arrow_cast(column3, 'Dictionary(Int32, Utf8)') as t
from test_datetime_base;


statement ok
drop table test_source

Expand All @@ -56,3 +65,6 @@ drop table test_basic_operator;

statement ok
drop table test_substr_base;

statement ok
drop table test_datetime_base;
11 changes: 11 additions & 0 deletions datafusion/sqllogictest/test_files/string/init_data.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,14 @@ statement ok
create table test_substr_base (
col1 VARCHAR
) as values ('foo'), ('hello🌏世界'), ('💩'), ('ThisIsAVeryLongASCIIString'), (''), (NULL);


# --------------------------------------
# Setup test tables with date/time values to test coercion
# --------------------------------------
statement ok
create table test_datetime_base as values
('2024-08-09T12:13:14', '2024-08-09', '12:13:14'),
('2024-08-09T12:13:15', '2024-09-09', '12:14:14'),
(NULL, NULL, NULL)
;
10 changes: 10 additions & 0 deletions datafusion/sqllogictest/test_files/string/string.slt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ statement ok
create table test_substr as
select arrow_cast(col1, 'Utf8') as c1 from test_substr_base;

statement ok
create table test_datetime as
select
arrow_cast(column1, 'Utf8') as ts,
arrow_cast(column2, 'Utf8') as d,
arrow_cast(column3, 'Utf8') as t
from test_datetime_base;


#
Expand Down Expand Up @@ -186,3 +193,6 @@ drop table test_basic_operator;

statement ok
drop table test_substr;

statement ok
drop table test_datetime;
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ true true
NULL NULL
NULL NULL

# Coercion to date/time
query BBB
select ts = '2024-08-09T12:13:14'::timestamp, d = '2024-08-08'::date, t = '12:13:14'::time from test_datetime;
----
true false true
false false false
NULL NULL NULL

# --------------------------------------
# column comparison as filters
# --------------------------------------
Expand Down