@@ -269,10 +269,10 @@ private[hive] object SparkSQLCLIDriver extends Logging {
269269
270270 if (line.trim().endsWith(" ;" ) && ! line.trim().endsWith(" \\ ;" )) {
271271 line = prefix + line
272- // For SQL Scripting, a semicolon inside a compound block (BEGIN...END,
273- // IF...END IF, WHILE...DO ...END WHILE, etc.) terminates a statement *within*
274- // the block, not the block itself. Only fire when the accumulated input
275- // is no longer inside any open scripting block.
272+ // For SQL Scripting, a semicolon inside a compound block (BEGIN ... END,
273+ // IF ... END IF, WHILE ... DO ... END WHILE, etc.) terminates a statement
274+ // *within* the block, not the block itself. Only fire when the accumulated
275+ // input is no longer inside any open scripting block.
276276 val insideScriptingBlock = sqlScriptingBlockDepth(line) > 0
277277 if (insideScriptingBlock) {
278278 prefix = line
@@ -755,9 +755,9 @@ private[hive] class SparkSQLCLIDriver extends CliDriver with Logging {
755755 // string, the origin implementation from Hive will not drop the trailing semicolon as expected,
756756 // hence we refined this function a little bit.
757757 // Note: [SPARK-33100] Ignore a semicolon inside a bracketed comment in spark-sql.
758- // Note: For SQL Scripting, semicolons inside a SQL Scripting compound block (BEGIN...END,
759- // IF...END IF, WHILE/FOR...DO ...END WHILE/FOR, LOOP...END LOOP, REPEAT...END REPEAT,
760- // CASE...END CASE, and nested/labeled variants) terminate individual statements
758+ // Note: [SPARK-56147] Semicolons inside a SQL Scripting compound block (BEGIN ... END,
759+ // IF ... END IF, WHILE/FOR ... DO ... END WHILE/FOR, LOOP ... END LOOP, REPEAT ... END REPEAT,
760+ // CASE ... END CASE, and nested/labeled variants) terminate individual statements
761761 // *within* the block and must not be used as split points. Block depth is tracked
762762 // with the same keyword-aware scanner used by the interactive input loop.
763763 private [hive] def splitSemiColon (line : String ): Array [String ] = {
0 commit comments