Skip to content

COPY and IGNORE_ERRORS with dups improvements#607

Merged
adsharma merged 3 commits into
mainfrom
duplicate_pk_syntax_return
Jun 22, 2026
Merged

COPY and IGNORE_ERRORS with dups improvements#607
adsharma merged 3 commits into
mainfrom
duplicate_pk_syntax_return

Conversation

@adsharma

Copy link
Copy Markdown
Contributor

Address review comments from #601

@ericyuanhui could you please review/test this?

@adsharma adsharma changed the title Tighthen the user facing surface area COPY and IGNORE_ERRORS with dups with syntax and return contract updates Jun 22, 2026
@adsharma adsharma changed the title COPY and IGNORE_ERRORS with dups with syntax and return contract updates COPY and IGNORE_ERRORS with dups improvements Jun 22, 2026
@ericyuanhui

Copy link
Copy Markdown
Contributor

Address review comments from #601

@ericyuanhui could you please review/test this?

some test failed
Assertion strings are outdated
For example, the error message no longer mentions SKIP_DUPLICATE_PK, but the test is still matching the old wording exactly.

Test input syntax is outdated
Some test statements are still using SKIP_DUPLICATE_PK=true, while the goal of the current PR is to consolidate the user-visible syntax to just IGNORE_ERRORS=true (DUPLICATE_PK_ONLY).

@ericyuanhui

Copy link
Copy Markdown
Contributor
image as this case . When I use IGNORE_ERRORS=true, shouldn't it execute according to the original semantics? At the very least, it should give the user some information that there was an error, and how to check it. But it seems like that's not the case. I did a test (IGNORE_ERRORS=true (DUPLICATE_PK_ONLY)), and currently that feature works fine. My previous design intent for the feature was to avoid affecting the original functionality and capabilities, after all, this feature is just an optimization for some special insert scenarios.

@ericyuanhui

Copy link
Copy Markdown
Contributor
image I try it with call show_warning. It will show it. So we just need add some waring log for user right?

@adsharma adsharma force-pushed the duplicate_pk_syntax_return branch from 292627b to 7057343 Compare June 22, 2026 15:08
The new COPY option syntax IGNORE_ERRORS=true (DUPLICATE_PK_ONLY)
replaces SKIP_DUPLICATE_PK=true, and the node COPY result contract
is now consistently 1 row with 3 columns:

 - Column 0: the result message (with warning summary folded in
 when warnings exist, e.g. "5 tuples have been copied to the person
 table. 2 warnings encountered during copy. Use 'CALL show_warnings()
 RETURN *' to view the actual warnings. Query ID: 6")
 - Column 1: skipped_duplicate_pk_count (INT64)
 - Column 2: skipped_duplicate_pks (LIST<STRING>)
@adsharma adsharma merged commit 0b37900 into main Jun 22, 2026
4 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.

2 participants