-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-36850][SQL][FOLLOWUP] Simplify exception code and fix wrong condition for CTAS and RTAS #34857
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
Conversation
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Kubernetes integration test starting |
|
@cloud-fan could you please take a look when you have a chance? |
|
Kubernetes integration test status failure |
|
Test build #146057 has finished for PR 34857 at commit
|
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
Outdated
Show resolved
Hide resolved
|
Test build #146060 has finished for PR 34857 at commit
|
…/ResolveSessionCatalog.scala Co-authored-by: Wenchen Fan <[email protected]>
|
Test build #146073 has finished for PR 34857 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test starting |
| RefreshFunctionCommand(funcIdentifier.database, funcIdentifier.funcName) | ||
| } | ||
|
|
||
| private def constructTableV1Cmd( |
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.
nit: constructV1TableCmd?
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.
fixed
|
|
||
| def alterQualifiedColumnOnlySupportedWithV2TableError(): Throwable = { | ||
| new AnalysisException("ALTER COLUMN with qualified column is only supported with v2 tables.") | ||
| def operationOnlySupportedWithV2TableError(message: String): Throwable = { |
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.
nit: message -> command or operation?
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.
Fixed. thanks
|
Kubernetes integration test status failure |
|
Kubernetes integration test status failure |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #146074 has finished for PR 34857 at commit
|
|
Test build #146077 has finished for PR 34857 at commit
|
|
|
||
| case c @ ReplaceTableAsSelect(ResolvedDBObjectName(catalog, _), _, _, _, _, _) | ||
| if isSessionCatalog(catalog) => | ||
| case c @ ReplaceTableAsSelect(ResolvedDBObjectName(catalog, _), _, _, _, _, _) => |
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.
So seems we don't have test for this case? Otherwise previously wrongly placed isSessionCatalog(catalog) should be detected?
…atalog CTAS and RTAS
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #146099 has finished for PR 34857 at commit
|
sunchao
left a comment
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.
LGTM
| } | ||
| } | ||
|
|
||
| test("SPARK-34857: ReplaceTableAsSelect partitions can be specified using " + |
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.
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #146110 has finished for PR 34857 at commit
|
|
thanks, merging to master! |
|
Thank you all so much! |
What changes were proposed in this pull request?
fixed a few problems:
xxxOnlySupportedWithV2TableErrorif isSessionCatalog(catalog)should not be on the pattern, it should beif (isSessionCatalog(catalog) && !isV2Provider(provider)). Otherwise,c.partitioning ++ c.tableSpec.bucketSpec.map(_.asTransform)is not done for non SessionCatalog case.I tried this
c.partitioning ++ c.tableSpec.bucketSpec.map(_.asTransform)insideAstBuilderbut it failed here so I kept this inResolveSessionCatalogWhy are the changes needed?
code cleaning up and bug fixing
Does this PR introduce any user-facing change?
No
How was this patch tested?
Existing tests