raminqaf opened a new pull request, #30033:
URL: https://github.com/apache/flink/pull/30033

   ## What is the purpose of the change
   
   Step 2 of FLINK-23804, continued after #29864: every function and operator 
of five more categories gets a page of its own, generated from YAML. Each page 
was rechecked against the implementation, and every example result comes from 
running its SQL in batch and streaming mode. The recheck changed what the docs 
say, for example:
   
   | Function       | Old docs                                                  
                               | Master                                         
                              |
   
|----------------|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|
   | `=`            | "Returns TRUE if value1 is equal to value2"               
                               | `TRUE = 'true'` is FALSE: the string isn't 
cast                              |
   | `SIMILAR TO`   | "The escape character has not been supported yet."        
                               | `ESCAPE` works. A `.` matches any character, 
as in a Java regular expression |
   | `JSON_OBJECT`  | "keys must be non-NULL string literals"                   
                               | In SQL, a NOT NULL string column works too. 
The Table API needs literals     |
   | `JSON_QUOTE`   | Escapes `"`, `\`, `/` and the control characters `\b`, 
`\f`, `\n`, `\r`, `\t`            | An emoji comes out garbled, and `CHR(1)` 
isn't escaped                       |
   | `JSON_UNQUOTE` | A value that isn't a valid JSON string literal "is passed 
through unmodified"            | `'"a"b"'` returns `a"b`                        
                              |
   
   ## Brief change log
   
   - Add 40 pages: Comparison 9, Boolean 4, Hash 7, JSON 12, Variant 8. Every 
row of these categories now points at a page.
   - Comparison and Boolean are operators. A page covers an operator and its 
NOT form, such as `IS NULL` and `IS NOT NULL`. The operators `=`, `<>`, `<`, 
`<=`, `>` and `>=` share a "Comparison operators" page, and `AND`, `OR` and 
`NOT` a "Logical operators" page. The two VARIANT subscript rows share one 
page. The split follows Snowflake for the grouped operators and Databricks for 
the `IS` tests.
   - The Table API column shows the Java calls instead of the Scala ones, such 
as `isEqual(...)` for `===` and `jsonQuote()` for `JsonQuote()`. The Chinese 
table gets the `JSON(value)` row it lacked.
   - The XML mapping of VARIANT, about 220 lines with tables, moves from the 
category page to a page "XML and VARIANT", and the path syntax to a page 
"VARIANT Paths". The Variant category page keeps its intro and table, like the 
other categories. Links and the anchors of the old single functions page 
follow. Two sentences there are fixed: `TRY_VARIANT_GET` returns NULL for a 
malformed path that isn't a literal, and reading XML back with `PARSE_XML` 
needs the same `force_array`.
   - Chinese pages show the English sections. Where a row had a Chinese 
description, its first sentence becomes the summary, except on three pages 
where it described only one operator or mistranslated it.
   
   One page documents a name that SQL doesn't resolve yet: `IS_NAN(x)` fails 
with "No match found for function signature", because built-in functions are 
registered under their name, here `isNan`, not their SQL name. Only `ISNAN(x)` 
works today. The page shows `IS_NAN` as intended, and a separate PR fixes the 
name. Its two examples were run as `ISNAN`.
   
   ## Verifying this change
   
   This change is documentation only.
   
   - Every SQL example ran in batch and streaming mode on master with a local 
runner, which isn't part of this PR. The results on the pages are pasted from 
those runs.
   - A second review per category checked each statement against the type 
strategies, the runtime code and the tests. A third pass removed what the 
reviews of #29864 asked to leave out.
   - Hugo 0.126.3 builds both languages without warnings. A link check finds no 
new broken internal links. Every commit builds on its own.
   
   The recheck found bugs in the code, which this PR doesn't fix. The pages 
describe the current behavior, also where it's a bug that users would plausibly 
hit, such as `JSON_STRING` writing a `FLOAT` with the digits of a `DOUBLE`. 
They name no tickets. I'll file the bugs separately.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code 2.1.328 (Claude Opus 5.5)
   


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