hive 是否支持结构体中的可选字段
thrift 确实支持结构中的可选字段
struct Name {
1: string firstname,
2: optional string middlename,
3: string lastname,
}
,但是 hive 支持创建具有类似结构类型的表吗? 我检查了 hive 的教程,发现没有办法设置“可选”关键字。
thrift does support optional fields in struct
struct Name {
1: string firstname,
2: optional string middlename,
3: string lastname,
}
but does hive support to create a table with similar struct type, please?
I checked hive's tutorial and found no way to set 'optional' keyword.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Hive 支持 NULL 值。您可以定义一个包含三个字段的表:
中间名字段将包含 NULL,用于对应于一个人(我推测)没有中间名或中间名未知的情况的记录。
Hive supports NULL values. You can define a table with three fields:
The middlename field would contain NULLs for the records corresponding to the cases when a person (I presume) doesn't have a middle name or the middle name is not known.