Skip to content

Commit

Permalink
use view
Browse files Browse the repository at this point in the history
  • Loading branch information
AngersZhuuuu committed Jun 7, 2020
1 parent 6d1b60e commit e28b084
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3497,17 +3497,10 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
}

test("SPARK-31670: Resolve Struct Field in Grouping Aggregate with same ExprId") {
withTable("t") {
sql(
"""CREATE TABLE t(
|a STRING,
|b INT,
|c STRUCT<row_id:INT,json_string:STRING>)
|USING ORC""".stripMargin)

withTempView("t") {
sql(
"""
|INSERT INTO TABLE t
|CREATE TEMPORARY VIEW t(a, b, c) AS
|SELECT * FROM VALUES
|('A', 1, NAMED_STRUCT('row_id', 1, 'json_string', '{"i": 1}')),
|('A', 2, NAMED_STRUCT('row_id', 2, 'json_string', '{"i": 1}')),
Expand Down

0 comments on commit e28b084

Please sign in to comment.