Skip to content

Commit

Permalink
wildcard projection test for csv partitioned table
Browse files Browse the repository at this point in the history
  • Loading branch information
korowa committed Mar 2, 2024
1 parent 462255b commit a46e0b9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions datafusion/sqllogictest/test_files/ddl.slt
Original file line number Diff line number Diff line change
Expand Up @@ -490,20 +490,28 @@ DROP TABLE csv_with_timestamps

statement ok
CREATE EXTERNAL TABLE csv_with_timestamps (
name VARCHAR,
ts TIMESTAMP,
c_date DATE,
name VARCHAR,
ts TIMESTAMP
)
STORED AS CSV
PARTITIONED BY (c_date)
LOCATION '../core/tests/data/partitioned_table';

# select wildcard always returns partition columns as the last ones
query TPD
SELECT * from csv_with_timestamps where c_date='2018-11-13'
----
Jorge 2018-12-13T12:12:10.011 2018-11-13
Andrew 2018-11-13T17:11:10.011 2018-11-13

# select all fields explicitly
query DTP
SELECT c_date, name, ts from csv_with_timestamps where c_date='2018-11-13'
----
2018-11-13 Jorge 2018-12-13T12:12:10.011
2018-11-13 Andrew 2018-11-13T17:11:10.011

statement ok
DROP TABLE csv_with_timestamps

Expand Down

0 comments on commit a46e0b9

Please sign in to comment.