kosiew commented on code in PR #26895:
URL: https://github.com/apache/datafusion/pull/26895#discussion_r4599355634


##########
datafusion/sqllogictest/test_files/metadata.slt:
##########
@@ -687,6 +691,224 @@ NULL
 l_bar
 baz
 
+# Tests for coalesce / nvl / ifnull / nvl2 propagate field metadata
+# https://github.com/apache/datafusion/pull/24865
+
+# The tests below use the id, name and l_name columns. Each column carries
+# its own 'metadata_key' entry, so the output of arrow_metadata() shows which
+# argument the result's metadata came from.
+query ITT
+select id, name, l_name from table_with_metadata;
+----
+1 NULL NULL
+NULL bar l_bar
+3 baz l_baz
+
+query ???
+select arrow_metadata(id), arrow_metadata(name), arrow_metadata(l_name)
+from table_with_metadata limit 1;
+----
+{metadata_key: the id field} {metadata_key: the name field} {metadata_key: the 
l_name field}
+
+# Metadata is merged from the value-contributing arguments; earlier arguments 
win.

Review Comment:
   Could we clarify that executable assertions capture current behavior while 
commented outputs describe intended behavior? The duplicate expected-output 
block at lines 736-739 can also be removed.



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