[jira] [Commented] (SPARK-30118) ALTER VIEW QUERY does not work
[ https://issues.apache.org/jira/browse/SPARK-30118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16988078#comment-16988078 ] John Zhuge commented on SPARK-30118: [~cltlfcjin] Thanks for the comment. Do you know which commit fixed the issue? > ALTER VIEW QUERY does not work > -- > > Key: SPARK-30118 > URL: https://issues.apache.org/jira/browse/SPARK-30118 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 3.0.0 >Reporter: John Zhuge >Priority: Major > > `ALTER VIEW AS` does not change view query. It leaves the view in a corrupted > state. > {code:sql} > spark-sql> CREATE VIEW jzhuge.v1 AS SELECT 'foo' foo1; > spark-sql> SHOW CREATE TABLE jzhuge.v1; > CREATE VIEW `jzhuge`.`v1`(foo1) AS > SELECT 'foo' foo1 > spark-sql> ALTER VIEW jzhuge.v1 AS SELECT 'foo' foo2; > spark-sql> SHOW CREATE TABLE jzhuge.v1; > CREATE VIEW `jzhuge`.`v1`(foo1) AS > SELECT 'foo' foo1 > spark-sql> TABLE jzhuge.v1; > Error in query: Attribute with name 'foo2' is not found in '(foo1)';; > SubqueryAlias `jzhuge`.`v1` > +- View (`jzhuge`.`v1`, [foo1#33]) >+- Project [foo AS foo1#34] > +- OneRowRelation > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-30118) ALTER VIEW QUERY does not work
[ https://issues.apache.org/jira/browse/SPARK-30118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16987491#comment-16987491 ] Lantao Jin commented on SPARK-30118: I think it had been fixed in latest version. Could you try it in 2.4 or 3.0.0-preview? > ALTER VIEW QUERY does not work > -- > > Key: SPARK-30118 > URL: https://issues.apache.org/jira/browse/SPARK-30118 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 3.0.0 >Reporter: John Zhuge >Priority: Major > > `ALTER VIEW AS` does not change view query. It leaves the view in a corrupted > state. > {code:sql} > spark-sql> CREATE VIEW jzhuge.v1 AS SELECT 'foo' foo1; > spark-sql> SHOW CREATE TABLE jzhuge.v1; > CREATE VIEW `jzhuge`.`v1`(foo1) AS > SELECT 'foo' foo1 > spark-sql> ALTER VIEW jzhuge.v1 AS SELECT 'foo' foo2; > spark-sql> SHOW CREATE TABLE jzhuge.v1; > CREATE VIEW `jzhuge`.`v1`(foo1) AS > SELECT 'foo' foo1 > spark-sql> TABLE jzhuge.v1; > Error in query: Attribute with name 'foo2' is not found in '(foo1)';; > SubqueryAlias `jzhuge`.`v1` > +- View (`jzhuge`.`v1`, [foo1#33]) >+- Project [foo AS foo1#34] > +- OneRowRelation > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-30118) ALTER VIEW QUERY does not work
[ https://issues.apache.org/jira/browse/SPARK-30118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16987429#comment-16987429 ] John Zhuge commented on SPARK-30118: I am running Spark master with Hive 1.2.1. Same issue in Spark 2.3. > ALTER VIEW QUERY does not work > -- > > Key: SPARK-30118 > URL: https://issues.apache.org/jira/browse/SPARK-30118 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 3.0.0 >Reporter: John Zhuge >Priority: Major > > `ALTER VIEW AS` does not change view query. It leaves the view in a corrupted > state. > {code:sql} > spark-sql> CREATE VIEW jzhuge.v1 AS SELECT 'foo' foo1; > spark-sql> SHOW CREATE TABLE jzhuge.v1; > CREATE VIEW `jzhuge`.`v1`(foo1) AS > SELECT 'foo' foo1 > spark-sql> ALTER VIEW jzhuge.v1 AS SELECT 'foo' foo2; > spark-sql> SHOW CREATE TABLE jzhuge.v1; > CREATE VIEW `jzhuge`.`v1`(foo1) AS > SELECT 'foo' foo1 > spark-sql> TABLE jzhuge.v1; > Error in query: Attribute with name 'foo2' is not found in '(foo1)';; > SubqueryAlias `jzhuge`.`v1` > +- View (`jzhuge`.`v1`, [foo1#33]) >+- Project [foo AS foo1#34] > +- OneRowRelation > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-30118) ALTER VIEW QUERY does not work
[ https://issues.apache.org/jira/browse/SPARK-30118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16987428#comment-16987428 ] John Zhuge commented on SPARK-30118: {code:java} spark-sql> DESC FORMATTED jzhuge.v1; foo1string NULL # Detailed Table Information Databasejzhuge Table v1 Owner jzhuge Created TimeTue Dec 03 17:53:59 PST 2019 Last Access UNKNOWN Created By Spark 3.0.0-SNAPSHOT TypeVIEW View Text SELECT 'foo' foo1 View Original Text SELECT 'foo' foo1 View Default Database default View Query Output Columns [foo2] Table Properties[transient_lastDdlTime=1575424439, view.query.out.col.0=foo2, view.query.out.numCols=1, view.default.database=default] Locationfile://tmp/jzhuge/v1 Serde Library org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe InputFormat org.apache.hadoop.mapred.SequenceFileInputFormat OutputFormatorg.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat Storage Properties [serialization.format=1] {code} > ALTER VIEW QUERY does not work > -- > > Key: SPARK-30118 > URL: https://issues.apache.org/jira/browse/SPARK-30118 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 3.0.0 >Reporter: John Zhuge >Priority: Major > > `ALTER VIEW AS` does not change view query. It leaves the view in a corrupted > state. > {code:sql} > spark-sql> CREATE VIEW jzhuge.v1 AS SELECT 'foo' foo1; > spark-sql> SHOW CREATE TABLE jzhuge.v1; > CREATE VIEW `jzhuge`.`v1`(foo1) AS > SELECT 'foo' foo1 > spark-sql> ALTER VIEW jzhuge.v1 AS SELECT 'foo' foo2; > spark-sql> SHOW CREATE TABLE jzhuge.v1; > CREATE VIEW `jzhuge`.`v1`(foo1) AS > SELECT 'foo' foo1 > spark-sql> TABLE jzhuge.v1; > Error in query: Attribute with name 'foo2' is not found in '(foo1)';; > SubqueryAlias `jzhuge`.`v1` > +- View (`jzhuge`.`v1`, [foo1#33]) >+- Project [foo AS foo1#34] > +- OneRowRelation > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org