admin管理员组文章数量:1393110
I know that using LogicalTypeAnnotation
it is possible to create an ENUM using enumType()
(e.g., .apache.parquet/parquet-column/1.15.0//apache/parquet/schema/LogicalTypeAnnotation.html#enumType--)
But how to populate the variable with constants using the Java API?
The best I could figure out is:
LogicalTypeAnnotation.EnumLogicalTypeAnnotation some_enum = LogicalTypeAnnotation.enumType()
OriginalType[] enum_arr = some_enum.toOriginalType().values();
// convert to list to add constants
List<OriginalType> final_populated_enum_list = Arrays.asList(enum_arr);
final_populated_enum_list.add(SOME_ENUM_CONSTANT);
//convert back to array
...
is it through .apache.parquet.format Enum EnumType._Fields
(e.g., .apache.parquet/parquet-format-structures/latest/index.html
)?
which one is correct? is there a better approach?
本文标签: How to create an ENUM variable in ParquetStack Overflow
版权声明:本文标题:How to create an ENUM variable in Parquet? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744741381a2622627.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论