SELECT try_to_file(named_struct('uri', 'a.jpg', 'size', 12)) AS f;
+-------------------------------------------------------------------------------------------+| f |+-------------------------------------------------------------------------------------------+| {"uri":"a.jpg","offset":null,"size":12,"content_type":null,"checksum":null,"inline":null} |+-------------------------------------------------------------------------------------------+
示例 2:非法行返回 NULL
SELECT try_to_file(named_struct('uri', 'a.jpg', 'size', -1)) IS NULL AS negative_size, try_to_file(named_struct('uri', NULL, 'inline', NULL)) IS NULL AS neither_set, try_to_file(named_struct('uri', 'a.jpg', 'inline', to_binary('61', 'hex'))) IS NULL AS both_set;