Skip to content

sql: Reject unsupported COPY FROM URL/S3 formats in planning#37065

Merged
ggevay merged 1 commit into
MaterializeInc:mainfrom
ggevay:copy-from-url-reject-text-format
Jun 16, 2026
Merged

sql: Reject unsupported COPY FROM URL/S3 formats in planning#37065
ggevay merged 1 commit into
MaterializeInc:mainfrom
ggevay:copy-from-url-reject-text-format

Conversation

@ggevay

@ggevay ggevay commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

COPY FROM a URL or S3 source only supports CSV and Parquet, but the format was never validated against the source during planning. The format defaulted to TEXT when omitted, so both COPY FROM <url> with no FORMAT and an explicit FORMAT text/binary produced a plan that the coordinator could not execute, tripping a soft-panic in sequence_copy_from.

Validate the format against the source in plan_copy_from: STDIN keeps its TEXT default, while URL/S3 sources now require an explicit FORMAT and reject TEXT/BINARY with a clear planning error. COPY FROM STDIN and both COPY TO directions are unaffected.

Adds testdrive coverage to copy-from-s3-minio.td for the formatless URL, explicit TEXT URL, and explicit TEXT S3 cases.

COPY FROM a URL or S3 source only supports CSV and Parquet, but the
format was never validated against the source during planning. The
format defaulted to TEXT when omitted, so both `COPY FROM <url>` with no
FORMAT and an explicit `FORMAT text`/`binary` produced a plan that the
coordinator could not execute, tripping a soft-panic in
sequence_copy_from.

Validate the format against the source in plan_copy_from: STDIN keeps its
TEXT default, while URL/S3 sources now require an explicit FORMAT and
reject TEXT/BINARY with a clear planning error. COPY FROM STDIN and both
COPY TO directions are unaffected.

Adds testdrive coverage to copy-from-s3-minio.td for the formatless URL,
explicit TEXT URL, and explicit TEXT S3 cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ggevay ggevay requested a review from a team as a code owner June 16, 2026 09:32
@ggevay ggevay added the A-ADAPTER Topics related to the ADAPTER layer label Jun 16, 2026
@ggevay ggevay merged commit c922416 into MaterializeInc:main Jun 16, 2026
119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ADAPTER Topics related to the ADAPTER layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants