zeroshade commented on a change in pull request #11146:
URL: https://github.com/apache/arrow/pull/11146#discussion_r725164081



##########
File path: go/parquet/file/column_reader.go
##########
@@ -0,0 +1,542 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package file
+
+import (
+       "github.com/apache/arrow/go/arrow/bitutil"
+       "github.com/apache/arrow/go/arrow/memory"
+       "github.com/apache/arrow/go/parquet"
+       "github.com/apache/arrow/go/parquet/internal/encoding"
+       "github.com/apache/arrow/go/parquet/internal/encryption"
+       format "github.com/apache/arrow/go/parquet/internal/gen-go/parquet"
+       "github.com/apache/arrow/go/parquet/internal/utils"
+       "github.com/apache/arrow/go/parquet/schema"
+       "golang.org/x/xerrors"
+)
+
+const (
+       // 4 MB is the default maximum page header size
+       defaultMaxPageHeaderSize = 4 * 1024 * 1024
+       // 16 KB is the default expected page header size
+       defaultPageHeaderSize = 16 * 1024
+)
+
+//go:generate go run ../../arrow/_tools/tmpl/main.go -i 
-data=../internal/encoding/physical_types.tmpldata 
column_reader_types.gen.go.tmpl
+
+func isDictIndexEncoding(e format.Encoding) bool {
+       return e == format.Encoding_RLE_DICTIONARY || e == 
format.Encoding_PLAIN_DICTIONARY
+}
+
+func colHasSpacedValues(c *schema.Column) bool {
+       if c.MaxRepetitionLevel() > 0 {
+               // repeated + flat case

Review comment:
       You are absolutely correct that the comment is copy pasted from the C++ 
implementation haha. As for why repeated isn't valid here, it's because 
repeated columns can contain null values which would represent an entire null 
list or a null inside of a list, and if it were non-nullable, it would be a 
node beneath the repeated node? Wanna make sure my thoughts are correct before 
I add it as a comment :smile:




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