Repository navigation
Conversation
- Add one EN/ZH page per date and time function, 35 pages for the 46 rows of the category, with SQL-verified examples and the Java and Python Table API calls. - The DATE, TIME, TIMESTAMP and INTERVAL literals get pages of their own, and the nine Table API rows that build an interval point at the INTERVAL literal page. FLOOR and CEIL with a time unit get pages in this category. - Point the 46 rows of the category at the pages. - Correct the opening paragraph and the unit table of the category page. Generated-by: Claude Code 2.1.332 (Claude Opus 5.5)
Collaborator
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 6 of FLINK-23804 and its last category: every date and time function 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:
HOURHOUR(TIMESTAMP '1969-12-31 23:00:00')is-1CEILCEIL(TIMESTAMP '2024-01-01 10:00:00' TO MONTH)is2024-01-01 00:00:00TIMESTAMPDIFFMILLISECONDcounts whole seconds: 1.5 seconds apart is1000CONVERT_TZ'+08:00'or a typo, is read as UTC without an errorTO_DATE5471-09-27instead of NULLBrief change log
NUMERIC.days, point at the INTERVAL literal page.FLOORandCEILwith a time unit get pages in this category, next to the numeric pages of [FLINK-41716][docs] Add pages for the mathematical functions #30185.UNIX_TIMESTAMPandTO_TIMESTAMP_LTZget one page each for their two rows, andNOWkeeps a page next toCURRENT_TIMESTAMP.temporal,unit,amount,str,format,ts,tz,unix_time,epochandepoch_precision,rowtime, andstart1,end1,start2,end2for OVERLAPS.UNIX_TIMESTAMP()runs for each row in batch mode too, and the unit table drops a duplicateEPOCHrow and addsDAYOFYEAR,DAYOFWEEKandNANOSECOND.Verifying this change
This change is documentation only.
table.local-time-zonein their SQL, and theCURRENT_WATERMARKexamples run in streaming mode only.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 the results above,
FLOORandCEILof aTIMESTAMP_LTZbeing an hour off in a daylight saving zone, orTO_TIMESTAMP_LTZdropping an offset that its format reads. The pages name no tickets. I'll file the bugs separately.The
TO_TIMESTAMPandTO_TIMESTAMP_LTZpages describe master. #27793 changes both and edits their rows insql_functions.yml, which this PR replaces with pages, so whichever PR lands second moves its text into the two pages.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.332 (Claude Opus 5.5)