【发布时间】:2017-06-29 11:00:14
【问题描述】:
为什么没有比较刺痛?
我的输入是 -
+-------+
| y|
+-------+
| ""no""|
| ""no""|
| ""no""|
|""yes""|
| ""no""|
| ""no""|
| ""no""|
| ""no""|
|""yes""|
| ""no""|
| ""no""|
| ""no""|
| ""no""|
|""yes""|
| ""no""|
| ""no""|
+-------+
我正在查询-
sqlContext.sql("select count(y) from dummy where y='yes'").show()
输出是 -
+---+
|_c0|
+---+
| 0|
+---+
y 在 DDL 中被声明为字符串类型
【问题讨论】:
-
早应该使用
.replaceAll("\"\"", ""):D
标签: apache-spark hive apache-spark-sql hiveql