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

    https://github.com/apache/spark/pull/19044#discussion_r135108214
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala
 ---
    @@ -19,12 +19,30 @@ package org.apache.spark.sql.catalyst
     
     import java.sql.Timestamp
     
    -import org.apache.spark.sql.catalyst.dsl.expressions._
    -import org.apache.spark.sql.catalyst.expressions.{If, Literal, 
SpecifiedWindowFrame, TimeAdd,
    -  TimeSub, WindowSpecDefinition}
    +import org.apache.spark.sql.QueryTest
    +import org.apache.spark.sql.catalyst.expressions._
    +import org.apache.spark.sql.hive.test.TestHiveSingleton
     import org.apache.spark.unsafe.types.CalendarInterval
     
    -class ExpressionSQLBuilderSuite extends SQLBuilderTest {
    +class ExpressionSQLBuilderSuite extends QueryTest with TestHiveSingleton {
    +  protected def checkSQL(e: Expression, expectedSQL: String): Unit = {
    +    val actualSQL = e.sql
    +    try {
    +      assert(actualSQL === expectedSQL)
    +    } catch {
    +      case cause: Throwable =>
    +        fail(
    +          s"""Wrong SQL generated for the following expression:
    +             |
    +             |${e.prettyName}
    +             |
    +             |$cause
    +           """.stripMargin)
    +    }
    +  }
    +
    +  import org.apache.spark.sql.catalyst.dsl.expressions._
    --- End diff --
    
    Why moving here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to