[ 
https://issues.apache.org/jira/browse/SPARK-60192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wenchen Fan resolved SPARK-60192.
---------------------------------
    Fix Version/s: 4.4.0
       Resolution: Fixed

Issue resolved by pull request 59405
[https://github.com/apache/spark/pull/59405]

> Metric Views: Include supported YAML versions in "Invalid YAML version" error 
> message
> -------------------------------------------------------------------------------------
>
>                 Key: SPARK-60192
>                 URL: https://issues.apache.org/jira/browse/SPARK-60192
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.2.0
>            Reporter: Jacek Laskowski
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.4.0
>
>
> {noformat}
> scala> sql("""
>      | CREATE OR REPLACE VIEW metric_view
>      | WITH METRICS
>      | LANGUAGE YAML
>      | AS $$ version: 1.1 $$
>      | """)
> org.apache.spark.sql.AnalysisException: [INVALID_METRIC_VIEW_YAML] Failed to 
> parse metric view YAML: Invalid YAML version: 1.1 SQLSTATE: 42K0L
>   at 
> org.apache.spark.sql.errors.QueryCompilationErrors$.invalidMetricViewYamlError(QueryCompilationErrors.scala:2814)
>   at 
> org.apache.spark.sql.metricview.util.MetricViewPlanner$.parseYAML(MetricViewPlanner.scala:96)
>   at 
> org.apache.spark.sql.metricview.util.MetricViewPlanner$.planWrite(MetricViewPlanner.scala:37)
>   at 
> org.apache.spark.sql.execution.command.MetricViewHelper$.analyzeMetricViewText(metricViewCommands.scala:195)
>   at 
> org.apache.spark.sql.execution.command.CreateMetricViewCommand.createMetricViewInSessionCatalog(metricViewCommands.scala:74)
>   at 
> org.apache.spark.sql.execution.command.CreateMetricViewCommand.run(metricViewCommands.scala:50)
> ...{noformat}
> It'd be helpful if the error message said what YAML versions are supported 
> (currently 0.1 only).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to