Description
In DataFrames filter operation,when giving float comparison with e (2.0e2) it is not converting the comparison constant as expected (200.0 in this case).
For example:
val df = sqlContext.createDataFrame(Seq(("a",1.0),("b",2.0),("c",3.0))) df.filter("_2 < 2.0e1").show()
+--+---+ |_1| _2| +--+---+ | a|1.0| +--+---+
It should return all the three records from the dataframe,but is return record which is less than 2.0.
It seems it is just comparing with the mantissa/coefficient.
On the other hand,sqlContext is handling the above case and giving the desired output.
df.resgisterTempTable("df") sqlContext.sql("select * from df where `_2` < 2.0e1").show()
+--+---+ |_1| _2| +--+---+ | a|1.0| | b|2.0| | c|3.0| +--+---+