zeroshade commented on code in PR #2399:
URL: https://github.com/apache/iceberg-go/pull/2399#discussion_r4470527195


##########
go.mod:
##########
@@ -39,12 +39,14 @@ require (
        github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
        github.com/geoarrow/geoarrow-go v0.0.0-20261005150217-fc2b33c3141d
        github.com/go-sql-driver/mysql v1.10.1
+       github.com/golang/protobuf v1.5.4
        github.com/google/go-cmp v0.7.0
        github.com/google/uuid v1.6.0
        github.com/hashicorp/golang-lru/v2 v2.0.7
        github.com/klauspost/compress v1.20.3
        github.com/pierrec/lz4/v4 v4.1.33
        github.com/pterm/pterm v0.12.84
+       github.com/scritchley/orc v0.0.0-20210513144143-06dddf1ad665

Review Comment:
   `scritchley/orc` has had no commits since 2021-05-13 (15 open issues). 
Taking it on for a data-path reader means owning its bugs, as 
`orc_date_guard.go` already shows.



##########
table/internal/orc_date_guard.go:
##########
@@ -0,0 +1,83 @@
+// 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 internal
+
+import (
+       "fmt"
+       "io"
+
+       "github.com/apache/iceberg-go"
+       iceio "github.com/apache/iceberg-go/io"
+       "github.com/scritchley/orc"
+       orcpb "github.com/scritchley/orc/proto"
+       "google.golang.org/protobuf/proto"
+       "google.golang.org/protobuf/protoadapt"
+)
+
+// The decoder loses date nulls. A missing PRESENT stream means every date
+// value in that stripe is non-null and may be read safely.

Review Comment:
   Because of this library bug, any ORC date column that may contain nulls is 
rejected, and Spark- and Hive-written date columns usually can.



##########
go.mod:
##########
@@ -39,12 +39,14 @@ require (
        github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
        github.com/geoarrow/geoarrow-go v0.0.0-20261005150217-fc2b33c3141d
        github.com/go-sql-driver/mysql v1.10.1
+       github.com/golang/protobuf v1.5.4

Review Comment:
   This adds the deprecated `github.com/golang/protobuf` as a direct 
dependency; `google.golang.org/protobuf` is already available.



##########
table/internal/interfaces.go:
##########
@@ -42,8 +42,10 @@ func GetFile(ctx context.Context, fs iceio.IO, dataFile 
iceberg.DataFile, isPosD
                        fs:   fs,
                        file: dataFile,
                }, nil
+       case iceberg.OrcFile:

Review Comment:
   With #2402 also merged, `timestamptz`, nullable `date` and map columns 
written through `write.format.default=orc` all fail to scan here. The two ORC 
PRs should agree on which types are supported.



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

Reply via email to