You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "TeodorDjelic (via GitHub)" <gi...@apache.org> on 2025/09/10 15:41:04 UTC
[PR] Adding Support for Parsing CONTINUE HANDLER [spark]
TeodorDjelic opened a new pull request, #52298:
URL: https://github.com/apache/spark/pull/52298
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
4. Be sure to keep the PR description updated to reflect all changes.
5. Please write your PR title to summarize what this PR proposes.
6. If possible, provide a concise example to reproduce the issue for a faster review.
7. If you want to add a new configuration, please read the guideline first for naming configurations in
'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
8. If you want to add or modify an error type or message, please read the guideline first in
'common/utils/src/main/resources/error/README.md'.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
This PR lays the foundation for implementing support for `CONTINUE HANDLER`. `CONTINUE HANDLER` no longer throws an exception that it is not supported, and now behaves like an `EXIT HANDLER`.
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
We want to add support for executing `CONTINUE HANDLER`. This feature is supported in documentation, but is not supported as of now inside SQL Scripts. Change is supposed to enable parsing of `CONTINUE HANDLER`.
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as new features, bug fixes, or other behavior changes. Documentation-only updates are not considered user-facing changes.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
If no, write 'No'.
-->
No.
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
-->
Parser and interpreter tests were added to facilitate the `CONTINUE HANDLER`.
### Was this patch authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this patch, please include the
phrase: 'Generated-by: ' followed by the name of the tool and its version.
If no, write 'No'.
Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
-->
No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on PR #52298:
URL: https://github.com/apache/spark/pull/52298#issuecomment-3288366163
thanks, merging to master!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "miland-db (via GitHub)" <gi...@apache.org>.
miland-db commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2337238336
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -2918,7 +2935,24 @@ class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
assert(exception.origin.line.contains(2))
}
- test("duplicate condition in handler declaration") {
+ test("declare continue handler in wrong place") {
Review Comment:
Not sure if there is a need to test `EXIT/CONTINUE` handlers where it is not crucial what type it is. I would not duplicate tests like this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2344248137
##########
sql/core/src/test/scala/org/apache/spark/sql/scripting/SqlScriptingInterpreterSuite.scala:
##########
@@ -38,6 +38,16 @@ class SqlScriptingInterpreterSuite
with SharedSparkSession
with SqlScriptingTestUtils {
+ protected override def beforeAll(): Unit = {
+ super.beforeAll()
+ conf.setConfString(SQLConf.SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED.key, "true")
Review Comment:
```suggestion
conf.setConf(SQLConf.SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED, true)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "miland-db (via GitHub)" <gi...@apache.org>.
miland-db commented on PR #52298:
URL: https://github.com/apache/spark/pull/52298#issuecomment-3275624158
Hey @cloud-fan, should we create a temporary `SQLConf` to guard usage of `CONTINUE HANDLER` until it's fully supported? Current PR enables it in parsing and creates tests, but it will have the same behavior as `EXIT HANDLER`. We want to incrementally introduce changes to fully support `CONTINUE HANDLER`, but users should not use it in the meantime.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2344243497
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -4144,6 +4144,16 @@ object SQLConf {
.booleanConf
.createWithDefault(true)
+ val SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED =
+ buildConf("spark.sql.scripting.continueHandlerEnabled")
+ .doc("EXPERIMENTAL FEATURE/WORK IN PROGRESS: SQL Scripting CONTINUE HANDLER feature " +
Review Comment:
```suggestion
.internal()
.doc("EXPERIMENTAL FEATURE/WORK IN PROGRESS: SQL Scripting CONTINUE HANDLER feature " +
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "miland-db (via GitHub)" <gi...@apache.org>.
miland-db commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2341228082
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -4144,6 +4144,15 @@ object SQLConf {
.booleanConf
.createWithDefault(true)
+ val SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED =
+ buildConf("spark.sql.scripting.continueHandlerEnabled")
+ .doc("SQL Scripting CONTINUE HANDLER feature is under development and its use should be " +
+ "done under this feature flag. SQL Scripting CONTINUE HANDLER enables users to use " +
+ "CONTINUE HANDLER syntax inside SQL Scripts.")
Review Comment:
Let's either rephrase or remove the second sentence because it doesn't bring any value. Also we should maybe hint that this is temporary conf and it should not be turned on/users should not use `CONTINUE HANDLERS` until they are fully supported.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2344244944
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -23,10 +23,21 @@ import org.apache.spark.sql.catalyst.plans.SQLHelper
import org.apache.spark.sql.catalyst.plans.logical.{CompoundBody, CreateVariable, ExceptionHandler, ForStatement, IfElseStatement, IterateStatement, LeaveStatement, LoopStatement, Project, RepeatStatement, SearchedCaseStatement, SetVariable, SimpleCaseStatement, SingleStatement, WhileStatement}
import org.apache.spark.sql.errors.DataTypeErrors.toSQLId
import org.apache.spark.sql.exceptions.SqlScriptingException
+import org.apache.spark.sql.internal.SQLConf
class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
import CatalystSqlParser._
+ protected override def beforeAll(): Unit = {
+ super.beforeAll()
+ conf.setConfString(SQLConf.SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED.key, "true")
Review Comment:
```suggestion
conf.setConf(SQLConf.SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED, true)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2344239290
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -4144,6 +4144,16 @@ object SQLConf {
.booleanConf
.createWithDefault(true)
+ val SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED =
+ buildConf("spark.sql.scripting.continueHandlerEnabled")
+ .doc("EXPERIMENTAL FEATURE/WORK IN PROGRESS: SQL Scripting CONTINUE HANDLER feature " +
+ "is under development and still not working as intended. This feature switch is intended " +
+ "to be used internally for development and testing, not by end users. " +
+ "YOU ARE ADVISED AGAINST USING THIS FEATURE AS ITS NOT FINISHED.")
+ .version("4.0.0")
Review Comment:
```suggestion
.version("4.1.0")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "dusantism-db (via GitHub)" <gi...@apache.org>.
dusantism-db commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2343469651
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -2842,12 +2842,12 @@ class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
assert(exception.origin.line.contains(6))
}
- test("continue handler not supported") {
+ test("declare exit handler for qualified condition name that is not supported") {
Review Comment:
I think he just copied the test and changed to continue handler, which is fine IMO - doesn't hurt to have more tests. The diff is just weird for some reason. However, I think we shouldn't remove the old tests yet ("continue handler not supported"), at least until we remove the feature flag.
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -2918,7 +2935,24 @@ class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
assert(exception.origin.line.contains(2))
}
- test("duplicate condition in handler declaration") {
+ test("declare continue handler in wrong place") {
Review Comment:
Considering he already implemented the tests, I see no reason to delete them now. Again, the more tests the better!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "dusantism-db (via GitHub)" <gi...@apache.org>.
dusantism-db commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2343469651
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -2842,12 +2842,12 @@ class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
assert(exception.origin.line.contains(6))
}
- test("continue handler not supported") {
+ test("declare exit handler for qualified condition name that is not supported") {
Review Comment:
I think he just copied the test and changed to continue handler, which is fine IMO - doesn't hurt to have more tests. The diff is just weird for some reason. However, I think we shouldn't remove the old tests yet ("continue handler not supported") until we remove the feature flag.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "TeodorDjelic (via GitHub)" <gi...@apache.org>.
TeodorDjelic commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2341060723
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -2918,7 +2935,24 @@ class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
assert(exception.origin.line.contains(2))
}
- test("duplicate condition in handler declaration") {
+ test("declare continue handler in wrong place") {
Review Comment:
Maybe its a good idea to have redundant checks, to do black box testing, instead of white box testing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2344246232
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -2855,15 +2866,18 @@ class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
| SELECT flag;
|END
|""".stripMargin
+
+ conf.unsetConf(SQLConf.SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED.key)
Review Comment:
use `withSQLConf` instead
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "miland-db (via GitHub)" <gi...@apache.org>.
miland-db commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2341231584
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -2918,7 +2935,24 @@ class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
assert(exception.origin.line.contains(2))
}
- test("duplicate condition in handler declaration") {
+ test("declare continue handler in wrong place") {
Review Comment:
That makes sense, let's wait for others opinion also.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "TeodorDjelic (via GitHub)" <gi...@apache.org>.
TeodorDjelic commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2341059901
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -2842,12 +2842,12 @@ class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
assert(exception.origin.line.contains(6))
}
- test("continue handler not supported") {
+ test("declare exit handler for qualified condition name that is not supported") {
Review Comment:
Maybe its a good idea to have redundant checks, to do black box testing, instead of white box testing.
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -2842,12 +2842,12 @@ class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
assert(exception.origin.line.contains(6))
}
- test("continue handler not supported") {
+ test("declare exit handler for qualified condition name that is not supported") {
Review Comment:
Maybe its a good idea to have redundant checks, to do black box testing, instead of white box testing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "miland-db (via GitHub)" <gi...@apache.org>.
miland-db commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2337234312
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingParserSuite.scala:
##########
@@ -2842,12 +2842,12 @@ class SqlScriptingParserSuite extends SparkFunSuite with SQLHelper {
assert(exception.origin.line.contains(6))
}
- test("continue handler not supported") {
+ test("declare exit handler for qualified condition name that is not supported") {
Review Comment:
This test seems weird. We can remove it and leave test below for qualified condition name unchanged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan closed pull request #52298: [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER
URL: https://github.com/apache/spark/pull/52298
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2344242505
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -4144,6 +4144,16 @@ object SQLConf {
.booleanConf
.createWithDefault(true)
+ val SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED =
+ buildConf("spark.sql.scripting.continueHandlerEnabled")
+ .doc("EXPERIMENTAL FEATURE/WORK IN PROGRESS: SQL Scripting CONTINUE HANDLER feature " +
+ "is under development and still not working as intended. This feature switch is intended " +
+ "to be used internally for development and testing, not by end users. " +
+ "YOU ARE ADVISED AGAINST USING THIS FEATURE AS ITS NOT FINISHED.")
+ .version("4.0.0")
Review Comment:
```suggestion
.internal()
.version("4.0.0")
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -4144,6 +4144,16 @@ object SQLConf {
.booleanConf
.createWithDefault(true)
+ val SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED =
+ buildConf("spark.sql.scripting.continueHandlerEnabled")
+ .doc("EXPERIMENTAL FEATURE/WORK IN PROGRESS: SQL Scripting CONTINUE HANDLER feature " +
+ "is under development and still not working as intended. This feature switch is intended " +
+ "to be used internally for development and testing, not by end users. " +
+ "YOU ARE ADVISED AGAINST USING THIS FEATURE AS ITS NOT FINISHED.")
+ .version("4.0.0")
Review Comment:
```suggestion
.internal()
.version("4.0.0")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "miland-db (via GitHub)" <gi...@apache.org>.
miland-db commented on code in PR #52298:
URL: https://github.com/apache/spark/pull/52298#discussion_r2337234752
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -282,11 +282,13 @@ class AstBuilder extends DataTypeAstBuilder
parsingCtx: SqlScriptingParsingContext): ExceptionHandler = {
val exceptionHandlerTriggers = visitConditionValuesImpl(ctx.conditionValues())
- if (Option(ctx.CONTINUE()).isDefined) {
- throw SqlScriptingErrors.continueHandlerNotSupported(CurrentOrigin.get)
+ val handlerType = if (Option(ctx.CONTINUE()).isDefined) {
+ ExceptionHandlerType.CONTINUE
+ }
+ else {
Review Comment:
nit: formatting
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53537][Core] Adding Support for Parsing CONTINUE HANDLER [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on PR #52298:
URL: https://github.com/apache/spark/pull/52298#issuecomment-3280070614
yes, please add temp config to hide half baked features.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org