Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,15 @@ 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) {
if (!conf.getConf(SQLConf.SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED)) {
throw SqlScriptingErrors.continueHandlerNotSupported(CurrentOrigin.get)
}
ExceptionHandlerType.CONTINUE
} else {
ExceptionHandlerType.EXIT
}

val handlerType = ExceptionHandlerType.EXIT
val body = if (Option(ctx.beginEndCompoundBlock()).isDefined) {
visitBeginEndCompoundBlockImpl(
ctx.beginEndCompoundBlock(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4144,6 +4144,17 @@ object SQLConf {
.booleanConf
.createWithDefault(true)

val SQL_SCRIPTING_CONTINUE_HANDLER_ENABLED =
buildConf("spark.sql.scripting.continueHandlerEnabled")
.internal()
.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.1.0")
.booleanConf
.createWithDefault(false)

val CONCAT_BINARY_AS_STRING = buildConf("spark.sql.function.concatBinaryAsString")
.doc("When this option is set to false and all inputs are binary, `functions.concat` returns " +
"an output as binary. Otherwise, it returns as a string.")
Expand Down
Loading