Skip to content

Conversation

Mytherin
Copy link
Collaborator

FileExists returns true for root buckets on S3 (e.g. s3://root-bucket/). This causes partitioned copy operations like the following to fail currently:

copy (select 42 i, 1 p) to 's3://root-bucket/' (format parquet, partition_by p);
-- Cannot write to "s3://root-bucket/" - it exists and is a file, not a directory!

The check ("is this a file or is this a directory") doesn't really make sense on blob stores to begin with - so just skip it for remote files.

@Mytherin Mytherin merged commit a2e7526 into duckdb:v1.3-ossivalis May 28, 2025
48 checks passed
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request Jun 2, 2025
Partitioned copy: don't check if file exists for remote files (duckdb/duckdb#17689)
@Mytherin Mytherin deleted the writetorootbucket branch June 12, 2025 15:27
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