laskoviymishka commented on code in PR #1242:
URL: https://github.com/apache/iceberg-go/pull/1242#discussion_r3463185996


##########
table/equality_delete_reader_test.go:
##########
@@ -280,3 +280,270 @@ func TestEqualityDeleteMultiColumnKey(t *testing.T) {
                {id: 1, name: "charlie"},
        }, rows)
 }
+
+func TestEqualityDeleteNullableFastPathKeys(t *testing.T) {
+       tests := []struct {
+               name           string
+               keyType        iceberg.Type
+               dataJSON       string
+               nullDeleteJSON string
+               zeroDeleteJSON string
+       }{
+               {
+                       name:    "int",
+                       keyType: iceberg.PrimitiveTypes.Int32,
+                       dataJSON: `[
+                               {"row_id": 1, "key": null},
+                               {"row_id": 2, "key": 0},
+                               {"row_id": 3, "key": 7}
+                       ]`,
+                       nullDeleteJSON: `[{"key": null}]`,
+                       zeroDeleteJSON: `[{"key": 0}]`,
+               },
+               {
+                       name:    "long",
+                       keyType: iceberg.PrimitiveTypes.Int64,
+                       dataJSON: `[
+                               {"row_id": 1, "key": null},
+                               {"row_id": 2, "key": 0},
+                               {"row_id": 3, "key": 7}
+                       ]`,
+                       nullDeleteJSON: `[{"key": null}]`,
+                       zeroDeleteJSON: `[{"key": 0}]`,

Review Comment:
   I'd drop the `float` and `double` sub-cases here.
   
   The spec says float and double columns can't be used as equality delete 
columns, so these set `EqualityFieldIDs` on a key type that Java/PyIceberg/Rust 
would refuse to write — the round-trip we're asserting can't actually occur, 
and it quietly implies we support float-keyed deletes. The encoder-level test 
(`TestMakeColEncoderMatchesGenericForNullFastPathTypes`) is the right place to 
exercise float/double, since it checks the encoding layer in isolation without 
claiming they're valid keys — happy to keep them there.
   
   Separately, there's no validation rejecting float/double equality field IDs 
at write/commit time — pre-existing, worth a follow-up, not this PR.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to