You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "fallintoplace (via GitHub)" <gi...@apache.org> on 2026/06/24 17:38:31 UTC

[PR] fix(table): reject empty equality delete keys [iceberg-go]

fallintoplace opened a new pull request, #1303:
URL: https://github.com/apache/iceberg-go/pull/1303

   Summary
   
   - reject equality delete files with no equality field IDs while loading scan deletes
   - add reader-level regression coverage for malformed delete metadata before any delete file is read
   
   Why
   
   Equality delete keys are built from the file's equality field IDs. If that list is empty, the reader can build an empty key, and every data row also encodes to that same empty key. A malformed equality delete file could therefore filter every row from an applicable scan.
   
   Writers already reject empty equality field IDs; this adds the same guard to the reader path for externally-written or malformed delete files.
   
   Testing
   
   - go test ./table -run '^TestReadAllEqualityDeleteFilesRejectsEmptyEqualityFieldIDs$' -count=1
   - go test ./table -count=1
   - go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4 run --timeout=10m ./table/...
   - git diff --check


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] fix(table): reject empty equality delete keys [iceberg-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #1303:
URL: https://github.com/apache/iceberg-go/pull/1303#discussion_r3470059668


##########
table/equality_delete_reader.go:
##########
@@ -65,6 +65,10 @@ func readAllEqualityDeleteFiles(ctx context.Context, fs iceio.IO, schema *iceber
 				continue
 			}
 
+			if len(d.EqualityFieldIDs()) == 0 {
+				return nil, fmt.Errorf("equality delete file %s has no equality field IDs", d.FilePath())

Review Comment:
   Non-blocking: the writer side exposes `table.ErrEmptyEqualityFieldIDs` (equality_delete_writer.go) and its tests assert it via `errors.Is`. Consider wrapping that sentinel here so callers can match programmatically: `fmt.Errorf("%w: equality delete file %s", ErrEmptyEqualityFieldIDs, d.FilePath())` (or `iceberg.ErrInvalidSchema`, which the writer uses for its related field-ID validation). The reader's sibling error just below ("field ID not found") is also a plain error, so this is consistency polish rather than a defect.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] fix(table): reject empty equality delete keys [iceberg-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #1303:
URL: https://github.com/apache/iceberg-go/pull/1303


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org