mapleFU commented on code in PR #39497:
URL: https://github.com/apache/arrow/pull/39497#discussion_r1444202093


##########
go/parquet/pqarrow/encode_arrow_test.go:
##########
@@ -427,6 +427,44 @@ func TestWriteEmptyLists(t *testing.T) {
        require.NoError(t, err)
 }
 
+func TestWriteAllNullsWithDeltaEncoding(t *testing.T) {
+       sc := arrow.NewSchema([]arrow.Field{
+               {Name: "f1", Type: arrow.PrimitiveTypes.Int64, Nullable: true},
+               {Name: "f2", Type: arrow.ListOf(arrow.FixedWidthTypes.Date32)},
+               {Name: "f3", Type: arrow.BinaryTypes.String, Nullable: true},
+               {Name: "f4", Type: arrow.ListOf(arrow.BinaryTypes.String)},
+               {Name: "f5", Type: arrow.BinaryTypes.LargeString, Nullable: 
true},
+               {Name: "f6", Type: arrow.ListOf(arrow.BinaryTypes.LargeString)},
+       }, nil)
+       bldr := array.NewRecordBuilder(memory.DefaultAllocator, sc)
+       defer bldr.Release()
+       for _, b := range bldr.Fields() {
+               b.AppendNull()
+       }
+
+       rec := bldr.NewRecord()
+       defer rec.Release()
+
+       props := parquet.NewWriterProperties(
+               parquet.WithVersion(parquet.V1_0),
+               parquet.WithDictionaryDefault(false),
+               parquet.WithEncodingFor("f1", 
parquet.Encodings.DeltaBinaryPacked),
+               parquet.WithEncodingFor("f2", 
parquet.Encodings.DeltaBinaryPacked),
+               parquet.WithEncodingFor("f3", parquet.Encodings.DeltaByteArray),
+               parquet.WithEncodingFor("f4", parquet.Encodings.DeltaByteArray),
+               parquet.WithEncodingFor("f5", 
parquet.Encodings.DeltaLengthByteArray),
+               parquet.WithEncodingFor("f6", 
parquet.Encodings.DeltaLengthByteArray),

Review Comment:
   In this patch we check DeltaBinaryPack and DeltaByteArray. 
DeltaLengthByteArray uses DeltaBinaryPack, and DeltaByteArray uses 
DeltaLengthByteArray. So I think it's ok to testing them
   
   Besides, there're some other encodings: RleBoolean, Plain ..etc. Should we 
also testing them?



-- 
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]

Reply via email to