Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pan3793 committed Mar 10, 2024
1 parent 5bb1cc9 commit a2efa1c
Show file tree
Hide file tree
Showing 17 changed files with 87 additions and 2,344 deletions.
2 changes: 2 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ build/scala-*/**
**/node_modules/**
**/gen/*
**/*.tokens
**/BeeLine.properties
**/sql-keywords.properties
37 changes: 25 additions & 12 deletions kyuubi-hive-beeline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-beeline</artifactId>
<version>${hive.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-common</artifactId>
Expand Down Expand Up @@ -229,6 +217,31 @@
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<goals>
<goal>copy</goal>
</goals>
<phase>process-test-resources</phase>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<outputDirectory>target/classes</outputDirectory>
<testOutputDirectory>target/test-classes</testOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
import org.apache.hive.jdbc.JdbcUriParseException;
import org.apache.hive.jdbc.Utils;
import org.apache.hive.jdbc.Utils.JdbcConnectionParams;
import org.apache.thrift.transport.TTransportException;
import org.apache.kyuubi.shaded.thrift.transport.TTransportException;

/**
* A console SQL shell with command completion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import org.apache.hadoop.hive.conf.SystemVariables;
import org.apache.hadoop.hive.conf.VariableSubstitution;
import org.apache.hadoop.io.IOUtils;
import org.apache.hive.beeline.logs.BeelineInPlaceUpdateStream;
import org.apache.hive.common.util.HiveStringUtils;
import org.apache.hive.jdbc.HiveStatement;
import org.apache.hive.jdbc.Utils;
Expand Down Expand Up @@ -166,7 +165,8 @@ public boolean addlocaldriverjar(String line) {
return false;
}

URLClassLoader classLoader = (URLClassLoader) Thread.currentThread().getContextClassLoader();
// HIVE-21584
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
try {
beeLine.debug(jarPath + " is added to the local beeline.");
URLClassLoader newClassLoader = new URLClassLoader(new URL[] {p.toURL()}, classLoader);
Expand Down Expand Up @@ -987,9 +987,9 @@ private boolean executeInternal(String sql, boolean call) {
logThread.setDaemon(true);
logThread.start();
if (stmnt instanceof HiveStatement) {
HiveStatement hiveStatement = (HiveStatement) stmnt;
hiveStatement.setInPlaceUpdateStream(
new BeelineInPlaceUpdateStream(beeLine.getErrorStream(), eventNotifier));
// HiveStatement hiveStatement = (HiveStatement) stmnt;
// hiveStatement.setInPlaceUpdateStream(
// new BeelineInPlaceUpdateStream(beeLine.getErrorStream(), eventNotifier));
}
hasResults = stmnt.execute(sql);
logThread.interrupt();
Expand Down
Loading

0 comments on commit a2efa1c

Please sign in to comment.