Skip to content

Share the duplicated forward translator logic - #258

Merged
LucaCappelletti94 merged 1 commit into
mainfrom
dedup/forward-translator
Nov 6, 2026
Merged

LucaCappelletti94 merged 1 commit into
mainfrom
dedup/forward-translator

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Collaborator

The forward translator built the same things in several places: the column scope of a statement's table, a plain table factor, a zeroed CreateTable, the guard for a plain catalog function call, a function rebuilt under a new name, the literal field of date_trunc and date_part, the scale-preserving argument walk in both directions, the null-ignoring greatest and least, the query rewrite envelope, the conflict target lookup, and several refusal messages. Each is written once, and the refusal texts are unchanged. create_table loses its two flags, which every caller set.

Four tests pin refusals and the STRICT audit table, which nothing covered. They pass on main as well.

}

#[allow(clippy::too_many_lines)]
fn try_translate_distinct_on_query(

This comment was marked as outdated.

@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.43503% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/impls/function_helpers.rs 95.23% 1 Missing ⚠️
src/impls/translator_impls/expr.rs 97.87% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

}

#[allow(clippy::too_many_lines)]
fn try_translate_distinct_on_query(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pg2sqlite::impls::translator_impls::query::try_translate_distinct_on_query (function), signature changed, and tests/it/test_postgis_predicate_rewrite.rs:200:45, which this pull request leaves as it was, names it. Its text may need review.

👎 Report a wrong review ❤️ Support refquiem

@LucaCappelletti94
LucaCappelletti94 merged commit 0d51177 into main Nov 6, 2026
19 checks passed
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.

1 participant