MagicBoost commented on code in PR #39497:
URL: https://github.com/apache/arrow/pull/39497#discussion_r1444200146
##########
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)},
Review Comment:
Strictly speaking this is not necessary,I just copy the previous test and
want to add some simple tests on nested formats.
##########
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:
I don't get it, I have already used these encoders testing nulls encoding.
--
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]