viirya commented on a change in pull request #24179: [SPARK-27241][SQL] Support
map_keys in SelectedField
URL: https://github.com/apache/spark/pull/24179#discussion_r268177885
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/SelectedFieldSuite.scala
##########
@@ -436,10 +526,19 @@ class SelectedFieldSuite extends SparkFunSuite with
BeforeAndAfterAll {
}
}
+ val conf = new SQLConf().copy(SQLConf.CASE_SENSITIVE -> true)
+ val catalog = new SessionCatalog(new InMemoryCatalog,
FunctionRegistry.builtin, conf)
+ val analyzer = {
+ catalog.createDatabase(
+ CatalogDatabase("default", "", new URI("loc"), Map.empty),
+ ignoreIfExists = false)
+ new Analyzer(catalog, conf)
+ }
+
private def unapplySelect(expr: String, relation: LocalRelation) = {
val parsedExpr = parseAsCatalystExpression(Seq(expr)).head
val select = relation.select(parsedExpr)
- val analyzed = select.analyze
+ val analyzed = analyzer.execute(select)
Review comment:
ok.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]