Hive换行问题

时间:2016-05-24 14:34:37

标签: hive accumulo

我在accumulo表上有一个hive表(因为我们需要单元级安全性):

Client

如果我的值包含" / n"它与默认的hive line break属性冲突,该属性也是" / n"。

例如:

accumulo insert:CREATE TABLE testtable(rowid string, value string) STORED BY 'org.apache.hadoop.hive.accumulo.AccumuloStorageHandler' WITH SERDEPROPERTIES('accumulo.columns.mapping' = ':rowid,c:value') TBLPROPERTIES ('accumulo.table.name' = 'testtable');

hive select:insert 1 c value line\x0Abreak

你会得到两行而不是一行。

select rowid, value, row_number() over (order by null) as rank  from testtable;

有什么想法我怎么能避免这个?谢谢你的帮助!

1 个答案:

答案 0 :(得分:0)

这似乎非常出乎意料(作为AccumuloStorageHandler的作者),但也许我只是不知道Hive想要做的事情?

我在https://issues.apache.org/jira/secure/CreateIssue!default.jspa为Hive提交了一个JIRA问题。随意提及我,我可以尝试帮助编写测试并深入了解。