twalthr commented on code in PR #29760:
URL: https://github.com/apache/flink/pull/29760#discussion_r4468080553


##########
docs/content/docs/connectors/table/formats/raw.md:
##########
@@ -182,15 +196,25 @@ The table below details the SQL types the format 
supports, including details of
     </tr>
     <tr>
       <td><code>VARIANT</code></td>
-      <td>A UTF-8 (by default) encoded JSON document.<br>
-       The encoding charset can be configured by 'raw.charset'.<br>
-       On read, the decoded text is parsed like <code>PARSE_JSON</code>, so 
duplicate object keys are rejected and
-       malformed JSON fails the job. On write, the value is rendered by 
<code>Variant#toJson</code>. The round trip is
-       value-lossless but not byte-lossless: insignificant whitespace is 
dropped and object keys are ordered.</td>
+      <td>Depends on 'raw.variant-encoding'.<br>
+       <strong>json</strong> (default): a UTF-8 encoded JSON document.
+       'raw.charset' must be UTF-8. To read or write JSON in another charset, 
declare the column as
+       <code>STRING</code> and convert it with <code>PARSE_JSON</code> or 
<code>JSON_STRING</code>.
+       On read, the bytes are parsed like <code>PARSE_JSON</code> with the 
same checks, so an invalid UTF-8 byte such as
+       <code>0xFF</code>, a duplicate object key or malformed JSON fails the 
job. On write, the value is rendered by
+       <code>Variant#toJson</code>.

Review Comment:
   I know but a SQL user doesn't know this method. This persona views from SQL 
perspective and thus thinks of built-in functions.



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