nssalian commented on code in PR #1846:
URL: https://github.com/apache/iceberg-go/pull/1846#discussion_r3816427196
##########
table/internal/variant_shredding_test.go:
##########
@@ -268,22 +354,14 @@ func TestInferredTypedScalarsShred(t *testing.T) {
}
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
- mk := func() variant.Value {
- var b variant.Builder
- require.NoError(t, c.build(&b))
- v, err := b.Build()
- require.NoError(t, err)
-
- return v
- }
- v := mk()
+ v := mkBuilt(t, c.build)
inner, ok := AnalyzeVariantShredding([]variant.Value{v})
require.Truef(t, ok, "%s should infer a shredded type",
c.name)
st := extensions.NewShreddedVariantType(inner)
bldr := extensions.NewVariantBuilder(mem, st)
defer bldr.Release()
- bldr.Append(mk())
+ bldr.Append(mkBuilt(t, c.build))
Review Comment:
Makes sense. Simplified.
--
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]