wayneguow commented on code in PR #46731:
URL: https://github.com/apache/spark/pull/46731#discussion_r1617205925
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/AlterTableTests.scala:
##########
@@ -432,11 +432,23 @@ trait AlterTableTests extends SharedSparkSession with
QueryErrorsBase {
withTable(t) {
sql(s"CREATE TABLE $t (id int) USING $v2Format")
- val exc = intercept[AnalysisException] {
- sql(s"ALTER TABLE $t ADD COLUMN point.z double")
- }
-
- assert(exc.getMessage.contains("Missing field point"))
+ val sqlText = s"ALTER TABLE $t ADD COLUMN point.z double"
Review Comment:
Here it is true that the parent column `point` does not exist, we give the
user an error message that `point` filed does not exist, is it already clear to
user? If he insists on using `id.z`, he will get an more explicit
`INVALID_FIELD_NAME`( Field name `id`.`z` is invalid: `id` is not a struct.
SQLSTATE: 42000) error.
--
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]