[GitHub] spark issue #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-28 Thread yhuai
Github user yhuai commented on the issue:

https://github.com/apache/spark/pull/16233
  
Seems it is good to know what issues need to be addressed before we can 
switch to this new approach. 


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-28 Thread yhuai
Github user yhuai commented on the issue:

https://github.com/apache/spark/pull/16233
  
Changes look good to me. @gatorsmile @hvanhovell what do you think?


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-28 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-28 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/70677/
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-28 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #70677 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/70677/testReport)**
 for PR 16233 at commit 
[`97751f5`](https://github.com/apache/spark/commit/97751f5c09611072892a7997c33a91beebf969cc).
 * 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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-28 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #70677 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/70677/testReport)**
 for PR 16233 at commit 
[`97751f5`](https://github.com/apache/spark/commit/97751f5c09611072892a7997c33a91beebf969cc).


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-27 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-27 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/70639/
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-27 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #70639 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/70639/testReport)**
 for PR 16233 at commit 
[`bed7702`](https://github.com/apache/spark/commit/bed7702258a6e05f6d74c9e29bd54adccdd4ca51).
 * 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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-27 Thread SparkQA
Github user SparkQA commented on the issue:

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


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-27 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
Merged build finished. Test FAILed.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-27 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

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


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-27 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #70638 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/70638/testReport)**
 for PR 16233 at commit 
[`3d1d1d4`](https://github.com/apache/spark/commit/3d1d1d47495a2c6291887b3db27a9fc7bc238c8d).
 * This patch **fails Scala style 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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-27 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #70638 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/70638/testReport)**
 for PR 16233 at commit 
[`3d1d1d4`](https://github.com/apache/spark/commit/3d1d1d47495a2c6291887b3db27a9fc7bc238c8d).


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-26 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/16233
  
@yhuai @hvanhovell @cloud-fan @gatorsmile Could you please review this PR 
when you have time? Thanks!


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/70610/
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #70610 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/70610/consoleFull)**
 for PR 16233 at commit 
[`38d2d82`](https://github.com/apache/spark/commit/38d2d8298919b718dab3e0c16a7084a0b1f323f4).
 * This patch passes all tests.
 * This patch **does not merge cleanly**.
 * This patch adds the following public classes _(experimental)_:
  * `case class View(`


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/70611/
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #70611 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/70611/testReport)**
 for PR 16233 at commit 
[`bdab3f4`](https://github.com/apache/spark/commit/bdab3f4ae0f9ae61d6b233b5f007bff345096bb6).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds the following public classes _(experimental)_:
  * `case class View(`


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-26 Thread yhuai
Github user yhuai commented on the issue:

https://github.com/apache/spark/pull/16233
  
> We can make ResolveRelations View aware, and make it keep track of the 
default databases (plural - in case of nested views). The default database will 
be the one of the last seen parent view. This approach makes is trivial to 
limit the depth of nested views (which might be needed at some point), or we 
can make this only resolve one layer of nested views at a time and use the 
analyzer's maxIterations as an implicit limit.

Yea. This seems the easiest way to achieve what we need. I am good with 
this approach.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-26 Thread SparkQA
Github user SparkQA commented on the issue:

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


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #70610 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/70610/consoleFull)**
 for PR 16233 at commit 
[`38d2d82`](https://github.com/apache/spark/commit/38d2d8298919b718dab3e0c16a7084a0b1f323f4).


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-25 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/16233
  
I'm working on the last option approach, I hope I could finish that in one 
or two more days.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-24 Thread gatorsmile
Github user gatorsmile commented on the issue:

https://github.com/apache/spark/pull/16233
  
I also like the last option that is based on local states/variables, 
especially when we supporting `spark.sql.hive.thriftServer.singleSession`. 
Here, the disadvantages of session/analyzer-scoped variables/states outweigh 
the convenience.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-23 Thread cloud-fan
Github user cloud-fan commented on the issue:

https://github.com/apache/spark/pull/16233
  
I am also in favor of the last option, @yhuai shall we go with it?


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-22 Thread hvanhovell
Github user hvanhovell commented on the issue:

https://github.com/apache/spark/pull/16233
  
@nsyca we actually support a 2-part name (look at TableIdentifier). You 
don't have to define the database. We have the concept of a `currentDatabase` 
in the `SessionCatalog`, and use that to resolve non-temporary objects 
(functions/tables/views). For the new view approach 
(non-cannocalizing/non-materializing ~> lazy), we need to capture the current 
database when the view is created (simple), and use that when the view is 
resolve (hard).

You are correctly describing the issue at hand, and the solution also works 
(it is much like the second solution I previously posted). The major issue with 
this solution, is that it assumes session isolation. For performance reasons we 
allow users to share a session in thrift server (this is hidden behind a flag), 
if they do, this solution might cause some really odd bugs if two or more users 
have their queries analyzed at the same time.

BTW: We will probably change to an 3-part/n-part name as soon as Catalog 
federation comes into play.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-22 Thread nsyca
Github user nsyca commented on the issue:

https://github.com/apache/spark/pull/16233
  
@hvanhovell: Would the issue of set/reset currentDB be resolved if we 
support a table/view as a 2-part name? The 2-part name, or in general, n-part 
name, is used in other databases, SQLServer, Oracle and DB2 call the database 
part, schema name. Hive seems to use the terms DATABASE and SCHEMA 
interchangeably.

If we think of an object is fully qualified by a 2-part name, 
[database].[table]. Every time we resolve a name of a table or a view to an 
object in the catalog, the object is represented by a 2-part name. Of course, 
when we define a new table, the table will need to be recorded in the catalog 
as [database].[table].

If a name "T1" is specified with its database part "DB1", the resolution 
searches an object in the catalog with the fully qualified name "DB1"."T1".

If a name "T2" is not specified with its database part, the resolution gets 
the default database name from the current context, says "DEFAULT-DB", adds to 
the "T2" and searches an object of the name "DEFAULT-DB"."T2".

A view is then recorded as a tuple of

(view_database, view_name, view_definition, qualifier_database)

Example:


CREATE DATABASE DB1;
CREATE VIEW MYDB.VIEW1 AS SELECT * FROM T1;

The record in the catalog for this view is

(view_database, view_name, view_definition, qualifier_database) =
("MYDB", "VIEW1", "SELECT * FROM T1", "DB1")

When resolving the name T1 from the view definition, if T1 is not qualified 
by its database part (which is in this case), the name T1 is then augmented by 
the current database to "DB1"."T1" and the fully qualified name is used for a 
search in the catalog.

With this mechanism, the way to create and resolve a nested view is 
demonstrated below:

USE DATABASE MYDB;
CREATE VIEW OTHERDB.VIEW2 AS SELECT * FROM VIEW1

(view_database, view_name, view_definition, qualifier_database) =
("OTHERDB", "VIEW2", "SELECT * FROM VIEW1", "MYDB")

To resolve the statement

USE DATABASE OTHERDB;
SELECT * FROM VIEW2;

The first statement sets the following state.

analysisContext.currentDB = "OTHERDB"

We then build an unresolved LogicalPlan from the second statement.

'Project [*]
+- 'UnresolvedRelation `VIEW2`

-> Augment VIEW2 with current database OTHERDB and search the catalog
-> Expand the definition of the view OTHERDB.VIEW2

'Project [*]
+- 'Project [*]
   +- 'UnresolvedRelation `MYDB`.`VIEW1`

-> VIEW1 is augmented with the qualifier_database "MYDB" from the view 
record in the catalog
-> Expand the definition of the view MYDB.VIEW1

'Project [*]
+- 'Project [*]
   +- 'Project [*]
  +- 'UnresolvedRelation `DB1`.`T1`

-> Expand the definition of the table DB1.T1

Project [... ]
+- Project [... ]
   +- Project [... ]
  +- SubqueryAlias `DB1`.`T1`
 +- Project [... ]
+- ...


From here it then goes back to the very first question: do we plan to 
support 2-part name or n-part name objects in Spark as in other databases?


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-22 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/70522/
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-22 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-22 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #70522 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/70522/testReport)**
 for PR 16233 at commit 
[`f0142ea`](https://github.com/apache/spark/commit/f0142eacaf110020bc45faa80ac71ae20f8bf886).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds the following public classes _(experimental)_:
  * `case class View(child: LogicalPlan, defaultDatabase: Option[String]) 
extends LogicalPlan `


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-22 Thread SparkQA
Github user SparkQA commented on the issue:

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


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-22 Thread hvanhovell
Github user hvanhovell commented on the issue:

https://github.com/apache/spark/pull/16233
  
### Background
I think we should view this PR in the proper context. This PR is the first 
PR in a series to get the following things done:
- Properly support nested views. The main advantage is that if you update 
an underlying view, the current view also gets updated.
- Get rid of SQL generation.

### Approach
This PR should be the first in a series of three. This PR should lay the 
ground work by adding a view node by introducing a View node as a concept, and 
by making the analyzer resolve (potentially nested) views. This approach has a 
number of advantages:

 Explicit management of the view's default database
A view will have the concept of a default database (using Yin's proposed 
terminology here). We need a solid way of managing this for nested views. There 
are a couple of options here:
- We could transform the view tree in `SessionCatalog.lookupRelation(...)`, 
and make sure all UnresolvedRelations without a database defined are assigned 
the views default database. This is basically what @cloud-fan proposed. The 
problem with this is that this breaks Common Table Expressions.
- We could use the `SessionCatalog.currentDB`, and set/reset this as soon 
as we hit a view node while resolving relations. The major downside to this is 
that sessions can be shared between different users, and this might cause weird 
behavior.
- We could use an analysis context, and set the views default database in 
that context. This is actually similar to the second option, with the benefit 
that is won't be as visible. The downside is that we either need to make the 
analyzer stateful (note that the session catalog is) using a thread-local, or 
that we need to pass this context to every analyzer rule. This approach seems 
quite heavy weight, and can require a lot of code changes.
- We can make ResolveRelations View aware, and make it keep track of the 
default databases (plural - in case of nested views). The default database will 
be the one of the last seen parent view. This approach makes is trivial to 
limit the depth of nested views (which might be needed at some point), or we 
can make this only resolve one layer of nested views at a time and use the 
analyzer's `maxIterations` as an implicit limit.

I am in favor of the last option.

 Decoupling output and its underlying structure
Introducing a view node with its own attributes, allows us to decouple the 
output from the underlying structure. This means we can decouple planning of 
query, from the planning the view; this allows us to cache resolved views. Note 
that this is not in scope for the current series of PRs, and is a nice to have.

 View visibility
I added a field to `SubqueryAlias` so it is easier to see where what part 
of the plan originated. This is a bit of hack, and a view node is a natural 
replacement.

### State of PR
I think we need to be more aggressive when it comes to view nodes. They 
should have their own attributes, and should also reference the view desc 
(CatalogTable), they are based on. Something like this:
```scala
case class View(
desc: CatalogTable,
output: Seq[Attribute],
child: Option[LogicalPlan] = None)
  extends LogicalPlan
  with MultiInstanceRelation {

  def this(desc: CatalogTable) = this(desc, desc.schema.toAttributes, None)

  override lazy val resolved: Boolean = child.exists(_.resolved)

  override def children: Seq[LogicalPlan] = child.toSeq
  
  override def newInstance(): LogicalPlan = copy(output = 
output.map(_.newInstance()))
}
```

CatalogTable.lookupRelation(...) should just return a basic view node. All 
resolution should be moved into the analyzer.



---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-21 Thread yhuai
Github user yhuai commented on the issue:

https://github.com/apache/spark/pull/16233
  
One general comment, let's explain how this patch maintains the 
compatibility with views defined by previous versions of Spark. It is also good 
to explain it in the corresponding part in the code.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-20 Thread cloud-fan
Github user cloud-fan commented on the issue:

https://github.com/apache/spark/pull/16233
  
hmm, it seems hard to apply the view context in place, considering things 
like CTE. I think it's better to introduce analysis context, which can limit 
the max depth of stacked view easily.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-20 Thread cloud-fan
Github user cloud-fan commented on the issue:

https://github.com/apache/spark/pull/16233
  
We need a way to isolate the analysis of view text with a different 
context. Using wrapper is one solution, and my proposal doesn't introduce a 
wrapper, instead it applies the context in place, i.e. when we parse the view 
text in `SessionCatalog.lookupRelation`, set the database of 
`UnresolvedRelation` right away, according to view context(only contains 
`currentDatabase` at the first version, we can add more information in the 
future).


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-19 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/16233
  
I think we all agree that a wrapper is needed to handle the case of nested 
views, it could be an `AnalysisContext` in `Analyzer`, or `viewContext` in 
`CatalogTable`, or an operator node such as `View` or `SubqueryAlias`. Perhaps 
we should ask @hvanhovell to share his opinion on this issue?


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-19 Thread cloud-fan
Github user cloud-fan commented on the issue:

https://github.com/apache/spark/pull/16233
  
I'm thinking about if we really need the wrapper: the `View` operator. 
Given a table/view identifier, the steps to resolve it:
1. if the database is specified, get the table/view metadata from that 
database.
1. If the database is not specified, try to resolve it as temp view first.
2. If it's not a temp view, get the table/view metadata from the current 
database.

For nested views, it's a different story. The sub-plan-tree of the nested 
view may have a different "currentDatabase". It's kind of under a different 
analysis context, and wrapping the sub-plan-tree with a `View` operator can 
solve this problem, but I have a simpler proposal:
```
def lookupRelation(...) = {
  ...
  if (table.tableType == CatalogTableType.VIEW) {
val viewContext = table.viewContext
val viewText = table.viewText
sparkSession.sessionState.sqlParser.parsePlan(viewText).transform {
  case u @ UnresolvedRelation(tableIdent) if 
tableIdent.database.isEmpty =>
u.copy(tableIdent = tableIdent.copy(database = 
Some(viewContext.currentDatase)))
}
...
  }
  ...
}
```


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-16 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/16233
  
Thank you @gatorsmile ! Sleep well!


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-16 Thread gatorsmile
Github user gatorsmile commented on the issue:

https://github.com/apache/spark/pull/16233
  
I just quickly review one file. It is pretty late now. Will read the other 
parts this weekend to get the global picture. 


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-15 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/16233
  
cc @yhuai @cloud-fan Please have a look at this when you have time. Thanks!


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-10 Thread nsyca
Github user nsyca commented on the issue:

https://github.com/apache/spark/pull/16233
  
@jiangxb1987: Let's hear other people's feedback. My thoughts are:

- According to the function prologue, `lookupRelations` seems to be a 
perfect place to return a `LogicalPlan` representing the input 
`TableIdentifier`, which can be a table or a view. If we need more code to do 
the view expansion, can we put it in a new function and have it called by 
`lookupRelations`? This is more of a principle than a coding technique. Do we 
want to have the logic of view expansion encapsulated in the catalog service, 
or spilled over into `Analyzer`?

- If we need to store database name in `SubqueryAlias`, we can expand it to 
have an optional `String` to capture it. If we want to support n-part name like 
`database.schema.table.column`, we can easily extend the optional argument to 
`Seq[String]`. Note the term "schema" here is close to a namespace, not meaning 
the definition (column name, data type, nullability) of a table or a view, as 
it is widely used in the doc you authored referenced in SPARK-18209.

I hope we can get other people's comments. They may have interesting 
viewpoints.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-10 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/16233
  
@nsyca As we have described in the doc, the original schema is used to 
verify the analyzed logical plan generated from `viewText` can be wrapped to 
the schema it was created. Without the `View` operator, we have to analyze the 
view logical plan in function `lookupRelations`, but if we put that in a 
variable in `View` operator, we could create a separated rule in `Analyzer` to 
verify the view schema, which should be easier to understand.
Even if we don't add more variables in the `View` operator, we still need a 
placeholder for current database name, reusing `SubqueryAlias` may be a choice, 
but since `SubqueryAlias` provides a general alias for all kind of subqueries, 
I'm afraid  it's overkill to handle a case only exists for nested views.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/69927/
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #69927 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/69927/consoleFull)**
 for PR 16233 at commit 
[`0b98b61`](https://github.com/apache/spark/commit/0b98b61c622f6c76c845660ece74028a95873213).
 * 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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread nsyca
Github user nsyca commented on the issue:

https://github.com/apache/spark/pull/16233
  
@jiangxb1987 Why do we want to add the original schema of a view at its 
last resolution to a LogicalPlan? An unresolved LogicalPlan representing a view 
at the end of the Parser will just be the same as one representing a table. 
There is no distinction at that stage since we don't even know the name 
references to a table, a view, or any object.
At the end of the Analyzer phase where we have the LogicalPlan resolved, 
the original schema of a view has no use. If it's different from the one from 
the late binding, we flag an Analysis exception. If it's the same, it's 
recorded as the output of the child of SubqueryAlias of the object. The concept 
of a view does not exist past Analyzer. It is already expanded in Analyzer.
So the point here is whether we need to convey the original schema through 
different parts of the code in Analyzer or not. If it does, then a new operator 
to encapsulate that information may be worth invented.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/16233
  
@nsyca The `View` operator will benefit us in quickly adding more variables 
about a view, for example, we could add the schema of the original logical plan 
into this operator. And I guess there will be more useful variables that should 
be added.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread nsyca
Github user nsyca commented on the issue:

https://github.com/apache/spark/pull/16233
  
@jiangxb1987 Quick question here: Can we just embed the view's database 
name as part of `SubqueryAlias`? Maybe you have thought through this then 
please give your rationale? I have not read through all the code but a first 
glimpse gives me an impression that the new operator `View` is just to annotate 
the database name of its subplan.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #69927 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/69927/consoleFull)**
 for PR 16233 at commit 
[`0b98b61`](https://github.com/apache/spark/commit/0b98b61c622f6c76c845660ece74028a95873213).


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

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


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
Merged build finished. Test FAILed.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #69919 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/69919/consoleFull)**
 for PR 16233 at commit 
[`9efb7dd`](https://github.com/apache/spark/commit/9efb7dda476cfaf00d8acd701a2c3873933fba4a).
 * This patch **fails Spark unit 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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #69919 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/69919/consoleFull)**
 for PR 16233 at commit 
[`9efb7dd`](https://github.com/apache/spark/commit/9efb7dda476cfaf00d8acd701a2c3873933fba4a).


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #69918 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/69918/consoleFull)**
 for PR 16233 at commit 
[`b67e7ce`](https://github.com/apache/spark/commit/b67e7ce9f665a1ba3e57093ceb5ceeec2d9bb0d2).
 * This patch **fails Scala style tests**.
 * This patch merges cleanly.
 * This patch adds the following public classes _(experimental)_:
  * `case class View(child: LogicalPlan, currentDatabase: Option[String]) 
extends LogicalPlan `


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

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


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/16233
  
Merged build finished. Test FAILed.


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread jiangxb1987
Github user jiangxb1987 commented on the issue:

https://github.com/apache/spark/pull/16233
  
cc @hvanhovell @nsyca @gatorsmile @rxin


---
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 #16233: [SPARK-18801][SQL] Add `View` operator to help resolve a...

2016-12-09 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/16233
  
**[Test build #69918 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/69918/consoleFull)**
 for PR 16233 at commit 
[`b67e7ce`](https://github.com/apache/spark/commit/b67e7ce9f665a1ba3e57093ceb5ceeec2d9bb0d2).


---
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