@@ -22,7 +22,9 @@ import java.math.MathContext
2222import java .sql .{Date , Timestamp }
2323
2424import org .apache .spark .{AccumulatorSuite , SparkException }
25- import org .apache .spark .sql .catalyst .plans .logical .Project
25+ import org .apache .spark .sql .catalyst .analysis .UnresolvedException
26+ import org .apache .spark .sql .catalyst .expressions .SortOrder
27+ import org .apache .spark .sql .catalyst .plans .logical .Aggregate
2628import org .apache .spark .sql .catalyst .util .StringUtils
2729import org .apache .spark .sql .execution .aggregate
2830import org .apache .spark .sql .execution .joins .{BroadcastHashJoinExec , CartesianProductExec , SortMergeJoinExec }
@@ -2308,18 +2310,6 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext {
23082310 }
23092311 }
23102312
2311- test(" data source table created in InMemoryCatalog should guarantee resolving consistency" ) {
2312- val table = " tbl"
2313- withTable(" tbl" ) {
2314- sql(" CREATE TABLE tbl(i INT, j STRING) USING parquet" )
2315- val tableIdent = spark.sessionState.sqlParser.parseTableIdentifier(table)
2316- val relation = spark.sessionState.catalog.lookupRelation(tableIdent)
2317- val expr = relation.resolve(" i" )
2318- val plan = Dataset .ofRows(spark, Project (Seq (expr), relation))
2319- plan.queryExecution.assertAnalyzed()
2320- }
2321- }
2322-
23232313 test(" Eliminate noop ordinal ORDER BY" ) {
23242314 withSQLConf(SQLConf .ORDER_BY_ORDINAL .key -> " true" ) {
23252315 val plan1 = sql(" SELECT 1.0, 'abc', year(current_date()) ORDER BY 1, 2, 3" )
0 commit comments