Skip to content

Commit

Permalink
test: check record count and types in parquet window test (apache#12277)
Browse files Browse the repository at this point in the history
* test: check record count and types in paqruet window test

* Review suggestions

Co-authored-by: Andrew Lamb <[email protected]>

---------

Co-authored-by: Andrew Lamb <[email protected]>
  • Loading branch information
2 people authored and joroKr21 committed Sep 6, 2024
1 parent 33001b3 commit 30458f2
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions datafusion/sqllogictest/test_files/parquet.slt
Original file line number Diff line number Diff line change
Expand Up @@ -251,25 +251,21 @@ SELECT COUNT(*) FROM timestamp_with_tz;
----
131072

# Perform the query:
query IPT
SELECT
count,
LAG(timestamp, 1) OVER (ORDER BY timestamp),
arrow_typeof(LAG(timestamp, 1) OVER (ORDER BY timestamp))
FROM timestamp_with_tz
LIMIT 10;
# Ensure that output timestamp columns preserve the timezone from the input
# and output record count will match input file record count
query TPI
SELECT arrow_typeof(lag_timestamp),
MIN(lag_timestamp),
COUNT(1)
FROM (
SELECT
count,
LAG(timestamp, 1) OVER (ORDER BY timestamp) AS lag_timestamp
FROM timestamp_with_tz
) t
GROUP BY 1
----
0 NULL Timestamp(Millisecond, Some("UTC"))
0 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC"))
0 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC"))
4 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC"))
0 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC"))
0 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC"))
0 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC"))
14 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC"))
0 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC"))
0 2014-08-27T14:00:00Z Timestamp(Millisecond, Some("UTC"))
Timestamp(Millisecond, Some("UTC")) 2014-08-27T14:00:00Z 131072

# Test config listing_table_ignore_subdirectory:

Expand Down

0 comments on commit 30458f2

Please sign in to comment.