cloud-fan opened a new pull request, #57284: URL: https://github.com/apache/spark/pull/57284
### What changes were proposed in this pull request? Followup to https://github.com/apache/spark/pull/56827. That PR registered the `MISSING_CLAUSES_FOR_OPERATION` error class, which is thrown by the metric view parser (`SparkSqlAstBuilder.visitCreateMetricView`) with the `operation` value `"METRIC VIEW CREATION"`. This PR changes the two metric-view call sites (missing `WITH METRICS` and missing `LANGUAGE`) to use `"CREATE METRIC VIEW"` instead, and updates the two corresponding test assertions in `QueryParsingErrorsSuite`. ### Why are the changes needed? The `operation` argument of `MISSING_CLAUSES_FOR_OPERATION` (and the sibling `UNSUPPORTED_CLAUSES_FOR_OPERATION`) is, everywhere else, the imperative DDL statement form that matches the SQL the user actually wrote, e.g. `CREATE PROCEDURE`, `CREATE TABLE`. The metric-view value `"METRIC VIEW CREATION"` is a nominalized phrasing that is inconsistent with the rest of the error class. Standardizing on `"CREATE METRIC VIEW"` makes the operation name consistent and matches the statement the user typed (`CREATE VIEW ... WITH METRICS`). ### Does this PR introduce _any_ user-facing change? Yes. The `operation` value in the `MISSING_CLAUSES_FOR_OPERATION` error message for a metric view with a missing clause changes from `METRIC VIEW CREATION` to `CREATE METRIC VIEW`. This error class is unreleased (added in the same development line as the referenced PR). ### How was this patch tested? Updated the two existing unit tests in `QueryParsingErrorsSuite` that assert the `operation` parameter; they parse a `CREATE VIEW ... WITH METRICS` statement missing a required clause and verify the emitted operation name. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) -- 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]
