[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-07 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/17152
  
Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-07 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/17152
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74169/
Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-07 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/17152
  
**[Test build #74169 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74169/testReport)**
 for PR 17152 at commit 
[`46da41e`](https://github.com/apache/spark/commit/46da41e2b74ef08945b6d147a182ad7940533ceb).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-07 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/17152
  
**[Test build #74169 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74169/testReport)**
 for PR 17152 at commit 
[`46da41e`](https://github.com/apache/spark/commit/46da41e2b74ef08945b6d147a182ad7940533ceb).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-07 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/17152
  
Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-07 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/17152
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74088/
Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-07 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/17152
  
**[Test build #74088 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74088/testReport)**
 for PR 17152 at commit 
[`f487af3`](https://github.com/apache/spark/commit/f487af3732045a1d461f8a8d0981931db4a4c47c).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-07 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/17152
  
**[Test build #74088 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74088/testReport)**
 for PR 17152 at commit 
[`f487af3`](https://github.com/apache/spark/commit/f487af3732045a1d461f8a8d0981931db4a4c47c).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-07 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/17152
  
@gatorsmile @nsyca Thank you for your comments! I've added the coverage for 
both `CREATE OR REPLACE VIEW` and `SubqueryExpression`s.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-06 Thread nsyca
Github user nsyca commented on the issue:

https://github.com/apache/spark/pull/17152
  
Going back to @gatorsmile 's question, does this fix cover the scenario 
below?

`sql("create or replace view v1 as select * from v2")`

If this is an existing problem and your PR does not cover it, would you 
intend to address it in this PR? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-06 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/17152
  
Hive report the error during alter view:
```
hive> CREATE VIEW v1 AS SELECT * FROM t1;
OK
Time taken: 0.556 seconds
hive> CREATE VIEW v2 AS SELECT * FROM v1;
OK
Time taken: 0.099 seconds
hive> ALTER VIEW v1 AS SELECT * FROM v2;
FAILED: SemanticException Recursive view default.v1 detected (cycle: 
default.v1 -> default.v2 -> default.v1).
hive> CREATE VIEW v3 AS SELECT * FROM v2;
OK
Time taken: 0.354 seconds
hive> ALTER VIEW v1 AS SELECT * FROM v3 JOIN v2;
FAILED: SemanticException Recursive view default.v1 detected (cycle: 
default.v1 -> default.v3 -> default.v2 -> default.v1).
```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-06 Thread cloud-fan
Github user cloud-fan commented on the issue:

https://github.com/apache/spark/pull/17152
  
When do other databases report this error? During view creating/alter or 
during view resolution?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-05 Thread gatorsmile
Github user gatorsmile commented on the issue:

https://github.com/apache/spark/pull/17152
  
Yeah. The temporary view does not have such an issue, because we did not 
change it. My typo. 

What I mean is `CREATE OR REPLACE VIEW`. `AlterViewAsCommand` does not 
cover that code path. : )


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-03 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/17152
  
@gatorsmile Currently we don't perform recursive resolution over a 
temporary view, so perhaps that won't trigger a cyclic view reference. For 
example:
```
scala> spark.sql("CREATE TEMPORARY VIEW v1 AS SELECT * FROM tab")
res3: org.apache.spark.sql.DataFrame = []

scala> spark.sql("CREATE TEMPORARY VIEW v2 AS SELECT * FROM v1")
res4: org.apache.spark.sql.DataFrame = []

scala> spark.sql("ALTER VIEW v1 AS SELECT * FROM v2")
res5: org.apache.spark.sql.DataFrame = []

scala> spark.sql("SELECT * FROM v1")
res6: org.apache.spark.sql.DataFrame = [a: int, b: string]
```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-03 Thread gatorsmile
Github user gatorsmile commented on the issue:

https://github.com/apache/spark/pull/17152
  
Based on our current impl of view, `createOrReplaceTempView` can still 
trigger the cyclic view reference. Right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-03 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/17152
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/73854/
Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-03 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/17152
  
Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-03 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/17152
  
**[Test build #73854 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/73854/testReport)**
 for PR 17152 at commit 
[`1bd0260`](https://github.com/apache/spark/commit/1bd02603fa24e6790994105cd47c8b55a4c1de40).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-03 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/17152
  
**[Test build #73854 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/73854/testReport)**
 for PR 17152 at commit 
[`1bd0260`](https://github.com/apache/spark/commit/1bd02603fa24e6790994105cd47c8b55a4c1de40).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark issue #17152: [SPARK-18389][SQL] Disallow cyclic view reference

2017-03-03 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/17152
  
cc @gatorsmile @hvanhovell @cloud-fan @nsyca 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org