-
Notifications
You must be signed in to change notification settings - Fork 4.2k
GH-43624: [Go] Add JSON/UUID extension types, extend arrow -> parquet logical type mapping #43679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7934998
move uuid to extensions dir
joellubi 91e9475
cleanup exports and validate interface
joellubi 476ae68
add failing test for custom logical type
joellubi 77a5289
impl custom logical type, refactor fieldToNode, make logicaltype poin…
joellubi a3b4e1f
auto-register canonical extension types
joellubi 3015937
make sure extensions properly reregistered in tests
joellubi 25c7645
add json canonical extension type
joellubi f021841
custom parquet logicaltype for json
joellubi 0ec706f
add godoc
joellubi 2b1389a
update extension type impl status
joellubi 2b4254f
incorporate review comments
joellubi c2592db
move interface to pqarrow
joellubi 797e253
add appendbytes method
joellubi d13c852
cleanup + add test for json marshaling
joellubi 5bbd28b
remove interface definition from extensions
joellubi 228d234
cleanup interface impl comments
joellubi dbf4ebc
update implementation status for c++
joellubi af11dad
add godoc comment
joellubi 4ca87a2
fixes from review comments
joellubi 748a404
clarify JSONArray methods with comments
joellubi 8168be7
impl review comments
joellubi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| // 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 extensions | ||
|
|
||
| import ( | ||
| "github.com/apache/arrow/go/v18/arrow" | ||
| "github.com/apache/arrow/go/v18/parquet/schema" | ||
| ) | ||
|
|
||
| var canonicalExtensionTypes = []arrow.ExtensionType{ | ||
| &Bool8Type{}, | ||
| &UUIDType{}, | ||
| &OpaqueType{}, | ||
| &JSONType{}, | ||
| } | ||
|
|
||
| func init() { | ||
| for _, extType := range canonicalExtensionTypes { | ||
| if err := arrow.RegisterExtensionType(extType); err != nil { | ||
| panic(err) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // CustomParquetType is an interface that Arrow ExtensionTypes may implement | ||
| // to specify the target LogicalType to use when converting to Parquet. | ||
| // | ||
| // The PrimitiveType is not configurable, and is determined by a fixed mapping from | ||
| // the extension's StorageType to a Parquet type (see getParquetType in pqarrow source). | ||
| type CustomParquetType interface { | ||
| ParquetLogicalType() schema.LogicalType | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.