alamb commented on code in PR #12951:
URL: https://github.com/apache/datafusion/pull/12951#discussion_r1803227352


##########
datafusion/sqllogictest/test_files/metadata.slt:
##########
@@ -125,5 +125,21 @@ NULL NULL l_bar
 
 
 
+query P rowsort
+SELECT ts
+FROM ((
+    SELECT now() AS ts
+    FROM table_with_metadata
+) UNION ALL (
+        SELECT ts
+    FROM table_with_metadata
+))
+GROUP BY ts
+ORDER BY ts
+LIMIT 1;

Review Comment:
   I verified that without the code in this PR, this test fails like this:
   
   ```
   External error: query failed: DataFusion error: Schema error: No field named 
ts. Valid fields are table_with_metadata.id, table_with_metadata.name, 
table_with_metadata.l_name.
   [SQL] SELECT ts
   FROM ((
       SELECT now() AS ts
       FROM table_with_metadata
   ) UNION ALL (
           SELECT ts
       FROM table_with_metadata
   ))
   GROUP BY ts
   ORDER BY ts
   LIMIT 1;
   at test_files/metadata.slt:128
   ```



-- 
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