-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Trino(PrestoSQL) Plugin in Go | ||
|
||
## Requirements | ||
- Java 17.0.4+, 64-bit | ||
- https://github.com/superbear/java-call-go | ||
|
||
## How to build | ||
|
||
### Build JAR | ||
```bash | ||
mvn clean package -Dcheckstyle.skipExec=true -DskipTests | ||
``` | ||
This creates a `target/trino-plugin-in-go-402` directory. | ||
|
||
### Test | ||
```bash | ||
mvn clean test -Dcheckstyle.skipExec=true | ||
``` | ||
|
||
## Running the container | ||
```bash | ||
docker compose up -d | ||
|
||
docker exec -ti trino trino | ||
|
||
# restart container after rebuild plugin | ||
docker restart trino | ||
``` | ||
|
||
```sql | ||
trino> SELECT atoi('123'); | ||
trino> SELECT toupper('hello world'); | ||
``` | ||
|
||
## References | ||
- [Trino Plugin implementation](https://trino.io/docs/current/develop/functions.html#plugin-implementation) | ||
- [Trino](https://github.com/trinodb/trino/blob/master/core/trino-main/src/main/java/io/trino/operator/scalar/StringFunctions.java) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters