-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-30214][SQL] A new framework to resolve v2 commands #26847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
a005713
[SPARK-30214][SQL] Support COMMENT ON syntax
yaooqinn 7c45c9b
naming
yaooqinn 024ab39
Merge branch 'master' into SPARK-30214
yaooqinn e489e62
fix tests
yaooqinn 9b272b6
comments
yaooqinn 85617cd
impl UnresolvedNamespace
yaooqinn e33a200
megre master
yaooqinn 3e37941
impl UnresolvedV2Table
yaooqinn 7df9407
Merge branch 'master' into SPARK-30214
yaooqinn 57c83fc
rm parent node
yaooqinn ccc4702
create namespace
yaooqinn 72c01a9
drop namespace
yaooqinn 1a7c800
set namespace props
yaooqinn 415de11
set namespace location
yaooqinn 6ab2228
desc namespace
yaooqinn 56037ff
show current namespace
yaooqinn 6675e7f
Revert "show current namespace"
yaooqinn a42e12e
Revert "desc namespace"
yaooqinn 2c458f0
Revert "set namespace location"
yaooqinn 573a66e
Revert "set namespace props"
yaooqinn f6e742b
Revert "drop namespace"
yaooqinn 0754656
Revert "create namespace"
yaooqinn a868420
ident -> NamedRelation
yaooqinn 5a6aa2a
add ident
yaooqinn 0b89d3a
resovledtable should lookup view => v2 -> v1
yaooqinn a41acc5
ref
yaooqinn de054c7
add DataSourceV1Relation
yaooqinn e0836f6
Revert "add DataSourceV1Relation"
yaooqinn fc555be
handle view in analyzer
yaooqinn 7b4f3e3
nit in tests
yaooqinn 9f2159f
Merge branch 'master' into SPARK-30214
yaooqinn 70028dd
update
yaooqinn 9d10239
nit
yaooqinn c391212
fix test
yaooqinn d20b1b2
Merge branch 'master' into SPARK-30214
yaooqinn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/namespace.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.spark.sql.catalyst.analysis | ||
|
||
import org.apache.spark.sql.catalyst.expressions.Attribute | ||
import org.apache.spark.sql.catalyst.plans.logical.LeafNode | ||
import org.apache.spark.sql.connector.catalog.SupportsNamespaces | ||
|
||
case class ResolvedNamespace(catalog: SupportsNamespaces, namespace: Seq[String]) | ||
extends LeafNode { | ||
override def output: Seq[Attribute] = Nil | ||
} | ||
|
||
case class UnresolvedNamespace(multipartIdentifier: Seq[String]) extends LeafNode { | ||
override lazy val resolved: Boolean = false | ||
|
||
override def output: Seq[Attribute] = Nil | ||
} |
33 changes: 33 additions & 0 deletions
33
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/table.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.spark.sql.catalyst.analysis | ||
|
||
import org.apache.spark.sql.catalyst.expressions.Attribute | ||
import org.apache.spark.sql.catalyst.plans.logical.LeafNode | ||
import org.apache.spark.sql.connector.catalog.{Identifier, Table, TableCatalog} | ||
|
||
case class ResolvedTable(catalog: TableCatalog, identifier: Identifier, table: Table) | ||
cloud-fan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
extends LeafNode { | ||
override def output: Seq[Attribute] = Nil | ||
} | ||
|
||
case class UnresolvedTable(multipartIdentifier: Seq[String]) extends LeafNode { | ||
override lazy val resolved: Boolean = false | ||
|
||
override def output: Seq[Attribute] = Nil | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean the
ParsedStatement
from parser will turn to useUnresolvedNamespace
? Currently, the catalogs in statements are resolved atResolveCatalogs
. Will we need to refactorResolveCatalogs
due to this change?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, see
#26847 (comment)