Github user dongjoon-hyun commented on a diff in the pull request: https://github.com/apache/spark/pull/22788#discussion_r228770171 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala --- @@ -2856,6 +2856,21 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext { checkAnswer(sql("select 26393499451 / (1e6 * 1000)"), Row(BigDecimal("26.3934994510000"))) } } + + test("SPARK-25769 escape nested columns") { + import org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute + val sql1 = $"a.b".expr.asInstanceOf[UnresolvedAttribute].sql + assert(sql1 === "`a`.`b`") + + val sql2 = $"`a.b`".expr.asInstanceOf[UnresolvedAttribute].sql + assert(sql2 === "`a.b`") + + val sql3 = $"`a`.b".expr.asInstanceOf[UnresolvedAttribute].sql + assert(sql3 === "`a`.`b`") + + val sql4 = $"`a.b`.c".expr.asInstanceOf[UnresolvedAttribute].sql + assert(sql4 === "`a.b`.`c`") + } --- End diff -- Hi, @huaxingao . Can we move this test to `ColumnExpressionSuite`? I made a [PR](https://github.com/huaxingao/spark/pull/1) to you. Please review and merge.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org