Skip to content

Commit

Permalink
update: Access ck dialect through jdbc.
Browse files Browse the repository at this point in the history
  • Loading branch information
merrily01 committed Nov 10, 2023
1 parent b61d5c5 commit d9c03ca
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
6 changes: 6 additions & 0 deletions externals/kyuubi-jdbc-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@
*/
package org.apache.kyuubi.engine.jdbc.clickhouse

import org.apache.kyuubi.engine.jdbc.mysql.Mysql8ConnectionProvider
import org.apache.kyuubi.engine.jdbc.connection.JdbcConnectionProvider

class ClickHouseConnectionProvider extends Mysql8ConnectionProvider {
class ClickHouseConnectionProvider extends JdbcConnectionProvider {

override val name: String = classOf[ClickHouseConnectionProvider].getSimpleName

override val driverClass: String = "com.clickhouse.jdbc.ClickHouseDriver"

override def canHandle(providerClass: String): Boolean = {
driverClass.equalsIgnoreCase(providerClass)
}

}
7 changes: 7 additions & 0 deletions integration-tests/kyuubi-jdbc-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
<version>${clickhouse.version}</version>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
<parquet.version>1.10.1</parquet.version>
<phoenix.version>6.0.0</phoenix.version>
<postgresql.version>42.6.0</postgresql.version>
<clickhouse.version>0.5.0</clickhouse.version>
<prometheus.version>0.16.0</prometheus.version>
<protobuf.version>3.21.7</protobuf.version>
<py4j.version>0.10.7</py4j.version>
Expand Down Expand Up @@ -1342,6 +1343,12 @@
<version>${postgresql.version}</version>
</dependency>

<dependency>
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
<version>${clickhouse.version}</version>
</dependency>

<!-- flink -->
<dependency>
<groupId>org.apache.flink</groupId>
Expand Down

0 comments on commit d9c03ca

Please sign in to comment.