Skip to content

fix: Presto timestamp rounding and issue cleanup#26

Open
dtsong wants to merge 3 commits intomasterfrom
fix/presto-rounding-and-cleanup
Open

fix: Presto timestamp rounding and issue cleanup#26
dtsong wants to merge 3 commits intomasterfrom
fix/presto-rounding-and-cleanup

Conversation

@dtsong
Copy link
Owner

@dtsong dtsong commented Mar 4, 2026

Summary

Test plan

  • uv run pytest tests/test_query.py -x -q — 32 passed
  • Verified fix matches Trino's implementation at trino.py:22
  • Manual verification against a Presto instance (optional)

Closes #13

🤖 Generated with Claude Code

dtsong and others added 3 commits March 3, 2026 21:11
The rounds=True and rounds=False branches in Presto's
normalize_timestamp produced identical SQL, silently ignoring
the rounding flag. Cast to coltype.precision (not 6) when
rounding, matching Trino's correct implementation.

Also clarify the misleading TODO in Join.select — column
validation is already handled by resolve_names().

Closes #13

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
resolve_names() performs name resolution (raises on unknown names),
not general column validation. Updated comment to accurately describe
the behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
resolve_names() raises KeyError (not a generic error) and only
validates when schema is present.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Presto: Incomplete rounding implementation

1 participant