emkornfield commented on a change in pull request #10716: URL: https://github.com/apache/arrow/pull/10716#discussion_r686489652
########## File path: go/parquet/internal/encoding/memo_table.go ########## @@ -0,0 +1,380 @@ +// 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 encoding + +import ( + "math" + "unsafe" + + "github.com/apache/arrow/go/arrow" + "github.com/apache/arrow/go/arrow/array" + "github.com/apache/arrow/go/arrow/memory" + "github.com/apache/arrow/go/parquet" + "github.com/apache/arrow/go/parquet/internal/hashing" +) + +//go:generate go run ../../../arrow/_tools/tmpl/main.go -i -data=physical_types.tmpldata memo_table_types.gen.go.tmpl + +// MemoTable interface that can be used to swap out implementations of the hash table +// used for handling dictionary encoding. Dictionary encoding is built against this interface +// to make it easy for code generation and changing implementations. +// +// Values should remember the order they are inserted to generate a valid dictionary index +type MemoTable interface { + // Reset drops everything in the table allowing it to be reused + Reset() + // Size returns the current number of unique values stored in the table + // including whether or not a null value has been passed in using GetOrInsertNull + Size() int Review comment: int is 32 bits here? does it pay to have errors returned for the insertion operations if they exceed that range? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org