raminqaf commented on code in PR #29310:
URL: https://github.com/apache/flink/pull/29310#discussion_r4123273056


##########
docs/content.zh/docs/sql/reference/data-types.md:
##########
@@ -1593,6 +1593,12 @@ object as `{k1=v1, k2=v2}`, with each value rendered by 
these same rules and a n
 shown as `NULL`. A string is never quoted, at any depth. Use `JSON_STRING` for 
the JSON form with
 quoted strings. A variant that stores a JSON `null` casts to SQL `NULL`.
 
+Printed results, for example in the SQL client, render a `VARIANT` like a cast 
to a character

Review Comment:
   Yes, that's intended. After FLINK-40580, `CAST(v AS STRING)` renders a 
`VARIANT` as `{k=v}` / `[a, b],` not `JSON`. This PR makes printing use the 
same rendering: before, printing went through `toJson()`, so `NaN` failed the 
whole result and a `JSON` null printed as an empty cell. A printed `VARIANT` 
now looks like a printed `MAP` or `ARRAY`. `JSON_STRING` still gives `JSON`. I 
reworded the sentence to say "not as JSON" explicitly.



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

Reply via email to