Skip to content

pxf: a timestamp ends at ')', as protowire-go's lexer ends it (#169) - #170

Merged
trendvidia merged 1 commit into
mainfrom
timestamp-rparen
Nov 7, 2026
Merged

trendvidia merged 1 commit into
mainfrom
timestamp-rparen

Conversation

@bfrancojr

@bfrancojr bfrancojr commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #169.

A @dataset row whose last cell is a timestamp, with no space before the ), was refused: (2024-01-02T03:04:05Z) gave 2:2: invalid timestamp: 2024-01-02T03:04:05Z). Lexer::LexTimestamp ran the timestamp to a space, newline, tab, CR, ,, ], }, # or a comment opener, and read the ) into it. protowire-go's endsRun also stops at ). The fix adds ) to cpp's set, so the two lists now match byte for byte.

Evidence

  • protowire-go 903b4a7 Parse accepts (2024-01-02T03:04:05Z). cpp main refused it, and accepted (2024-01-02T03:04:05Z, 1) and ts = [2024-01-02T03:04:05Z]. Both measured.
  • New test DatasetTimestampCell.EndsAtTheRowsParen parses the row through Parse and through DatasetReader, and checks that the cell is a timestamp with the right text. It fails with src/ stashed and passes with the fix.
  • ctest 730/730 locally (macOS). clang-format 18 clean.
  • CI on 2cd0e40 (head, rebased onto main 531c586): all 11 checks pass, including ASan + UBSan, the differential against protowire-go, clang-tidy, CodeQL and Windows.

Found while porting Go's mayEndToken for #168, which uses endsRun. Independent of #167.

@trendvidia
trendvidia merged commit 222ef6c into main Nov 7, 2026
11 checks passed
@trendvidia
trendvidia deleted the timestamp-rparen branch November 7, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pxf: a timestamp right before a row's ')' is refused: the lexer reads the ')' into it

2 participants