Skip to content

Commit

Permalink
适配 presto 340
Browse files Browse the repository at this point in the history
  • Loading branch information
Staroon committed Jan 9, 2021
1 parent e826246 commit 4b53ed0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Presto SQL 自定义函数

### 项目环境
- Presto SQL: 332
- Java: 1.8.0_161
- Maven: 3.6.2
- Presto SQL: 340
- Java: 11.0.9 (zulu11.43.55-ca-jdk11.0.9.1)
- Maven: 3.6.3

### 函数列表
#### 标量函数(Scalar Function)
Expand All @@ -30,7 +30,7 @@ Presto SQL 自定义函数
### 使用说明
1. 克隆项目到本地,`git clone project`
2. 编译项目,`mvn clean package`
3. 得到插件 zip 包:`presto-udfs-332.zip`
4. 将`data`目录下的`ip2region.db`文件放入编译得到的`presto-udfs-332.zip`压缩包中
5. 上传`presto-udfs-332.zip`至Presto服务器,解压 zip 文件至 Presto SQL 安装目录 **plugin** 目录下
3. 得到插件 zip 包:`presto-udfs-340.zip`
4. 将`data`目录下的`ip2region.db`文件放入编译得到的`presto-udfs-340.zip`压缩包中
5. 上传`presto-udfs-340.zip`至Presto服务器,解压 zip 文件至 Presto SQL 安装目录 **plugin** 目录下
6. 重启 Presto SQL
26 changes: 12 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
<parent>
<groupId>io.prestosql</groupId>
<artifactId>presto-root</artifactId>
<version>332</version>
<version>340</version>
</parent>

<groupId>com.staroon.bigdata</groupId>
<packaging>presto-plugin</packaging>
<version>332</version>

<artifactId>presto-udfs</artifactId>
<version>340</version>
<name>presto-udfs</name>
<packaging>presto-plugin</packaging>

<scm>
<url>https://github.com/Staroon/presto-udfs</url>
Expand All @@ -26,12 +25,15 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<presto.version>332</presto.version>
<project.build.targetJdk>11</project.build.targetJdk>
<presto.version>340</presto.version>
</properties>

<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.lionsoul</groupId>
<artifactId>ip2region</artifactId>
Expand All @@ -58,18 +60,14 @@
<artifactId>jol-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
<executions>
<execution>
<id>validate</id>
Expand All @@ -94,9 +92,9 @@
<plugin>
<groupId>org.gaul</groupId>
<artifactId>modernizer-maven-plugin</artifactId>
<version>1.6.0</version>
<version>2.1.0</version>
<configuration>
<javaVersion>1.8</javaVersion>
<javaVersion>11</javaVersion>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 4b53ed0

Please sign in to comment.