Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Dstara/update trino version #86

Merged
merged 12 commits into from
Jan 9, 2023
30 changes: 9 additions & 21 deletions .github/workflows/github_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,30 @@ jobs:
os: [ ubuntu-latest, macos-11 ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
check-latest: true

- run: |
export JAVA_HOME=$JAVA_HOME_11_X64
mvn checkstyle:checkstyle
shell: bash
name: checkStyle

- run: |
export JAVA_HOME=$JAVA_HOME_11_X64
mvn clean package -DskipTests
mvn clean package -e -DskipTests
shell: bash
name: checkFormat

- run: |
export JAVA_HOME=$JAVA_HOME_11_X64
mvn test
shell: bash
name: test

- run: |
set -e pipefail
# Display log files if the build failed
echo "Dumping log files for failed build"
echo "----------------------------------"
for f in $(find $BUILD_REPOSITORY_LOCALPATH -name *.dumpstream);
do echo "------"
echo $f
echo "======"
cat $f
done;
shell: bash
name: error_print
if: ${{ failure() }}


Release:
if: startsWith(github.ref, 'refs/tags/')
needs: [Test]
Expand Down
13 changes: 10 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>trino-root</artifactId>
<groupId>io.trino</groupId>
<version>357</version>
<version>405</version>
</parent>

<artifactId>trino-tiledb</artifactId>
Expand Down Expand Up @@ -54,7 +54,13 @@
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>3.10.0</version>
<version>6.4.0</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -145,7 +151,7 @@
<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-testing</artifactId>
<version>357</version>
<version>405</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -191,6 +197,7 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
11 changes: 5 additions & 6 deletions src/main/java/io/trino/plugin/tiledb/TileDBClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public class TileDBClient
protected Context ctx;

protected TileDBConfig config;

protected oshi.SystemInfo systemInfo;
protected HardwareAbstractionLayer hardwareAbstractionLayer;

Expand Down Expand Up @@ -101,6 +100,11 @@ public TileDBClient(TileDBConnectorId connectorId, TileDBConfig config)
hardwareAbstractionLayer = systemInfo.getHardware();
}

public HardwareAbstractionLayer getHardwareAbstractionLayer()
{
return hardwareAbstractionLayer;
}

/**
* Get plugin configuration
* @return TileDB plugin configuration
Expand Down Expand Up @@ -229,11 +233,6 @@ public Context getCtx()
return ctx;
}

public HardwareAbstractionLayer getHardwareAbstractionLayer()
{
return hardwareAbstractionLayer;
}

/**
* Rollback a create table statement, this just drops the array
* @param handle tiledb table handler
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/trino/plugin/tiledb/TileDBConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class TileDBConfig

private int readBufferSize = 1024 * 1024 * 10;

private int writeBufferSize = 1024 * 1024 * 10;
private int writeBufferSize = 1024 * 1024 * 1;

private String awsAccessKeyId;

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/io/trino/plugin/tiledb/TileDBConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.trino.spi.connector.ConnectorMetadata;
import io.trino.spi.connector.ConnectorPageSinkProvider;
import io.trino.spi.connector.ConnectorRecordSetProvider;
import io.trino.spi.connector.ConnectorSession;
import io.trino.spi.connector.ConnectorSplitManager;
import io.trino.spi.connector.ConnectorTransactionHandle;
import io.trino.spi.session.PropertyMetadata;
Expand Down Expand Up @@ -78,7 +79,7 @@ public TileDBConnector(
}

@Override
public ConnectorTransactionHandle beginTransaction(IsolationLevel isolationLevel, boolean readOnly)
public ConnectorTransactionHandle beginTransaction(IsolationLevel isolationLevel, boolean readOnly, boolean autoCommit)
{
TileDBTransactionHandle transaction = new TileDBTransactionHandle();
transactions.put(transaction, metadata);
Expand All @@ -100,7 +101,7 @@ public void rollback(ConnectorTransactionHandle transactionHandle)
}

@Override
public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle)
public ConnectorMetadata getMetadata(ConnectorSession session, ConnectorTransactionHandle transactionHandle)
{
return metadata;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import io.trino.spi.connector.Connector;
import io.trino.spi.connector.ConnectorContext;
import io.trino.spi.connector.ConnectorFactory;
import io.trino.spi.connector.ConnectorHandleResolver;

import java.util.Map;

Expand All @@ -42,12 +41,6 @@ public String getName()
return "tiledb";
}

@Override
public ConnectorHandleResolver getHandleResolver()
{
return new TileDBHandleResolver();
}

@Override
public Connector create(String catalogName, Map<String, String> requiredConfig, ConnectorContext context)
{
Expand All @@ -62,7 +55,6 @@ public Connector create(String catalogName, Map<String, String> requiredConfig,
});

Injector injector = app
.strictConfig()
.doNotInitializeLogging()
.setRequiredConfigurationProperties(requiredConfig)
.initialize();
Expand Down
73 changes: 0 additions & 73 deletions src/main/java/io/trino/plugin/tiledb/TileDBHandleResolver.java

This file was deleted.

Loading