为什么没有得到比较的刺痛?如何使用spark过滤Hive中的记录
我有我的输入为 -
+-------+
| y|
+-------+
| ""no""|
| ""no""|
| ""no""|
|""yes""|
| ""no""|
| ""no""|
| ""no""|
| ""no""|
|""yes""|
| ""no""|
| ""no""|
| ""no""|
| ""no""|
|""yes""|
| ""no""|
| ""no""|
+-------+
而且我querying-
sqlContext.sql("select count(y) from dummy where y='yes'").show()
,输出为 -
+---+
|_c0|
+---+
| 0|
+---+
y
被声明为字符串类型的DDL
如果已经使用'.replaceAll( “\” \ “”, “”)'早:d – philantrovert