jack86596 commented on a change in pull request #4231: URL: https://github.com/apache/carbondata/pull/4231#discussion_r750948163
########## File path: integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/primitiveTypes/FloatDataTypeTestCase.scala ########## @@ -47,12 +46,108 @@ class FloatDataTypeTestCase extends QueryTest with BeforeAndAfterAll { Seq(Row(6))) } + test("test col greater than equal literal") { + checkAnswer( + sql("SELECT ID FROM tfloat where rating >= 2.8"), + Seq(Row(6))) + } + + test("test literal greater than col") { + checkAnswer( + sql("SELECT ID FROM tfloat where 2.8 > rating"), + Seq(Row(1), Row(2), Row(3), Row(4), Row(5), Row(7), Row(8), Row(9), Row(10))) + } + + test("test literal greater than equal col") { + checkAnswer( + sql("SELECT ID FROM tfloat where 2.8 >= rating"), + Seq(Row(1), Row(2), Row(3), Row(4), Row(5), Row(7), Row(8), Row(9), Row(10))) + } + + test("test col less than literal") { + checkAnswer( + sql("SELECT ID FROM tfloat where rating < 2.8"), + Seq(Row(1), Row(2), Row(3), Row(4), Row(5), Row(7), Row(8), Row(9), Row(10))) + } + + test("test col less than equal literal") { + checkAnswer( + sql("SELECT ID FROM tfloat where rating <= 2.8"), + Seq(Row(1), Row(2), Row(3), Row(4), Row(5), Row(7), Row(8), Row(9), Row(10))) + } + + test("test literal less than col") { + checkAnswer( + sql("SELECT ID FROM tfloat where 2.8 < rating"), + Seq(Row(6))) + } + + test("test literal less than equal col") { + checkAnswer( + sql("SELECT ID FROM tfloat where 2.8 <= rating"), + Seq(Row(6))) + } + test("select row whose rating is 3.5 from tfloat") { checkAnswer( sql("SELECT ID FROM tfloat where rating=3.5"), Seq(Row(6))) } + test("test literal equal to col") { + checkAnswer( + sql("SELECT ID FROM tfloat where 3.5 = rating"), + Seq(Row(6))) + } + + test("test col not equal literal") { + checkAnswer( + sql("SELECT ID FROM tfloat where rating != 3.5"), + Seq(Row(1), Row(2), Row(3), Row(4), Row(5), Row(7), Row(8), Row(9), Row(10))) + } + + test("test literal not equal col") { Review comment: Done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@carbondata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org