badalprasadsingh commented on code in PR #2591:
URL: https://github.com/apache/iceberg-go/pull/2591#discussion_r4598036820
##########
website/src/releases.md:
##########
@@ -42,10 +42,10 @@ Per-release notes (highlights, breaking changes,
contributors) are published on
### Unreleased compatibility notes
-- **`RowDelta.Commit` can be called once per builder.** A second `Commit` on
the same `RowDelta` now returns an error wrapping `table.ErrInvalidOperation`
and stages nothing, even if the first call failed, as `RewriteFiles.Commit`
does. Previously, calling `Commit` again after a failed first call could
succeed, and calling it again after a successful one staged the builder's files
a second time. Create a new builder with `Transaction.NewRowDelta` for each
commit.
Review Comment:
the last merge used an outdated "releases.md": which would removed notes for
several prs
can you restore the file from main and add only this pr’s bullet and the
REST sentence?
##########
table/evaluators_test.go:
##########
@@ -1311,6 +1312,65 @@ func (p *ProjectionTestSuite)
TestMixedSpecUnknownTransformProjection() {
p.True(expr.Equals(iceberg.EqualTo(iceberg.Reference("id_bucket"),
int32(3))))
}
+func (p *ProjectionTestSuite) TestInvalidBuiltInMultiSourceFieldDoesNotPrune()
{
+ schema := p.schema()
+ filter := iceberg.EqualTo(iceberg.Reference("data"), "val")
+ singleSourceSpec := iceberg.NewPartitionSpecID(1,
iceberg.PartitionField{
+ SourceIDs: []int{2}, FieldID: 1000, Name: "data_bucket",
+ Transform: iceberg.BucketTransform{NumBuckets: 16},
+ })
+ singleProjection, err := newInclusiveProjection(schema,
singleSourceSpec, true)(filter)
+ p.Require().NoError(err)
+ singleEvaluator, err := newManifestEvaluator(singleSourceSpec, schema,
singleProjection, true)
+ p.Require().NoError(err)
+
+ // Find a bucket summary that the ordinary one-source projection
excludes.
+ // Reusing that summary with the malformed historical spec proves that
the
+ // malformed field no longer produces the unsafe unary projection.
+ var excludedManifest iceberg.ManifestFile
+ for bucket := range int32(16) {
+ bound, err := iceberg.Int32Literal(bucket).MarshalBinary()
+ p.Require().NoError(err)
+ manifest := iceberg.NewManifestBuilder(2, "manifest.avro", 0,
1, 1).
+ Partitions([]iceberg.FieldSummary{{
+ ContainsNull: false,
+ LowerBound: &bound,
+ UpperBound: &bound,
+ }}).Build()
+ matches, err := singleEvaluator(manifest)
+ p.Require().NoError(err)
+ if !matches {
+ excludedManifest = manifest
+ break
+ }
Review Comment:
the earlier lint issue is fixed, but, ci's lint still fails on this `break`
(nlreturn) in all four go jobs, so the race tests are skipped
a blank line before break fixes it.
--
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]