diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e1abf3cc93a2..a7159b3cd7b1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -695,6 +695,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.TRINO_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ vars.TRINO_AWS_REGION }}
S3_BUCKET: ${{ vars.TRINO_S3_BUCKET }}
+ S3_TABLES_BUCKET: ${{ vars.TRINO_S3_TABLES_BUCKET }}
GCP_CREDENTIALS_KEY: ${{ secrets.GCP_CREDENTIALS_KEY }}
GCP_STORAGE_BUCKET: ${{ vars.GCP_STORAGE_BUCKET }}
ABFS_CONTAINER: ${{ vars.AZURE_ABFS_HIERARCHICAL_CONTAINER }}
@@ -882,7 +883,6 @@ jobs:
- suite-7-non-generic
- suite-hive-transactional
- suite-azure
- - suite-delta-lake-databricks104
- suite-delta-lake-databricks113
- suite-delta-lake-databricks122
- suite-delta-lake-databricks133
@@ -922,9 +922,6 @@ jobs:
ignore exclusion if: >-
${{ env.CI_SKIP_SECRETS_PRESENCE_CHECKS != '' || secrets.GCP_CREDENTIALS_KEY != '' }}
- - suite: suite-delta-lake-databricks104
- ignore exclusion if: >-
- ${{ env.CI_SKIP_SECRETS_PRESENCE_CHECKS != '' || secrets.DATABRICKS_TOKEN != '' }}
- suite: suite-delta-lake-databricks113
ignore exclusion if: >-
${{ env.CI_SKIP_SECRETS_PRESENCE_CHECKS != '' || secrets.DATABRICKS_TOKEN != '' }}
@@ -989,7 +986,6 @@ jobs:
AWS_REGION: ""
TRINO_AWS_ACCESS_KEY_ID: ""
TRINO_AWS_SECRET_ACCESS_KEY: ""
- DATABRICKS_104_JDBC_URL: ""
DATABRICKS_113_JDBC_URL: ""
DATABRICKS_122_JDBC_URL: ""
DATABRICKS_133_JDBC_URL: ""
@@ -1066,7 +1062,6 @@ jobs:
AWS_REGION: ${{ vars.TRINO_AWS_REGION }}
TRINO_AWS_ACCESS_KEY_ID: ${{ vars.TRINO_AWS_ACCESS_KEY_ID }}
TRINO_AWS_SECRET_ACCESS_KEY: ${{ secrets.TRINO_AWS_SECRET_ACCESS_KEY }}
- DATABRICKS_104_JDBC_URL: ${{ vars.DATABRICKS_104_JDBC_URL }}
DATABRICKS_113_JDBC_URL: ${{ vars.DATABRICKS_113_JDBC_URL }}
DATABRICKS_122_JDBC_URL: ${{ vars.DATABRICKS_122_JDBC_URL }}
DATABRICKS_133_JDBC_URL: ${{ vars.DATABRICKS_133_JDBC_URL }}
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index ac0051df7203..3a350cf9a382 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'trinodb/trino'
steps:
- - uses: actions/stale@v9.0.0
+ - uses: actions/stale@v9.1.0
with:
stale-pr-message: 'This pull request has gone a while without any activity. Tagging for triage help: @mosabua'
days-before-pr-stale: 21
@@ -21,7 +21,7 @@ jobs:
stale-pr-label: 'stale'
exempt-pr-labels: 'stale-ignore'
start-date: '2020-01-01T00:00:00Z'
- exempt-draft-pr: true
+ exempt-draft-pr: false
operations-per-run: 200
# Avoid processing issues completely, see https://github.com/actions/stale/issues/1112
days-before-issue-stale: -1
diff --git a/.mvn/modernizer/violations.xml b/.mvn/modernizer/violations.xml
index 12045c09097b..c5ddee06db55 100644
--- a/.mvn/modernizer/violations.xml
+++ b/.mvn/modernizer/violations.xml
@@ -317,4 +317,10 @@
1.8
Use io.trino.plugin.base.util.JsonUtils.jsonFactoryBuilder() instead
+
+
+ software/amazon/awssdk/services/glue/model/Table.tableType:()Ljava/lang/String;
+ 1.8
+ Table type is nullable in Glue model, which is too easy to forget about. Prefer GlueConverter.getTableTypeNullable
+
diff --git a/client/trino-cli/pom.xml b/client/trino-cli/pom.xml
index 9b1573ab9aa6..c2d5cc3152bf 100644
--- a/client/trino-cli/pom.xml
+++ b/client/trino-cli/pom.xml
@@ -5,7 +5,7 @@
io.trino
trino-root
- 470-SNAPSHOT
+ 471-SNAPSHOT
../../pom.xml
diff --git a/client/trino-cli/src/test/java/io/trino/cli/TestQueryRunner.java b/client/trino-cli/src/test/java/io/trino/cli/TestQueryRunner.java
index 574256cfc3d6..7f5a8d80971f 100644
--- a/client/trino-cli/src/test/java/io/trino/cli/TestQueryRunner.java
+++ b/client/trino-cli/src/test/java/io/trino/cli/TestQueryRunner.java
@@ -18,9 +18,9 @@
import io.trino.client.ClientSession;
import io.trino.client.ClientTypeSignature;
import io.trino.client.Column;
-import io.trino.client.JsonCodec;
import io.trino.client.QueryResults;
import io.trino.client.StatementStats;
+import io.trino.client.TrinoJsonCodec;
import io.trino.client.TypedQueryData;
import io.trino.client.uri.PropertyName;
import io.trino.client.uri.TrinoUri;
@@ -46,7 +46,7 @@
import static io.trino.cli.ClientOptions.OutputFormat.CSV;
import static io.trino.cli.TerminalUtils.getTerminal;
import static io.trino.client.ClientStandardTypes.BIGINT;
-import static io.trino.client.JsonCodec.jsonCodec;
+import static io.trino.client.TrinoJsonCodec.jsonCodec;
import static io.trino.client.auth.external.ExternalRedirectStrategy.PRINT;
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.assertj.core.api.Assertions.assertThat;
@@ -55,7 +55,7 @@
@TestInstance(PER_METHOD)
public class TestQueryRunner
{
- private static final JsonCodec QUERY_RESULTS_CODEC = jsonCodec(QueryResults.class);
+ private static final TrinoJsonCodec QUERY_RESULTS_CODEC = jsonCodec(QueryResults.class);
private MockWebServer server;
@BeforeEach
diff --git a/client/trino-client/pom.xml b/client/trino-client/pom.xml
index 2c353ea20624..92977ac6f54f 100644
--- a/client/trino-client/pom.xml
+++ b/client/trino-client/pom.xml
@@ -5,7 +5,7 @@
io.trino
trino-root
- 470-SNAPSHOT
+ 471-SNAPSHOT
../../pom.xml
diff --git a/client/trino-client/src/main/java/io/trino/client/ClientTypeSignatureParameter.java b/client/trino-client/src/main/java/io/trino/client/ClientTypeSignatureParameter.java
index a4c900d338c0..bed65ae12b13 100644
--- a/client/trino-client/src/main/java/io/trino/client/ClientTypeSignatureParameter.java
+++ b/client/trino-client/src/main/java/io/trino/client/ClientTypeSignatureParameter.java
@@ -145,7 +145,7 @@ public int hashCode()
public static class ClientTypeSignatureParameterDeserializer
extends JsonDeserializer
{
- private static final ObjectMapper MAPPER = JsonCodec.OBJECT_MAPPER_SUPPLIER.get();
+ private static final ObjectMapper MAPPER = TrinoJsonCodec.OBJECT_MAPPER_SUPPLIER.get();
@Override
public ClientTypeSignatureParameter deserialize(JsonParser jp, DeserializationContext ctxt)
diff --git a/client/trino-client/src/main/java/io/trino/client/CloseableIterator.java b/client/trino-client/src/main/java/io/trino/client/CloseableIterator.java
new file mode 100644
index 000000000000..501f3c3508d2
--- /dev/null
+++ b/client/trino-client/src/main/java/io/trino/client/CloseableIterator.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.trino.client;
+
+import java.io.Closeable;
+import java.util.Iterator;
+
+/*
+ * A CloseableIterator is an Iterator that must be closed to release resources.
+ */
+public interface CloseableIterator
+ extends Iterator, Closeable
+{
+ static CloseableIterator closeable(Iterator iterator)
+ {
+ return new CloseableIterator()
+ {
+ @Override
+ public void close()
+ {
+ }
+
+ @Override
+ public boolean hasNext()
+ {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public T next()
+ {
+ return iterator.next();
+ }
+
+ @Override
+ public String toString()
+ {
+ return "CloseableIterator{iterator=" + iterator + '}';
+ }
+ };
+ }
+
+ @Override
+ String toString();
+}
diff --git a/client/trino-client/src/main/java/io/trino/client/JsonResultRows.java b/client/trino-client/src/main/java/io/trino/client/JsonIterators.java
similarity index 84%
rename from client/trino-client/src/main/java/io/trino/client/JsonResultRows.java
rename to client/trino-client/src/main/java/io/trino/client/JsonIterators.java
index f2f5e965732e..dc7b3e4f146f 100644
--- a/client/trino-client/src/main/java/io/trino/client/JsonResultRows.java
+++ b/client/trino-client/src/main/java/io/trino/client/JsonIterators.java
@@ -39,21 +39,22 @@
import static java.util.Collections.unmodifiableList;
import static java.util.Objects.requireNonNull;
-public final class JsonResultRows
+public final class JsonIterators
{
private static final JsonFactory JSON_FACTORY = createJsonFactory();
- private JsonResultRows() {}
+ private JsonIterators() {}
- private static class RowWiseIterator
+ private static class JsonIterator
extends AbstractIterator>
+ implements CloseableIterator>
{
private final Closer closer = Closer.create();
private boolean closed;
private final JsonParser parser;
private final TypeDecoder[] decoders;
- public RowWiseIterator(JsonParser parser, TypeDecoder[] decoders)
+ public JsonIterator(JsonParser parser, TypeDecoder[] decoders)
throws IOException
{
requireNonNull(decoders, "decoders is null");
@@ -77,7 +78,7 @@ public RowWiseIterator(JsonParser parser, TypeDecoder[] decoders)
}
}
- public RowWiseIterator(InputStream stream, TypeDecoder[] decoders)
+ public JsonIterator(InputStream stream, TypeDecoder[] decoders)
throws IOException
{
this(JSON_FACTORY.createParser(requireNonNull(stream, "stream is null")), decoders);
@@ -128,7 +129,8 @@ public List