laskoviymishka commented on code in PR #743:
URL: https://github.com/apache/iceberg-go/pull/743#discussion_r2829624594
##########
table/partitioned_fanout_writer.go:
##########
@@ -51,12 +51,13 @@ type partitionInfo struct {
}
// NewPartitionedFanoutWriter creates a new PartitionedFanoutWriter with the
specified
-// partition specification, schema, and record iterator.
-func newPartitionedFanoutWriter(partitionSpec iceberg.PartitionSpec, schema
*iceberg.Schema, itr iter.Seq2[arrow.RecordBatch, error])
*partitionedFanoutWriter {
+// partition specification, schema, record iterator, and writerFactory.
+func newPartitionedFanoutWriter(partitionSpec iceberg.PartitionSpec, schema
*iceberg.Schema, itr iter.Seq2[arrow.RecordBatch, error], writers
*writerFactory) *partitionedFanoutWriter {
Review Comment:
nit: writerF?
it's not a writers, but a factory of them.
##########
table/partitioned_fanout_writer_test.go:
##########
@@ -134,10 +134,8 @@ func (s *FanoutWriterTestSuite)
testTransformPartition(transform iceberg.Transfo
taskSchema, err := ArrowSchemaToIceberg(args.sc, false, nameMapping)
s.Require().NoError(err)
- partitionWriter := newPartitionedFanoutWriter(spec, taskSchema,
args.itr)
rollingDataWriters := NewWriterFactory(loc, args, metaBuilder,
icebergSchema, 1024*1024)
-
- partitionWriter.writers = &rollingDataWriters
+ partitionWriter := newPartitionedFanoutWriter(spec, taskSchema,
args.itr, &rollingDataWriters)
Review Comment:
nit: maybe
```
newPartitionedFanoutWriter(
spec,
taskSchema,
args.itr,
NewWriterFactory(loc, args, metaBuilder, icebergSchema, 1024*1024),
)
```
--
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]