twuebi commented on code in PR #743:
URL: https://github.com/apache/iceberg-go/pull/743#discussion_r2832126856
##########
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:
Thanks for the suggestion, I don't think this'll work due to writerFactory
being a pointer
##########
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:
changed the name to writerFactory
--
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]