处理 SQL 中以“00”开头的字符串

Handle a string starting with "00" in SQL

我使用 Hadoop/hive,但在处理以“00”开头的字符串数据时遇到问题。

假设“00123”在 Hadoop table 中存储为 string。 我的问题是以下 2 个查询未按原样显示“00123”。而是显示“123”。

select id from DB.TABLE where id="00123" select cast(id as string) from DB.TABLE where id="00123"

我运行 Zeppelin 上面的查询。 谁能帮忙?不确定问题是由于 Hadoop 还是 Zeppelin。

此错误已在 ZEPPELIN-3701 中修复(缺少前几个 '0' 并且结果 table 失去数字准确性)

等待 0.8.1 版本发布。