cloud-fan commented on code in PR #36896: URL: https://github.com/apache/spark/pull/36896#discussion_r899711639
########## sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala: ########## @@ -401,6 +401,24 @@ class QueryCompilationErrorsSuite ) } + test("UNRESOLVED_MAP_KEY: string type literal should be quoted") { + checkAnswer(sql("select m['a'] from (select map('a', 'b') as m, 'aa' as aa)"), Row("b")) + checkErrorClass( + exception = intercept[AnalysisException] { + sql("select m[a] from (select map('a', 'b') as m, 'aa' as aa)") Review Comment: In `CheckAnalysis`, how can we distinguish `m.a` and `m[a]`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org