wiedld commented on code in PR #10224:
URL: https://github.com/apache/datafusion/pull/10224#discussion_r1580017072


##########
datafusion/sqllogictest/test_files/copy.slt:
##########
@@ -283,11 +283,69 @@ OPTIONS (
 'format.statistics_enabled::col2' none,
 'format.max_statistics_size' 123,
 'format.bloom_filter_fpp' 0.001,
-'format.bloom_filter_ndv' 100
+'format.bloom_filter_ndv' 100,
+'format.metadata' 'foo:bar baz'
 )
 ----
 2
 
+# valid vs invalid metadata
+
+# accepts empty map
+statement ok
+COPY source_table
+TO 'test_files/scratch/copy/table_with_metadata/'
+STORED AS PARQUET
+OPTIONS (
+'format.metadata' ''
+)
+
+# accepts map with a single entry
+statement ok
+COPY source_table
+TO 'test_files/scratch/copy/table_with_metadata/'
+STORED AS PARQUET
+OPTIONS (
+'format.metadata' 'key:value'
+)
+
+# accepts map with multiple entries
+statement ok
+COPY source_table
+TO 'test_files/scratch/copy/table_with_metadata/'
+STORED AS PARQUET
+OPTIONS (
+'format.metadata' 'key1:value1 key2:value2'

Review Comment:
   😆 You beat me to it.
   
   I started with the internal double quotes approach, also considered escaped 
spaces; then I realized that these are introducing lexical rules which did not 
feel SQL appropriate. Landed on the approach suggested by @devinjdangelo , 
commit will be up shortly.



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