VenuReddy2103 commented on a change in pull request #3772:
URL: https://github.com/apache/carbondata/pull/3772#discussion_r445475371



##########
File path: 
integration/spark/src/test/scala/org/apache/carbondata/geo/GeoTest.scala
##########
@@ -134,8 +133,31 @@ class GeoTest extends QueryTest with BeforeAndAfterAll 
with BeforeAndAfterEach {
         Row(116285807, 40084087)))
   }
 
-  test("test polygon query on table partitioned by timevalue column")
-  {
+  test("test block pruning for polygon query") {
+    createTable()
+    sql(s"insert into $table1 select 1575428400000,116285807,40084087")
+    sql(s"insert into $table1 select 1575428400000,116372142,40129503")
+    sql(s"insert into $table1 select 1575428400000,116187332,39979316")
+    sql(s"insert into $table1 select 1575428400000,116337069,39951887")
+    sql(s"insert into $table1 select 1575428400000,116359102,40154684")
+    sql(s"insert into $table1 select 1575428400000,116736367,39970323")
+    sql(s"insert into $table1 select 1575428400000,116362699,39942444")
+    sql(s"insert into $table1 select 1575428400000,116325378,39963129")
+    sql(s"insert into $table1 select 1575428400000,116302895,39930753")
+    sql(s"insert into $table1 select 1575428400000,116288955,39999101")
+    val df = sql(s"select longitude, latitude from $table1 where 
IN_POLYGON('116.321011 " +
+                 s"40.123503, 116.137676 39.947911, 116.560993 39.935276, 
116.321011 40.123503')")
+    assert(df.rdd.getNumPartitions == 6)
+    checkAnswer(df,

Review comment:
       Ok. Instead of making the Seq of rows with same rows in all testcases, 
have defined it once and used same in all the testcases.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to