parthchandra commented on code in PR #4951:
URL: https://github.com/apache/datafusion-comet/pull/4951#discussion_r3648457669


##########
spark/src/test/resources/sql-tests/expressions/datetime/make_time_sort.sql:
##########
@@ -0,0 +1,81 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+-- MinSparkVersion: 4.1
+-- Config: spark.sql.timeType.enabled=true
+
+statement
+CREATE TABLE test_make_time_sort(id int, hours int, minutes int, secs 
decimal(16,6)) USING parquet
+
+statement
+INSERT INTO test_make_time_sort VALUES
+    (1, 12, 30, 45.123456),
+    (2, 0, 0, 0.000000),
+    (3, 23, 59, 59.999999),
+    (4, 1, 2, 3.500000),
+    (5, 0, 0, 0.000001),
+    (6, NULL, NULL, NULL),
+    (7, 0, 0, 0.000000)
+
+query
+SELECT id, t
+FROM (
+    SELECT id, make_time(hours, minutes, secs) AS t
+    FROM test_make_time_sort
+)
+SORT BY t ASC NULLS FIRST
+
+query
+SELECT id, t
+FROM (
+    SELECT id, make_time(hours, minutes, secs) AS t
+    FROM test_make_time_sort
+)
+SORT BY t DESC NULLS LAST
+
+query
+SELECT id, t
+FROM (
+    SELECT id, make_time(hours, minutes, secs) AS t
+    FROM test_make_time_sort
+)
+SORT BY t ASC NULLS LAST
+
+query
+SELECT id, t
+FROM (
+    SELECT id, make_time(hours, minutes, secs) AS t
+    FROM test_make_time_sort
+)
+SORT BY t DESC NULLS FIRST
+
+query
+SELECT id, t
+FROM (
+    SELECT id, make_time(hours, minutes, secs) AS t
+    FROM test_make_time_sort
+)
+SORT BY t ASC NULLS LAST, id DESC
+
+query

Review Comment:
   Optional: a test like - 
   ```
   query
     SELECT id, t
     FROM (
         SELECT id, make_time(hours, minutes, secs) AS t
         FROM test_make_time_sort
     )
     ORDER BY t ASC NULLS FIRST
     LIMIT 3
   ```
   would be an additional check for `supportedScalarSortElementType` but 
reached via a different path.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to