Github user rahulforallp commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1414#discussion_r146222793
  
    --- Diff: 
integration/spark-common/src/main/scala/org/apache/spark/sql/test/util/QueryTest.scala
 ---
    @@ -58,6 +58,17 @@ class QueryTest extends PlanTest {
         }
       }
     
    +  /**
    +   * Runs the plan and counts the keyword in the answer
    +   * @param df the [[DataFrame]] to be executed
    +   * @param count expected count
    +   * @param keyword keyword to search
    +   */
    +  def checkExistenceCount(df: DataFrame, count: Long, keyword: String): 
Unit = {
    +    val outputs = df.collect().map(_.mkString).mkString
    +    assert(outputs.sliding(keyword.length).count(_ == keyword) == count)
    --- End diff --
    
    @jackylk  We can use === instead of assertEqual(available in junit) in 
Funsuite. I have replaced the same.


---

Reply via email to