You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/03/30 13:18:25 UTC
[GitHub] [arrow-rs] tustvold opened a new issue, #3982: Prevent UnionArray with Repeated Type IDs
tustvold opened a new issue, #3982:
URL: https://github.com/apache/arrow-rs/issues/3982
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
<!--
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*)
-->
Currently `DataType::Union` has no protection against the same type ID appearing multiple times in its `DataType`.
**Describe the solution you'd like**
<!--
A clear and concise description of what you want to happen.
-->
We should probably validate that the `type_ids` are unique, and prevent constructing an invalid `DataType`
**Describe alternatives you've considered**
<!--
A clear and concise description of any alternative solutions or features you've considered.
-->
We could not do this, much like currently permit invalid `DataType::Decimal` #2362
**Additional context**
<!--
Add any other context or screenshots about the feature request here.
-->
--
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-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] tustvold commented on issue #3982: Prevent UnionArray with Repeated Type IDs
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #3982:
URL: https://github.com/apache/arrow-rs/issues/3982#issuecomment-1517888364
`label_issue.py` automatically added labels {'parquet'} from #3981
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] tustvold closed issue #3982: Prevent UnionArray with Repeated Type IDs
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #3982: Prevent UnionArray with Repeated Type IDs
URL: https://github.com/apache/arrow-rs/issues/3982
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] tustvold commented on issue #3982: Prevent UnionArray with Repeated Type IDs
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #3982:
URL: https://github.com/apache/arrow-rs/issues/3982#issuecomment-1505667134
> Should we guarantee that typeid is unsigned
The arrow format specifies the following - https://arrow.apache.org/docs/format/Columnar.html#union-layout
> A buffer of 8-bit signed integers. Each type in the union has a corresponding type id whose values are found in this buffer. A union with more than 127 possible types can be modeled as a union of unions.
So they should be signed integers, but never negative :sweat_smile:. Most likely this was originally a workaround for Java
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] tustvold commented on issue #3982: Prevent UnionArray with Repeated Type IDs
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #3982:
URL: https://github.com/apache/arrow-rs/issues/3982#issuecomment-1517888306
`label_issue.py` automatically added labels {'arrow'} from #4070
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] Weijun-H commented on issue #3982: Prevent UnionArray with Repeated Type IDs
Posted by "Weijun-H (via GitHub)" <gi...@apache.org>.
Weijun-H commented on issue #3982:
URL: https://github.com/apache/arrow-rs/issues/3982#issuecomment-1505663679
Should we guarantee that `typeid` is unsigned? The current implementation does not guarantee it.
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] Weijun-H commented on issue #3982: Prevent UnionArray with Repeated Type IDs
Posted by "Weijun-H (via GitHub)" <gi...@apache.org>.
Weijun-H commented on issue #3982:
URL: https://github.com/apache/arrow-rs/issues/3982#issuecomment-1505611256
Could I pick this ticket up?
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] tustvold commented on issue #3982: Prevent UnionArray with Repeated Type IDs
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #3982:
URL: https://github.com/apache/arrow-rs/issues/3982#issuecomment-1505631399
Sure, as the maximum id is 127, you can probably just use an `u128` bitset to check for duplicates
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org