This is an automated email from the ASF dual-hosted git repository.
snuyanzin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 16488bf0f23 [FLINK-39598][table] Update jline to 3.30.12
16488bf0f23 is described below
commit 16488bf0f2371977d7c02e74b690ca869b41adf2
Author: Sergey Nuyanzin <[email protected]>
AuthorDate: Mon May 4 08:01:28 2026 +0200
[FLINK-39598][table] Update jline to 3.30.12
---
flink-table/flink-sql-client/pom.xml | 4 ++--
.../apache/flink/table/client/cli/CliClient.java | 25 +++++++++++++++-------
.../src/main/resources/META-INF/NOTICE | 6 +++---
3 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/flink-table/flink-sql-client/pom.xml
b/flink-table/flink-sql-client/pom.xml
index 8f2866345bc..79e456d7e5d 100644
--- a/flink-table/flink-sql-client/pom.xml
+++ b/flink-table/flink-sql-client/pom.xml
@@ -78,14 +78,14 @@ under the License.
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline-terminal</artifactId>
- <version>3.29.0</version>
+ <version>3.30.12</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline-reader</artifactId>
- <version>3.29.0</version>
+ <version>3.30.12</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>
diff --git
a/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java
b/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java
index 7017a871597..b20273be90c 100644
---
a/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java
+++
b/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java
@@ -40,6 +40,7 @@ import org.jline.reader.Reference;
import org.jline.reader.UserInterruptException;
import org.jline.reader.impl.LineReaderImpl;
import org.jline.terminal.Terminal;
+import org.jline.terminal.impl.DumbTerminal;
import org.jline.utils.AttributedStringBuilder;
import org.jline.utils.AttributedStyle;
import org.slf4j.Logger;
@@ -70,13 +71,7 @@ public class CliClient implements AutoCloseable {
private static final Logger LOG = LoggerFactory.getLogger(CliClient.class);
public static final Supplier<Terminal> DEFAULT_TERMINAL_FACTORY =
TerminalUtils::createDefaultTerminal;
- private static final String NEWLINE_PROMPT =
- new AttributedStringBuilder()
-
.style(AttributedStyle.DEFAULT.foreground(AttributedStyle.GREEN))
- .append("Flink SQL")
- .style(AttributedStyle.DEFAULT)
- .append("> ")
- .toAnsi();
+
private static final String SHOW_LINE_NUMBERS_PATTERN = "%N%M> ";
private final Executor executor;
@@ -220,7 +215,12 @@ public class CliClient implements AutoCloseable {
terminal.flush();
try {
// read a statement from terminal and parse it
- line = lineReader.readLine(NEWLINE_PROMPT, null,
inputTransformer, null);
+ line =
+ lineReader.readLine(
+ newLinePrompt(terminal),
+ null,
+ terminal instanceof DumbTerminal ? null :
inputTransformer,
+ null);
lineReader.setVariable(
LineReader.SECONDARY_PROMPT_PATTERN,
(executor.getSessionConfig().get(SqlClientOptions.DISPLAY_SHOW_LINE_NUMBERS)
@@ -317,6 +317,15 @@ public class CliClient implements AutoCloseable {
}
}
+ private static String newLinePrompt(Terminal terminal) {
+ return new AttributedStringBuilder()
+
.style(AttributedStyle.DEFAULT.foreground(AttributedStyle.GREEN))
+ .append("Flink SQL")
+ .style(AttributedStyle.DEFAULT)
+ .append("> ")
+ .toAnsi(terminal);
+ }
+
private LineReader createLineReader(Terminal terminal, ExecutionMode mode)
{
SqlMultiLineParser parser =
new SqlMultiLineParser(new SqlCommandParserImpl(), executor,
mode);
diff --git a/flink-table/flink-sql-client/src/main/resources/META-INF/NOTICE
b/flink-table/flink-sql-client/src/main/resources/META-INF/NOTICE
index ca5e757a8e9..5891782cc23 100644
--- a/flink-table/flink-sql-client/src/main/resources/META-INF/NOTICE
+++ b/flink-table/flink-sql-client/src/main/resources/META-INF/NOTICE
@@ -7,6 +7,6 @@ The Apache Software Foundation (http://www.apache.org/).
This project bundles the following dependencies under the BSD license.
See bundled license files for details.
-- org.jline:jline-terminal:3.29.0
-- org.jline:jline-reader:3.29.0
-- org.jline:jline-native:3.29.0
+- org.jline:jline-terminal:3.30.12
+- org.jline:jline-reader:3.30.12
+- org.jline:jline-native:3.30.12