This is an automated email from the ASF dual-hosted git repository.

korowa pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 6bceeae6c6 test: check record count and types in parquet window test 
(#12277)
6bceeae6c6 is described below

commit 6bceeae6c622485c8cfaae34eb60152f5c7cbe01
Author: Eduard Karacharov <[email protected]>
AuthorDate: Tue Sep 3 20:03:24 2024 +0300

    test: check record count and types in parquet window test (#12277)
    
    * 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]>
---
 datafusion/sqllogictest/test_files/parquet.slt | 32 +++++++++++---------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/datafusion/sqllogictest/test_files/parquet.slt 
b/datafusion/sqllogictest/test_files/parquet.slt
index 34d4ed6ff2..9a7b085312 100644
--- a/datafusion/sqllogictest/test_files/parquet.slt
+++ b/datafusion/sqllogictest/test_files/parquet.slt
@@ -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:
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to