Skip to content

Commit f073f7a

Browse files
authored
Merge branch 'master' into master
2 parents a60a83f + d24393a commit f073f7a

File tree

274 files changed

+1545
-1965
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+1545
-1965
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
7070
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
7171
- uses: ./.github/actions/setup
72-
timeout-minutes: 10
72+
timeout-minutes: 15
7373
with:
7474
cache: ${{ matrix.cache }}
7575
java-version: ${{ matrix.java-version }}
@@ -100,7 +100,7 @@ jobs:
100100
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
101101
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
102102
- uses: ./.github/actions/setup
103-
timeout-minutes: 10
103+
timeout-minutes: 15
104104
with:
105105
cache: 'restore'
106106
cleanup-node: true
@@ -186,7 +186,7 @@ jobs:
186186
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
187187
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
188188
- uses: ./.github/actions/setup
189-
timeout-minutes: 10
189+
timeout-minutes: 15
190190
with:
191191
cache: restore
192192
java-version: 25
@@ -214,7 +214,7 @@ jobs:
214214
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
215215
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
216216
- uses: ./.github/actions/setup
217-
timeout-minutes: 10
217+
timeout-minutes: 15
218218
with:
219219
cache: restore
220220
- name: Maven Install
@@ -259,7 +259,7 @@ jobs:
259259
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
260260
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
261261
- uses: ./.github/actions/setup
262-
timeout-minutes: 10
262+
timeout-minutes: 15
263263
with:
264264
cache: restore
265265
- name: Install Hive Module
@@ -309,7 +309,7 @@ jobs:
309309
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
310310
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
311311
- uses: ./.github/actions/setup
312-
timeout-minutes: 10
312+
timeout-minutes: 15
313313
with:
314314
cache: restore
315315
cleanup-node: true
@@ -397,7 +397,7 @@ jobs:
397397
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
398398
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
399399
- uses: ./.github/actions/setup
400-
timeout-minutes: 10
400+
timeout-minutes: 15
401401
with:
402402
cache: restore
403403
- name: Update PR check
@@ -517,7 +517,7 @@ jobs:
517517
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
518518
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
519519
- uses: ./.github/actions/setup
520-
timeout-minutes: 10
520+
timeout-minutes: 15
521521
with:
522522
cache: restore
523523
cleanup-node: ${{ format('{0}', matrix.modules == 'plugin/trino-singlestore' || matrix.modules == 'plugin/trino-exasol' || matrix.modules == 'plugin/trino-oracle') }}
@@ -821,7 +821,7 @@ jobs:
821821
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
822822
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
823823
- uses: ./.github/actions/setup
824-
timeout-minutes: 10
824+
timeout-minutes: 15
825825
with:
826826
cache: restore
827827
cleanup-node: true
@@ -877,7 +877,6 @@ jobs:
877877
- suite-7-non-generic
878878
- suite-hive-transactional
879879
- suite-azure
880-
- suite-delta-lake-databricks113
881880
- suite-delta-lake-databricks122
882881
- suite-delta-lake-databricks133
883882
- suite-delta-lake-databricks143
@@ -918,9 +917,6 @@ jobs:
918917
ignore exclusion if: >-
919918
${{ env.CI_SKIP_SECRETS_PRESENCE_CHECKS != '' || secrets.GCP_CREDENTIALS_KEY != '' }}
920919
921-
- suite: suite-delta-lake-databricks113
922-
ignore exclusion if: >-
923-
${{ env.CI_SKIP_SECRETS_PRESENCE_CHECKS != '' || secrets.DATABRICKS_TOKEN != '' }}
924920
- suite: suite-delta-lake-databricks122
925921
ignore exclusion if: >-
926922
${{ env.CI_SKIP_SECRETS_PRESENCE_CHECKS != '' || secrets.DATABRICKS_TOKEN != '' }}
@@ -980,7 +976,6 @@ jobs:
980976
AWS_REGION: ""
981977
TRINO_AWS_ACCESS_KEY_ID: ""
982978
TRINO_AWS_SECRET_ACCESS_KEY: ""
983-
DATABRICKS_113_JDBC_URL: ""
984979
DATABRICKS_122_JDBC_URL: ""
985980
DATABRICKS_133_JDBC_URL: ""
986981
DATABRICKS_143_JDBC_URL: ""
@@ -1025,7 +1020,7 @@ jobs:
10251020
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
10261021
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
10271022
- uses: ./.github/actions/setup
1028-
timeout-minutes: 10
1023+
timeout-minutes: 15
10291024
with:
10301025
# The job doesn't build anything, so the ~/.m2/repository cache isn't useful
10311026
cache: 'false'
@@ -1053,7 +1048,6 @@ jobs:
10531048
AWS_REGION: ${{ vars.TRINO_AWS_REGION }}
10541049
TRINO_AWS_ACCESS_KEY_ID: ${{ vars.TRINO_AWS_ACCESS_KEY_ID }}
10551050
TRINO_AWS_SECRET_ACCESS_KEY: ${{ secrets.TRINO_AWS_SECRET_ACCESS_KEY }}
1056-
DATABRICKS_113_JDBC_URL: ${{ vars.DATABRICKS_113_JDBC_URL }}
10571051
DATABRICKS_122_JDBC_URL: ${{ vars.DATABRICKS_122_JDBC_URL }}
10581052
DATABRICKS_133_JDBC_URL: ${{ vars.DATABRICKS_133_JDBC_URL }}
10591053
DATABRICKS_143_JDBC_URL: ${{ vars.DATABRICKS_143_JDBC_URL }}

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
steps:
5151
- uses: actions/checkout@v5
5252
- uses: ./.github/actions/setup
53-
timeout-minutes: 10
53+
timeout-minutes: 15
5454
- name: Maven Checks
5555
run: |
5656
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
@@ -78,7 +78,7 @@ jobs:
7878
with:
7979
fetch-depth: 0 # checkout all commits, as the build result depends on `git describe` equivalent
8080
- uses: ./.github/actions/setup
81-
timeout-minutes: 10
81+
timeout-minutes: 15
8282
- name: Maven Install
8383
run: |
8484
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"

.github/workflows/milestone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Checkout code
1717
uses: actions/checkout@v5
1818
- uses: ./.github/actions/setup
19-
timeout-minutes: 10
19+
timeout-minutes: 15
2020
- name: Get milestone from pom.xml
2121
run: |
2222
.github/bin/retry ./mvnw -v

client/trino-jdbc/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,19 +345,19 @@
345345

346346
<dependency>
347347
<groupId>org.testcontainers</groupId>
348-
<artifactId>oracle-free</artifactId>
348+
<artifactId>testcontainers</artifactId>
349349
<scope>test</scope>
350350
</dependency>
351351

352352
<dependency>
353353
<groupId>org.testcontainers</groupId>
354-
<artifactId>postgresql</artifactId>
354+
<artifactId>testcontainers-oracle-free</artifactId>
355355
<scope>test</scope>
356356
</dependency>
357357

358358
<dependency>
359359
<groupId>org.testcontainers</groupId>
360-
<artifactId>testcontainers</artifactId>
360+
<artifactId>testcontainers-postgresql</artifactId>
361361
<scope>test</scope>
362362
</dependency>
363363

client/trino-jdbc/src/test/java/io/trino/jdbc/TestJdbcVendorCompatibility.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
import org.junit.jupiter.api.Test;
2525
import org.junit.jupiter.api.TestInstance;
2626
import org.junit.jupiter.api.parallel.Execution;
27-
import org.testcontainers.containers.PostgreSQLContainer;
2827
import org.testcontainers.oracle.OracleContainer;
28+
import org.testcontainers.postgresql.PostgreSQLContainer;
2929

3030
import java.io.Closeable;
3131
import java.sql.Connection;
@@ -618,15 +618,15 @@ public String toString()
618618
private static class PostgresqlReferenceDriver
619619
implements ReferenceDriver
620620
{
621-
private final PostgreSQLContainer<?> postgresqlContainer;
621+
private final PostgreSQLContainer postgresqlContainer;
622622
private Connection connection;
623623
private Statement statement;
624624
private Optional<Optional<String>> timezoneSet = Optional.empty();
625625

626626
PostgresqlReferenceDriver()
627627
{
628628
// Use the current latest PostgreSQL version as the reference
629-
postgresqlContainer = new PostgreSQLContainer<>("postgres:15");
629+
postgresqlContainer = new PostgreSQLContainer("postgres:15");
630630
postgresqlContainer.start();
631631
}
632632

core/trino-main/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,13 @@
546546

547547
<dependency>
548548
<groupId>org.testcontainers</groupId>
549-
<artifactId>postgresql</artifactId>
549+
<artifactId>testcontainers</artifactId>
550550
<scope>test</scope>
551551
</dependency>
552552

553553
<dependency>
554554
<groupId>org.testcontainers</groupId>
555-
<artifactId>testcontainers</artifactId>
555+
<artifactId>testcontainers-postgresql</artifactId>
556556
<scope>test</scope>
557557
</dependency>
558558
</dependencies>

core/trino-main/src/main/java/io/trino/connector/CatalogConnector.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.util.Optional;
2222

2323
import static com.google.common.base.MoreObjects.toStringHelper;
24+
import static io.trino.metadata.CatalogStatus.OPERATIONAL;
2425
import static java.util.Objects.requireNonNull;
2526

2627
public class CatalogConnector
@@ -55,7 +56,7 @@ public CatalogConnector(
5556
catalogConnector,
5657
informationSchemaConnector,
5758
systemConnector,
58-
true);
59+
OPERATIONAL);
5960
}
6061

6162
public CatalogHandle getCatalogHandle()

core/trino-main/src/main/java/io/trino/connector/system/CatalogSystemTable.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
import io.trino.spi.connector.SystemTable;
3030
import io.trino.spi.predicate.TupleDomain;
3131

32-
import java.util.List;
33-
34-
import static com.google.common.collect.ImmutableList.toImmutableList;
3532
import static io.trino.metadata.MetadataListing.listCatalogs;
3633
import static io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder;
3734
import static io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR;
@@ -47,6 +44,7 @@ public class CatalogSystemTable
4744
.column("catalog_name", createUnboundedVarcharType())
4845
.column("connector_id", createUnboundedVarcharType())
4946
.column("connector_name", createUnboundedVarcharType())
47+
.column("state", createUnboundedVarcharType())
5048
.build();
5149
private final Metadata metadata;
5250
private final AccessControl accessControl;
@@ -75,14 +73,12 @@ public RecordCursor cursor(ConnectorTransactionHandle transactionHandle, Connect
7573
{
7674
Session session = ((FullConnectorSession) connectorSession).getSession();
7775
Builder table = InMemoryRecordSet.builder(CATALOG_TABLE);
78-
List<CatalogInfo> catalogInfos = listCatalogs(session, metadata, accessControl).stream()
79-
.filter(CatalogInfo::loaded)
80-
.collect(toImmutableList());
81-
for (CatalogInfo catalogInfo : catalogInfos) {
76+
for (CatalogInfo catalogInfo : listCatalogs(session, metadata, accessControl)) {
8277
table.addRow(
8378
catalogInfo.catalogName(),
8479
catalogInfo.catalogName(),
85-
catalogInfo.connectorName().toString());
80+
catalogInfo.connectorName().toString(),
81+
catalogInfo.catalogStatus().toString());
8682
}
8783
return table.build().cursor();
8884
}

core/trino-main/src/main/java/io/trino/execution/DistributionSnapshot.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,17 @@
1818
import com.google.common.base.MoreObjects.ToStringHelper;
1919
import io.trino.spi.metrics.Distribution;
2020
import io.trino.spi.metrics.Metric;
21-
import io.trino.spi.metrics.Metrics;
2221

2322
import java.util.Locale;
24-
import java.util.Map;
2523

2624
import static com.google.common.base.MoreObjects.toStringHelper;
27-
import static com.google.common.collect.ImmutableMap.toImmutableMap;
2825
import static java.lang.String.format;
2926

3027
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE) // Do not add @class property
3128
@JsonSerialize
3229
public record DistributionSnapshot(long total, double min, double max, double p01, double p05, double p10, double p25, double p50, double p75, double p90, double p95, double p99)
3330
implements Metric<DistributionSnapshot>
3431
{
35-
public static Metrics pruneMetrics(Metrics metrics)
36-
{
37-
return new Metrics(metrics.getMetrics().entrySet().stream()
38-
.collect(toImmutableMap(
39-
Map.Entry::getKey,
40-
entry -> {
41-
Metric<?> metric = entry.getValue();
42-
if (metric instanceof Distribution) {
43-
return new DistributionSnapshot((Distribution<?>) metric);
44-
}
45-
return metric;
46-
})));
47-
}
48-
4932
public DistributionSnapshot(Distribution<?> distribution)
5033
{
5134
this(

core/trino-main/src/main/java/io/trino/execution/QueryInfo.java

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -448,45 +448,4 @@ public String toString()
448448
.add("fieldNames", fieldNames)
449449
.toString();
450450
}
451-
452-
public QueryInfo pruneDigests()
453-
{
454-
return new QueryInfo(
455-
queryId,
456-
session,
457-
state,
458-
self,
459-
fieldNames,
460-
query,
461-
preparedQuery,
462-
queryStats,
463-
setCatalog,
464-
setSchema,
465-
setPath,
466-
setAuthorizationUser,
467-
resetAuthorizationUser,
468-
setOriginalRoles,
469-
setSessionProperties,
470-
resetSessionProperties,
471-
setRoles,
472-
addedPreparedStatements,
473-
deallocatedPreparedStatements,
474-
startedTransactionId,
475-
clearTransactionId,
476-
updateType,
477-
stages.map(StagesInfo::pruneDigests),
478-
failureInfo,
479-
errorCode,
480-
warnings,
481-
inputs,
482-
output,
483-
referencedTables,
484-
routines,
485-
finalQueryInfo,
486-
resourceGroupId,
487-
queryType,
488-
retryPolicy,
489-
pruned,
490-
version);
491-
}
492451
}

0 commit comments

Comments
 (0)