hive icon indicating copy to clipboard operation
hive copied to clipboard

HIVE-25495: Upgrade JLine to version 3

Open LA-Toth opened this issue 2 years ago • 10 comments

What changes were proposed in this pull request?

  • Update jline to 3.21 - the behaviour is quite different. So a modified version of the JLine2's StringCompleter is added in hive-common.
  • Update sqlline to 1.12 as it uses jline 3.21
  • Add some missing dependencies to pom.xml files (the lack of these didn't cause issue possibly due to transitive dependency)

Why are the changes needed?

It's a step required to use JDK 17

Does this PR introduce any user-facing change?

No.

How was this patch tested?

By existing tests.

LA-Toth avatar Mar 02 '22 14:03 LA-Toth

I created it partially based on pull request 2617.

LA-Toth avatar Mar 02 '22 14:03 LA-Toth

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reach out on the [email protected] list if the patch is in need of reviews.

github-actions[bot] avatar May 02 '22 00:05 github-actions[bot]

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reach out on the [email protected] list if the patch is in need of reviews.

github-actions[bot] avatar Aug 07 '22 00:08 github-actions[bot]

I just found this one, is there a chance that we can reopen, rebase @LA-Toth? I was thinking about proper multiline support in HIVE-26542 and I think we have a better chance with jline3

abstractdog avatar Sep 18 '22 15:09 abstractdog

I had one and only one issue: I was unable to run the tests to have a usable result. These are unstable even in @kgyrtkirk's docker image that is behind the jenkins AFAIK. So I was unable to decide if the current PR woks or not.

LA-Toth avatar Sep 19 '22 17:09 LA-Toth

I still can't run the tests:

latest kgyrtkirk/hive-dev-box:executor docker image freshly cloned hive repo from github (master branch) mvn clean install -DskipTests -T 1C mvn clean install -pl beeline/ mvn clean install -pl beeline/ -Dtest=TestHiveCli#testDatabaseOptions results: [ERROR] Failures: [ERROR] TestHiveCli.testDatabaseOptions:107->verifyCMD:270 The expected keyword "testtbl" occur in the output: [ERROR] TestHiveCli.testSetHeaderValue:89->verifyCMD:270 The expected keyword "testtbl.a testtbl.b" occur in the output: [ERROR] TestHiveCli.testSourceCmd:114->verifyCMD:270 The expected keyword "sc1" occur in the output: [ERROR] TestHiveCli.testSourceCmd2:122->verifyCMD:270 The expected keyword "sc3" occur in the output: [ERROR] TestHiveCli.testSourceCmd4:138->verifyCMD:270 The expected keyword "testtbl" occur in the output: [ERROR] TestHiveCli.testSqlFromCmdWithDBName:166->verifyCMD:270 The expected keyword "testtbl" occur in the output:

and [ERROR] Failures: [ERROR] TestHiveCli.setup:295->initFromFile:321->executeCMD:256 Supported return code is 0 while the actual is 2

LA-Toth avatar Sep 19 '22 17:09 LA-Toth

with this change:

diff --git a/beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java b/beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java index 5ea4d11b7a..f7be6875ee 100644 --- a/beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java +++ b/beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java @@ -291,8 +291,8 @@ public static void init(){ public void setup() throws IOException, URISyntaxException { System.setProperty("datanucleus.schema.autoCreateAll", "true"); cli = new HiveCli();

  • initFromFile(); redirectOutputStream();
  • initFromFile(); }

private void redirectOutputStream() {

LA-Toth avatar Sep 19 '22 17:09 LA-Toth