Repository navigation
Description
During A/B benchmarking of Fluree's virtual-dataset path against DuckDB over identical Iceberg data (DuckDB v1.5.5 "Variegata" d8cdaa33fd, iceberg extension 45163a28, macOS arm64), two DuckDB-side defects were isolated with controlled repros. This issue tracks filing them upstream with duckdb/duckdb-iceberg; whoever picks this up can decide whether to split into sub-issues per finding. Neither is filed yet.
Scope note: this benchmarking invokes an independently installed DuckDB CLI as an external process for comparative measurement only — no DuckDB code or components are included in or linked into this repository or any Fluree product; product/project names are used nominatively to identify the third-party software being measured and to report these findings to its maintainers.
Finding 1 — multi-file fact-table scans fail/stall over a Snowflake-managed REST catalog (primary)
Setup: CREATE SECRET (TYPE ICEBERG, CLIENT_ID '', CLIENT_SECRET '<jwt>', OAUTH2_SCOPE 'session:role:ICEBERG_READER', OAUTH2_SERVER_URI 'https://<acct>.snowflakecomputing.com/polaris/api/catalog/v1/oauth/tokens') + ATTACH '<warehouse>' (TYPE ICEBERG, SECRET ..., ENDPOINT 'https://<acct>.snowflakecomputing.com/polaris/api/catalog').
A grouped aggregate over a date-partitioned fact table (~180K rows, many small per-partition parquet files on Snowflake-managed S3) fails at default threads with IO Error: Could not connect to server ... HTTP GET to '<snowflake-managed-s3>/...parquet' (~7.5s to failure; the failing file varies run to run; reproduced 3×). Raising http_retries/http_timeout converts the failure into an indefinite hang; SET threads=1 does not complete even a 40K-row fact within ~110s.
Controls that narrow the cause: (a) not network — curl -I to the same S3 host answers 403 in ~59ms; (b) not credential vending — single-file dimension tables read real data fine (2.0s) and duckdb_secrets() shows the iceberg secret handling S3; (c) COUNT(*) succeeds (manifest stats, no data read); (d) the identical query over local read_parquet copies works. Distinct from duckdb-iceberg #792 (Access-Denied credential scope, affects all reads) — this is connection-level and only on many-file scans. Best current read: parallel S3 GET connection handling/retry in the iceberg reader against Snowflake-managed storage once many files are fetched.
Sharpening probe worth running before filing (cheap): write one date-partitioned copy of a fact table on local MinIO and re-scan — if partitioned-local works, the report narrows from "many small files" to "connection behavior specific to Snowflake-managed S3", which is a materially different (and more actionable) upstream report.
Finding 2 — hash-join bloom-filter pushdown into the iceberg scan is unimplemented (secondary)
Same env. Any fact⋈dim join over the partitioned iceberg tables fails deterministically with Not implemented Error: Can't convert TableFilterType (BLOOM_FILTER) from global to local indexes (the join's runtime bloom filter pushed into the iceberg scan operator). Workaround SET disabled_optimizers='join_filter_pushdown' clears the error at the cost of the semi-join reduction (full remote over-scan). Controls: the identical join over read_parquet succeeds with defaults; on an UNPARTITIONED single-file iceberg layout (local MinIO REST catalog) the joins run fine with pushdown ON — so the conversion gap is tied to the partitioned multi-file scan's filter-index mapping, not iceberg scans generally.
Context
Full repro scripts, harness, and measurements live in the internal benchmark records (audit-2026-07/duckdb-bench/PREP.md §3/§3a on the bench working set). Version pin note: DuckDB ≥1.5.3 required for iceberg predicate pushdown (older releases over-scan); both findings reproduce on 1.5.5. For contrast, Fluree reads these exact partitioned fact tables reliably (429-hardening + connection discipline from the #1491 lineage) — which is what made the DuckDB failures stand out as engine-side rather than environmental.
Deliverables tracked by this issue: [ ] run the MinIO partitioned-copy sharpening probe · [ ] file Finding 1 upstream (duckdb-iceberg) · [ ] file Finding 2 upstream (duckdb-iceberg) · [ ] link the upstream issue URLs back here.
Activity
aaj3f commentedon Jul 30, 2026
MinIO partitioned-copy sharpening probe — RUN (A/B program Wave B, 2026-07-30)
Ran the sharpening probe this issue called for. Wrote FACT_WEB_EVENT (1,000,000 rows) onto the local MinIO +
apache/iceberg-rest-fixturesubstrate PARTITIONED two ways, each producing 252 per-partition data files (a genuine many-small-files layout): (a) identity partition on a derived month-bucket, and (b) a genuine iceberg month-transform specmonth(6)— the closest local analogue to Snowflake'sPARTITION BY(date). Probed with the same DuckDB v1.5.5 (arch -arm64),ACCESS_DELEGATION_MODE none+ our own MinIO S3 secret.Finding 1 → confirmed Snowflake-managed-S3-specific
The exact grouped-aggregate scan shape that failed with
Could not connect to serverat default threads, and did not complete atthreads=1within ~110 s, on Snowflake-managed S3 — runs fine and sub-second on the 252-file partitioned LOCAL table:COUNT(*) ... GROUP BY event_type), identity layout, default threads: OK, 0.158 s (6 groups, sum = 1,000,000)SET threads=1: OK, 0.771 sMany-small-files partitioning is not the cause. The report narrows from "many small files" to "parallel-S3-GET connection behavior specific to Snowflake-managed storage" — exactly the sharpening this issue anticipated.
Finding 2 → NOT tied to the partitioned multi-file layout (corrects the current hypothesis)
The
Not implemented Error: Can't convert TableFilterType (BLOOM_FILTER) from global to local indexesdoes not reproduce on any local partitioned layout:... JOIN DIM_PRODUCT ... WHERE is_current GROUP BY category), identity 252-file,join_filter_pushdownON (default): OK, 0.095 s, no bloom error (10 categories)SET disabled_optimizers=''): OK, no bloom errorThe issue body currently reads "the conversion gap is tied to the partitioned multi-file scan's filter-index mapping." This probe shows that is not it: a genuine iceberg date-transform partition with 252 files joins fine with pushdown ON on local MinIO. Combined with the earlier unpartitioned-local result (also fine), the bloom-filter gap is specific to the Snowflake-managed iceberg path (remote/vended-credential metadata, or Snowflake's exact partition/metadata encoding), not partitioning in general.
Net: both substrate-A failures are Snowflake-managed-storage-specific — DuckDB reads partitioned local iceberg (including a date-transform spec) reliably. Worth reflecting in the eventual upstream duckdb-iceberg filings: Finding 1 as a Snowflake-managed-S3 connection issue, Finding 2 re-scoped away from "partitioned multi-file" toward the Snowflake-managed metadata path. Deliverable
[x] run the MinIO partitioned-copy sharpening probe.bench: Wave B — partitioned-copy probe (substrate B) + #1568 verdicts