revans2 commented on a change in pull request #29067:
URL: https://github.com/apache/spark/pull/29067#discussion_r453602842



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/InMemoryColumnarQuerySuite.scala
##########
@@ -474,12 +484,8 @@ class InMemoryColumnarQuerySuite extends QueryTest with 
SharedSparkSession {
 
   test("SPARK-22249: buildFilter should not throw exception when In contains 
an empty list") {
     val attribute = AttributeReference("a", IntegerType)()
-    val localTableScanExec = LocalTableScanExec(Seq(attribute), Nil)
-    val testRelation = InMemoryRelation(false, 1, MEMORY_ONLY, 
localTableScanExec, None,
-      LocalRelation(Seq(attribute), Nil))
-    val tableScanExec = InMemoryTableScanExec(Seq(attribute),
-      Seq(In(attribute, Nil)), testRelation)
-    assert(tableScanExec.partitionFilters.isEmpty)
+    val testSerializer = new TestCachedBatchSerializer(false, 1)
+    testSerializer.buildFilter(Seq(In(attribute, Nil)), Seq(attribute))

Review comment:
       I removed the assert because the refactoring moved that state into a 
location that is not easily accessible.  From reading the test and the comments 
around it the purpose of the test is to verify that the particular case did not 
result in an exception. The purpose of the assertion was to verify that the 
internal state was what they expected. I felt that the assert was unnecessary, 
but if you want me to add it back in I can refactor the code further and do so. 
 




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to