dongjoon-hyun commented on code in PR #38823:
URL: https://github.com/apache/spark/pull/38823#discussion_r1116498787
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -1539,6 +1540,49 @@ class DataSourceV2SQLSuiteV1Filter
)
}
}
+ // Respects case sensitivity when resolving
+ withSQLConf(SQLConf.CASE_SENSITIVE.key -> "true") {
+ withTable(s"testcat.$tblName") {
+ sql(s"CREATE TABLE testcat.$tblName(" +
+ s"a INT, b INT GENERATED ALWAYS AS (B + 1), B INT) USING foo")
+
assert(catalog("testcat").asTableCatalog.tableExists(Identifier.of(Array(),
tblName)))
+ }
+ }
+
+ // Generated column can't reference other generated columns
+ checkUnsupportedGenerationExpression(
+ "c + 1",
+ "generation expression cannot reference another generated column",
+ customTableDef = Some(
+ s"CREATE TABLE testcat.$tblName(a INT, " +
+ s"b INT GENERATED ALWAYS AS (c + 1), c INT GENERATED ALWAYS AS (a +
1)) USING foo"
Review Comment:
ditto. `s"` -> `"`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]