You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/10/21 21:14:08 UTC
[GitHub] [iceberg] ismailsimsek opened a new issue #3344: How to get subfields of Types.NestedField
ismailsimsek opened a new issue #3344:
URL: https://github.com/apache/iceberg/issues/3344
what is the correct way to get sub fields of `Types.NestedField` ?
its type is struct and i cant see any method to get its sub fields. only the rot node/itself is accessible.
i have following schema and need to recursively access each field including sub fields `i` and `f`
```
new Schema(
optional(1, "bag", ListType.ofOptional(2, BooleanType.get())),
optional(3, "map", MapType.ofOptional(4, 5, StringType.get(), DoubleType.get())),
optional(6, "tuple",
StructType.of(
optional(7, "i", IntegerType.get()),
optional(8, "f", FloatType.get())
)
)
)
```
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] ismailsimsek commented on issue #3344: How to get subfields of Types.NestedField
Posted by GitBox <gi...@apache.org>.
ismailsimsek commented on issue #3344:
URL: https://github.com/apache/iceberg/issues/3344#issuecomment-949751907
solved it, converted `NestedField` to `StructType` like below
```
Types.NestedField field
field.type().asStructType() -- converts field to Types.StructType
field.type().asStructType().fields() -- returns its fields
```
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] ismailsimsek closed issue #3344: How to get subfields of Types.NestedField
Posted by GitBox <gi...@apache.org>.
ismailsimsek closed issue #3344:
URL: https://github.com/apache/iceberg/issues/3344
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org