Skip to content
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

[Go] arrow.MapOf doesn't allow metadata to be specified for the underlying key and value fields #34186

Closed
lquerel opened this issue Feb 15, 2023 · 0 comments · Fixed by #34207

Comments

@lquerel
Copy link
Contributor

lquerel commented Feb 15, 2023

Describe the enhancement requested

The signature of MapType constructor is func MapOf(key, item DataType) *MapType. The field MapType.value is private and the pointer returned by MapType.ValueType doesn't give access to the fields of the underlying StructType.

I propose to add an additional constructor to specificy these metadata with the following signature:

func MapOfWithMetadata(
  keyDT DataType, 
  keyMetadata Metadata, 
  valueDT DataType, 
  valueMetadata Metadata,
) *MapType

Component(s)

Go

lquerel added a commit to lquerel/arrow that referenced this issue Feb 15, 2023
@zeroshade zeroshade added this to the 12.0.0 milestone Feb 15, 2023
zeroshade pushed a commit that referenced this issue Feb 15, 2023
@ zeroshade - issue #34186

The signature of MapType constructor is func MapOf(key, item DataType) *MapType. The field MapType.value is private and the pointer returned by MapType.ValueType doesn't give access to the fields of the underlying StructType.

I propose to add an additional constructor to specificy these metadata with the following signature:
```go
func MapOfWithMetadata(
  keyDT DataType, 
  keyMetadata Metadata, 
  valueDT DataType, 
  valueMetadata Metadata,
) *MapType
```
* Closes: #34186

Authored-by: querel <l.querel@f5.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
gringasalpastor pushed a commit to gringasalpastor/arrow that referenced this issue Feb 17, 2023
…4207)

@ zeroshade - issue apache#34186

The signature of MapType constructor is func MapOf(key, item DataType) *MapType. The field MapType.value is private and the pointer returned by MapType.ValueType doesn't give access to the fields of the underlying StructType.

I propose to add an additional constructor to specificy these metadata with the following signature:
```go
func MapOfWithMetadata(
  keyDT DataType, 
  keyMetadata Metadata, 
  valueDT DataType, 
  valueMetadata Metadata,
) *MapType
```
* Closes: apache#34186

Authored-by: querel <l.querel@f5.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
fatemehp pushed a commit to fatemehp/arrow that referenced this issue Feb 24, 2023
…4207)

@ zeroshade - issue apache#34186

The signature of MapType constructor is func MapOf(key, item DataType) *MapType. The field MapType.value is private and the pointer returned by MapType.ValueType doesn't give access to the fields of the underlying StructType.

I propose to add an additional constructor to specificy these metadata with the following signature:
```go
func MapOfWithMetadata(
  keyDT DataType, 
  keyMetadata Metadata, 
  valueDT DataType, 
  valueMetadata Metadata,
) *MapType
```
* Closes: apache#34186

Authored-by: querel <l.querel@f5.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants