Repository navigation
Conversation
Collaborator
raminqaf
force-pushed
the
FLINK-41433
branch
2 times, most recently
from
November 12, 2026 10:31
2b03c16 to
3b4c609
Compare
twalthr
reviewed
Nov 12, 2026
raminqaf
force-pushed
the
FLINK-41433
branch
from
November 12, 2026 13:24
3b4c609 to
c79eadc
Compare
The built-in function pages are generated by a content adapter, which needs Hugo 0.126. Hugo 0.126.3 builds the current docs with the same page content. Later versions need changes to the templates and the config, for example because they removed resources.ToCSS. The README's Docker command now uses an image with the same Hugo version. The docs CI script passes --logLevel info instead of -v, which Hugo 0.126 logs as a deprecation error and 0.127 removes. Generated-by: Claude Code 2.1.321 (Claude Opus 5.5)
A content adapter adds one page for each data/functions/<category>/<name>.yml, in English and Chinese. Every page starts with its category, a one-line summary and related functions, followed by the same sections: syntax, arguments, returns, usage notes and examples. A file with the same path under data/functions_zh/ replaces fields of the Chinese page. A render hook for SQL code blocks highlights the function of the page in its syntax and examples. SQL blocks on other pages render as before. A row in sql_functions.yml with a page field links to its page from the category table and from the A-Z list. The category table shows the function's name instead of its signature, and the page's summary. Rows for two forms of one function, such as CASE, show once. The category sections in the sidebar expand to their function pages. A collapsible section shows its arrow only if it has pages to show. The README describes how to add a function page, and the built-in function guide in AGENTS.md points to it. Generated-by: Claude Code 2.1.321 (Claude Opus 5.5)
Each function was rechecked against its type strategies, runtime code and tests, and every example result comes from running its SQL. Compared with the old table rows, the pages add: - REGEXP_REPLACE inserts the replacement as written, so $1 doesn't refer to a group. - Only REGEXP, REGEXP_EXTRACT and REGEXP_REPLACE check a literal regex at planning time. The other functions return NULL for a regex that doesn't compile. - REGEXP_EXTRACT_ALL defaults to group 1, so a regex without groups returns NULL unless the index is 0. - REGEXP_INSTR counts UTF-16 code units. The Chinese pages keep the first sentence of the existing Chinese description as their summary. Generated-by: Claude Code 2.1.321 (Claude Opus 5.5)
Each function was rechecked against its type strategies, runtime code and tests, and every example result comes from running its SQL. Compared with the old table rows, the pages add: - CASE, IF, COALESCE and IFNULL evaluate only the branch or argument they need. - The result type of each function, and the types that IF, GREATEST and LEAST accept. - The Scala-only BOOLEAN.? row moves into the IF row, whose Table API call is BOOLEAN.then(...). The Chinese pages keep the first sentence of the existing Chinese description as their summary. Generated-by: Claude Code 2.1.321 (Claude Opus 5.5)
Each function was rechecked against its type strategies, runtime code and tests, and every example result comes from running its SQL. Compared with the old table rows, the pages add: - A type pair that the casting table doesn't allow fails at planning time, for CAST and TRY_CAST alike. - TRY_CAST always returns a nullable type, so COALESCE(TRY_CAST(...), 0) is NOT NULL. - Casts between numeric types wrap around or saturate instead of failing. - CHAR(n) and BINARY(n) targets cut and pad, VARCHAR(n) and VARBINARY(n) only cut. The see-also link to TYPEOF points at the Utility category until TYPEOF has a page. The Chinese pages keep the first sentence of the existing Chinese description as their summary. Generated-by: Claude Code 2.1.321 (Claude Opus 5.5)
Each function was rechecked against its type strategies, runtime code and tests, and every example result comes from running its SQL. Compared with the old table rows, the pages add: - UUID returns CHAR(36). UUID_V4 and UUID_V7 return the UUID type. - CURRENT_DATABASE is read once per query. - TYPEOF evaluates its input, and force_serializable must be a literal. - DESCRIPTOR is allowed in SQL only as an argument of a table function. - The Table API-only callSql and as get pages with Java and Python examples. The see-also link from CAST to TYPEOF now points at the new page. The Chinese pages keep the first sentence of the existing Chinese description as their summary. Generated-by: Claude Code 2.1.321 (Claude Opus 5.5)
Each function was rechecked against its type strategies, runtime code and tests, and every example result comes from running its SQL. Compared with the old table rows, the pages add: - Which functions run in streaming mode. ROW_NUMBER and LAG do in some query shapes, the others are supported in batch mode only. - RANK is one plus the number of rows before the current row. The old row also counted its peers. - The result types, and the arguments that LEAD, LAG and NTILE accept. - The Scala-only NUMERIC.rows row becomes rowInterval(LONG), with a page for the Java and Python call. The Chinese pages keep the first sentence of the existing Chinese description as their summary. Generated-by: Claude Code 2.1.321 (Claude Opus 5.5)
Code blocks use the colors of the Flink logo instead of the GitHub style. Keywords and SQL types are bold purple, strings dark orange and numbers black, like names. On a built-in function page, the page's function is bold dark red, so it stands out from the keywords. The SQL render hook gives every SQL type name the same class. The highlighter tags INT, TIMESTAMP and STRING in three different ways, so the same type showed in different colors. The sidebar marks the current page in purple with a bar in the light purple of the logo. Generated-by: Claude Code 2.1.322 (Claude Opus 5.5)
raminqaf
force-pushed
the
FLINK-41433
branch
from
November 12, 2026 16:30
c79eadc to
4ed3cf9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Step 2 of FLINK-23804: every function of five categories gets a page of its own, generated from YAML. A page has the SQL, Java and Python syntax, the arguments, what it returns and when it returns NULL, usage notes, and examples. Each function was rechecked against its implementation, and every example result comes from running its SQL. The recheck changed what the docs say, for example:
REGEXP_REPLACE$1is inserted as written. The replacement can't refer to groups.REGEXP_EXTRACT_ALLextractIndexdefaults to 1RANKTRY_CASTCOALESCE(TRY_CAST('non-number' AS INT), 0)"returns 0 of type INT"INT NOT NULLLEADBrief change log
--logLevel infoinstead of-v, which 0.126.3 logs as a deprecation error.data/functions/<category>/<name>.yml, in English and Chinese. A page starts with its category, a one-line summary and related functions, followed by the same sections: syntax, arguments, returns, usage notes and examples. A render hook for SQL code blocks highlights the page's function in its syntax and examples.CASErows show once, and the rows are in alphabetical order, as in the sidebar. The A-Z page links converted rows to their page, and a category in the sidebar expands to its function pages.INT,TIMESTAMPandSTRINGin three different ways. The colors apply to every code block on the site.BOOLEAN.?folds into theIFrow asBOOLEAN.then, andNUMERIC.rowsbecomesrowInterval(LONG).docs/README.md, including what a page leaves out, and point AGENTS.md step 8 at it.Verifying this change
This change is documentation only.
The recheck found bugs in the code, which this PR doesn't fix. The pages describe the intended behavior, and I'll file the bugs separately.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code 2.1.322 (Claude Opus 5.5)