Skip to content

fix(query_engine): unwrap type casts in EXECUTE sharding params - #1434

Open
murex971 wants to merge 4 commits into
pgdogdev:mainfrom
murex971:fix/execute-typecast-params-1401
Open

fix(query_engine): unwrap type casts in EXECUTE sharding params#1434
murex971 wants to merge 4 commits into
pgdogdev:mainfrom
murex971:fix/execute-typecast-params-1401

Conversation

@murex971

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.76543% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pgdog/src/frontend/router/parser/params.rs 98.52% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment on lines +126 to +128
1, 'test', 1.5, true, false, NULL, B'101', now(),
2::bigint, 'x'::text, 3.5::float8, false::bool,
NULL::int, (4::int)::bigint

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should test also the cases where the actual typecast happens, like '3'::int, 1::bool, 13245-4564..::uuid it's probably fine right now while we use Format::Text, but that could the be issue if we decide to change it to binary.

also maybe we need to cover more verbose syntax CAST(value AS type) for typecast as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@meskill added cast coverage, extended tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed that binary encoding would need separate handling if parameter format changes 😬

@levkk levkk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM! @meskill will let you do a final pass and merge 🙇

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.

[Query engine] EXECUTE rewriting doesn't handle type casts

3 participants