You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: make COPY work on a decoupled view with a vector column - #176
The change includes unit tests, written before the code, or the Testing
section explains why it has none.
The change includes regression tests in extension/coldfront/test/, or
the Testing section explains why it has none.
The Testing section notes any impact on the integration tests
(ci/journey.sh and the CI matrix).
The change updates README.md and docs/, or the Notes for Reviewers
explain why it needs no update.
The change adds no secrets, and the Risk section covers its security
impact.
A bakery, mesh, or distributed change updates the TLA+ model and re-runs
TLC (docs/formal/).
Author's AI review completed and findings addressed.
Commit messages are short and imperative.
Testing
ci/journey.sh: COPY loads a clustered vector table with each row in its nearest cluster, and a vector written under extra_float_digits = 0 keeps every digit. Both fail on main. No pg_regress test: the fix shows only in what DuckDB stores.
Risk
None that the checks miss. No security impact.
How to Revert
Revert the two commits. They change coldfront.c only.
Notes for Reviewers
Other array types written as '{...}' are still refused, as docs/supported_types.md says.
COPY renders a float under the session's extra_float_digits before this code runs, so a session that lowers the setting still loses digits.
Reviewing files that changed from the base of the PR and between 3c32812 and 3c32812.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
ColdFront now rewrites eligible one-dimensional, lower-bound-1 real[] constants into DuckDB-readable list literals during cold-query preparation. It sets extra_float_digits to 3 for preparation, then restores the prior value. Clustered Iceberg INSERT re-emission skips an OVERRIDING clause. Journey checks and documentation cover these paths.
Cold-query preparation converts non-NULL, one-dimensional real[] constants with lower bound 1 to bracketed list text and casts them back to real[]. It sets extra_float_digits to 3 during preparation and restores the previous setting. The journey checks vector precision, and the documentation describes the brace-literal exception.
Clustered Iceberg INSERT re-emission skips the OVERRIDING clause when locating the source. The journey checks COPY and INSERT ... OVERRIDING SYSTEM VALUE rows and their cluster assignments. The changelog records the related write fixes.
This change lets COPY and INSERT into clustered decoupled vector tables work and keeps vector precision. No concrete merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: making COPY work into a decoupled view with a vector column. The raw summary and objectives confirm the fix removes OVERRIDING SYSTEM VALUE from the clustered decouple…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description states the PR fixes COPY into a decoupled view with a vector column. It names the two changes: dropping OVERRIDING SYSTEM VALUE from the clustered decoupled INSERT source, and sending …
Full details: Title check
Explanation
The title names the main change: making COPY work into a decoupled view with a vector column. The raw summary and objectives confirm the fix removes OVERRIDING SYSTEM VALUE from the clustered decoupled INSERT source and rewrites real[] constants for DuckDB. The title is specific and matches the changeset.
Full details: Description check
Explanation
The description states the PR fixes COPY into a decoupled view with a vector column. It names the two changes: dropping OVERRIDING SYSTEM VALUE from the clustered decoupled INSERT source, and sending real[] constants to DuckDB as bracket literals. It also lists the tests in ci/journey.sh and the known limits. It is clearly related to the changeset, so the check passes.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 69d50ce and 3c32812.
Files selected for processing: 4
ci/journey.sh
docs/changelog.md
docs/supported_types.md
extension/coldfront/src/coldfront.c
Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.
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
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.
Summary
COPYinto a decoupled view with a vector column fails. Two fixes:OVERRIDING SYSTEM VALUEfrom the source of a clustered decoupledINSERT.COPYwrites that clause, and DuckDB cannot parse it there.real[]constant to DuckDB as'[1,2,3]'. PostgreSQL writes'{1,2,3}', which DuckDB does not read.No issue tracks this.
Checklist
./run-ci-local.shpasses (gofmt, golangci-lint, shellcheck, hadolint,actionlint, build, pg_regress, journey).
section explains why it has none.
extension/coldfront/test/, orthe Testing section explains why it has none.
(
ci/journey.shand the CI matrix).README.mdanddocs/, or the Notes for Reviewersexplain why it needs no update.
impact.
TLC (
docs/formal/).Testing
ci/journey.sh:COPYloads a clustered vector table with each row in its nearest cluster, and a vector written underextra_float_digits = 0keeps every digit. Both fail onmain. No pg_regress test: the fix shows only in what DuckDB stores.Risk
None that the checks miss. No security impact.
How to Revert
Revert the two commits. They change
coldfront.conly.Notes for Reviewers
'{...}'are still refused, asdocs/supported_types.mdsays.COPYrenders a float under the session'sextra_float_digitsbefore this code runs, so a session that lowers the setting still loses digits.