[
https://issues.apache.org/jira/browse/HIVE-28992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18088649#comment-18088649
]
Thomas Rebele edited comment on HIVE-28992 at 6/12/26 10:41 PM:
----------------------------------------------------------------
(moved to HIVE-29662)
was (Author: thomas.rebele):
I think the `-f script.sql` arg is broken as well. Trying Beeline with the most
recent commit (cce3edbe3038ed134865f1cbe0e1d8ed88cebbd8):
Executing a script that sleeps 20s is executed in 4 seconds:
{code:java}
$ date; ./beeline -u jdbc:hive2://localhost:10000 -n trebele -f
/home/trebele/dev/hive/h5/test.sql; date
Sat Jun 13 12:27:07 AM CEST 2026
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/home/trebele/dev/hive/h5/packaging/target/apache-hive-4.3.0-SNAPSHOT-bin/apache-hive-4.3.0-SNAPSHOT-bin/lib/log4j-slf4j-impl-2.25.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/home/trebele/software/hadoop/hadoop-3.4.2.7.3.2.10000-98/share/hadoop/common/lib/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://localhost:10000
Connected to: Apache Hive (version 4.3.0-SNAPSHOT)
Driver: Hive JDBC (version 4.3.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
select 1;
select reflect("java.lang.Thread", "sleep", bigint(20000));
>....Closing: 0: jdbc:hive2://localhost:10000
Sat Jun 13 12:27:11 AM CEST 2026
{code}
Executing Beeline interactively (and copy-pasting the script as fast as
possible) works as expected:
{code:java}
$ date; ./beeline -u jdbc:hive2://localhost:10000 -n trebele; date
Sat Jun 13 12:31:07 AM CEST 2026
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/home/trebele/dev/hive/h5/packaging/target/apache-hive-4.3.0-SNAPSHOT-bin/apache-hive-4.3.0-SNAPSHOT-bin/lib/log4j-slf4j-impl-2.25.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/home/trebele/software/hadoop/hadoop-3.4.2.7.3.2.10000-98/share/hadoop/common/lib/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://localhost:10000
Connected to: Apache Hive (version 4.3.0-SNAPSHOT)
Driver: Hive JDBC (version 4.3.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 4.3.0-SNAPSHOT by Apache Hive
0: jdbc:hive2://localhost:10000> select 1; select reflect("java.lang.Thread",
"sleep", bigint(20000));
+------+
| _c0 |
+------+
| 1 |
+------+
1 row selected (0.272 seconds)
+-------+
| _c0 |
+-------+
| null |
+-------+
1 row selected (20.137 seconds)
0: jdbc:hive2://localhost:10000>
Closing: 0: jdbc:hive2://localhost:10000
Sat Jun 13 12:31:31 AM CEST 2026 {code}
In the debugger I saw that the variable "line" in
org.apache.hive.beeline.BeeLine#execute is null, so I think it is a problem
with jline as well.
> Beeline: prompt is broken since jline3 3.25.0
> ---------------------------------------------
>
> Key: HIVE-28992
> URL: https://issues.apache.org/jira/browse/HIVE-28992
> Project: Hive
> Issue Type: Improvement
> Reporter: László Bodor
> Priority: Major
>
> Discovered while testing HIVE-25495
> prompt is not visible (no matter where I tried to change the prompt for
> testing purposes, I didn't see it was effective, basically, it's the
> readLines(prompt, ...) calls
> {code}
> >....
> {code}
> instead of:
> {code}
> 0: jdbc:hive2://localhost:10000/default>
> {code}
> this is broken since jline 3.25.1
> in 3.25.0 it works properly (manually tried)
> TODO: report this to jline, as even the latest 3.30.4 seems to be broken
--
This message was sent by Atlassian Jira
(v8.20.10#820010)