Skip to content

Commit fce8106

Browse files
Merge branch 'master' into doc_table_with_column_default_value
2 parents be488d0 + 4511598 commit fce8106

File tree

275 files changed

+4553
-1197
lines changed

Some content is hidden

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

275 files changed

+4553
-1197
lines changed

.github/DEVELOPMENT.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,35 @@ allows static code analysis tools (e.g. Error Prone's `MissingCasesInEnumSwitch`
144144
check) report a problem when the enum definition is updated but the code using
145145
it is not.
146146

147+
### Vector API
148+
It's safe to assume that the JVM has the Vector API
149+
([JEP 508](https://openjdk.org/jeps/508)) enabled and available at runtime, but
150+
not safe to assume that the Vector API implementation will perform faster than
151+
equivalent scalar code on whatever hardware the engine happens to be running on.
152+
153+
Different CPU hardware can exhibit dramatically different performance
154+
characteristics, so it's important to use hardware feature detection to
155+
determine under which scenarios a vectorized approach will be faster for
156+
each implementation. Vectorized code should be tested on AMD, ARM, and Intel
157+
CPUs to verify the benefits hold on each of those platforms before deciding
158+
to enable a given code path on each of those platforms. Also note that ARM CPUs
159+
can exhibit significant differences from between hardware generations as well
160+
as between Apple Silicon and datacenter class CPUs.
161+
162+
When adding implementations that use the Vector API, prefer the following
163+
approach unless the specifics of the situation dictate otherwise:
164+
* Provide an equivalent scalar implementation in code, if one does not already
165+
exist.
166+
* Use configuration flags and hardware support detection to ensure that
167+
vectorized implementation is only selected when running on hardware where it is
168+
expected to perform better than its scalar equivalent.
169+
* Add tests that ensure the behavior of the vectorized and scalar
170+
implementations match.
171+
* Include micro-benchmarks that demonstrate the performance benefits of the
172+
vectorized implementation compared to the scalar equivalent logic. Ensure that
173+
the benefits hold for all CPU architectures on which the vectorized
174+
implementation is enabled.
175+
147176
## Keep pom.xml clean and sorted
148177

149178
There are several plugins in place to keep pom.xml clean.

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: "Verify checked out commits and setup Java"
33
inputs:
44
java-version:
55
description: "Java version to setup"
6-
default: 24
6+
default: 25.0.1
77
cache:
88
description: "Cache Maven repo (true/false/restore)"
99
default: restore

.github/dependabot.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
cooldown:
8+
# Apply 7 day cooldown to avoid updating dependencies right away. This reduces the opportunity window
9+
# when supply chain is compromised.
10+
default-days: 7
711
- package-ecosystem: "maven"
812
directory: "/"
913
schedule:
1014
interval: "daily"
11-
assignees:
12-
- wendigo
1315
open-pull-requests-limit: 10
16+
cooldown:
17+
# Apply 7 day cooldown to avoid updating dependencies right away. This reduces the opportunity window
18+
# when supply chain is compromised. This doesn't apply to the dependencies that we own and release.
19+
default-days: 7
20+
exclude:
21+
- io.airlift:*
22+
- io.trino:*

.github/workflows/ci.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ jobs:
7070
fail-fast: false
7171
matrix:
7272
include:
73-
- { java-version: 25, cache: 'true', cleanup-node: true }
73+
- { java-version: 25.0.1, cache: 'true', cleanup-node: true }
7474
- { java-version: 26-ea, cache: 'restore', cleanup-node: true }
7575
timeout-minutes: 45
7676
steps:
77-
- uses: actions/checkout@v5
77+
- uses: actions/checkout@v6
7878
with:
7979
fetch-depth: 0 # checkout all commits, as the build result depends on `git describe` equivalent
8080
ref: |
@@ -107,7 +107,7 @@ jobs:
107107
runs-on: ubuntu-latest
108108
timeout-minutes: 45
109109
steps:
110-
- uses: actions/checkout@v5
110+
- uses: actions/checkout@v6
111111
with:
112112
fetch-depth: 0 # checkout all commits, as the build result depends on `git describe` equivalent
113113
ref: |
@@ -143,7 +143,7 @@ jobs:
143143
outputs:
144144
matrix: ${{ steps.set-matrix.outputs.matrix }}
145145
steps:
146-
- uses: actions/checkout@v5
146+
- uses: actions/checkout@v6
147147
with:
148148
fetch-depth: 0 # checkout all commits to be able to determine merge base
149149
- name: Block illegal commits
@@ -176,7 +176,7 @@ jobs:
176176
fail-fast: false
177177
matrix: ${{ fromJson(needs.check-commits-dispatcher.outputs.matrix) }}
178178
steps:
179-
- uses: actions/checkout@v5
179+
- uses: actions/checkout@v6
180180
if: matrix.commit != ''
181181
with:
182182
fetch-depth: 0 # checkout all commits to be able to determine merge base
@@ -196,7 +196,7 @@ jobs:
196196
runs-on: ubuntu-latest
197197
timeout-minutes: 45
198198
steps:
199-
- uses: actions/checkout@v5
199+
- uses: actions/checkout@v6
200200
with:
201201
fetch-depth: 0 # checkout all commits to be able to determine merge base for GIB
202202
ref: |
@@ -207,7 +207,7 @@ jobs:
207207
timeout-minutes: 15
208208
with:
209209
cache: restore
210-
java-version: 25
210+
java-version: 25.0.1
211211
- name: Maven Install
212212
run: |
213213
# build everything to make sure dependencies of impacted modules are present
@@ -226,7 +226,7 @@ jobs:
226226
runs-on: ubuntu-latest
227227
timeout-minutes: 30
228228
steps:
229-
- uses: actions/checkout@v5
229+
- uses: actions/checkout@v6
230230
with:
231231
fetch-depth: 0 # checkout tags so version in Manifest is set properly
232232
ref: |
@@ -274,7 +274,7 @@ jobs:
274274
# TODO: config-apache-hive3
275275
timeout-minutes: 60
276276
steps:
277-
- uses: actions/checkout@v5
277+
- uses: actions/checkout@v6
278278
with:
279279
fetch-depth: 0 # checkout all commits to be able to determine merge base for GIB
280280
ref: |
@@ -326,7 +326,7 @@ jobs:
326326
runs-on: ubuntu-latest
327327
timeout-minutes: 60
328328
steps:
329-
- uses: actions/checkout@v5
329+
- uses: actions/checkout@v6
330330
with:
331331
fetch-depth: 0 # checkout all commits to be able to determine merge base for GIB
332332
ref: |
@@ -416,7 +416,7 @@ jobs:
416416
outputs:
417417
matrix: ${{ steps.set-matrix.outputs.matrix }}
418418
steps:
419-
- uses: actions/checkout@v5
419+
- uses: actions/checkout@v6
420420
with:
421421
fetch-depth: 0 # checkout all commits to be able to determine merge base for GIB
422422
ref: |
@@ -536,7 +536,7 @@ jobs:
536536
matrix: ${{ fromJson(needs.build-test-matrix.outputs.matrix) }}
537537
timeout-minutes: 60
538538
steps:
539-
- uses: actions/checkout@v5
539+
- uses: actions/checkout@v6
540540
with:
541541
fetch-depth: 0 # checkout all commits to be able to determine merge base for GIB
542542
ref: |
@@ -548,7 +548,7 @@ jobs:
548548
with:
549549
cache: restore
550550
cleanup-node: ${{ format('{0}', matrix.modules == 'plugin/trino-singlestore' || matrix.modules == 'plugin/trino-exasol' || matrix.modules == 'plugin/trino-oracle') }}
551-
java-version: ${{ matrix.jdk != '' && matrix.jdk || '25' }}
551+
java-version: ${{ matrix.jdk != '' && matrix.jdk || '25.0.1' }}
552552
- name: Maven Install
553553
run: |
554554
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
@@ -842,7 +842,7 @@ jobs:
842842
matrix: ${{ steps.set-matrix.outputs.matrix }}
843843
product-tests-changed: ${{ steps.filter.outputs.product-tests }}
844844
steps:
845-
- uses: actions/checkout@v5
845+
- uses: actions/checkout@v6
846846
with:
847847
fetch-depth: 0 # checkout all commits to be able to determine merge base for GIB
848848
ref: |
@@ -912,7 +912,7 @@ jobs:
912912
- suite-delta-lake-databricks154
913913
- suite-delta-lake-databricks164
914914
- suite-delta-lake-databricks173
915-
- suite-exasol
915+
#- suite-exasol
916916
- suite-ranger
917917
- suite-gcs
918918
- suite-hive4
@@ -1047,7 +1047,7 @@ jobs:
10471047
timeout-minutes: 130
10481048
needs: build-pt
10491049
steps:
1050-
- uses: actions/checkout@v5
1050+
- uses: actions/checkout@v6
10511051
with:
10521052
fetch-depth: 0 # checkout all commits, as the build result depends on `git describe` equivalent
10531053
ref: |

.github/workflows/milestone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v6
1818
- uses: ./.github/actions/setup
1919
timeout-minutes: 15
2020
- name: Get milestone from pom.xml

.java-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
24
1+
25

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Trino supports [reproducible builds](https://reproducible-builds.org) as of vers
4646
* Note that some npm packages used to build the web UI are only available
4747
for x86 architectures, so if you're building on Apple Silicon, you need
4848
to have Rosetta 2 installed
49-
* Java 24.0.1+, 64-bit
49+
* Java 25.0.1+, 64-bit
5050
* Docker
5151
* Turn SELinux or other systems disabling write access to the local checkout
5252
off, to allow containers to mount parts of the Trino source tree

core/trino-grammar/src/main/antlr4/io/trino/grammar/sql/SqlBase.g4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ statement
8787
RENAME COLUMN (IF EXISTS)? from=qualifiedName TO to=identifier #renameColumn
8888
| ALTER TABLE (IF EXISTS)? tableName=qualifiedName
8989
DROP COLUMN (IF EXISTS)? column=qualifiedName #dropColumn
90+
| ALTER TABLE (IF EXISTS)? tableName=qualifiedName
91+
ALTER COLUMN columnName=qualifiedName SET DEFAULT literal #setDefaultValue
92+
| ALTER TABLE (IF EXISTS)? tableName=qualifiedName
93+
ALTER COLUMN columnName=qualifiedName DROP DEFAULT #dropDefaultValue
9094
| ALTER TABLE (IF EXISTS)? tableName=qualifiedName
9195
ALTER COLUMN columnName=qualifiedName SET DATA TYPE type #setColumnType
9296
| ALTER TABLE (IF EXISTS)? tableName=qualifiedName

core/trino-main/pom.xml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
<dependency>
351351
<groupId>org.apache.lucene</groupId>
352352
<artifactId>lucene-analysis-common</artifactId>
353-
<version>10.3.1</version>
353+
<version>10.3.2</version>
354354
</dependency>
355355

356356
<dependency>
@@ -556,4 +556,29 @@
556556
<scope>test</scope>
557557
</dependency>
558558
</dependencies>
559+
560+
<build>
561+
<pluginManagement>
562+
<plugins>
563+
<plugin>
564+
<groupId>org.apache.maven.plugins</groupId>
565+
<artifactId>maven-compiler-plugin</artifactId>
566+
<configuration>
567+
<!-- Ensure incubator Vector API is on the module path for javac -->
568+
<compilerArgs combine.self="merge">
569+
<arg>${extraJavaVectorArgs}</arg>
570+
</compilerArgs>
571+
</configuration>
572+
</plugin>
573+
<plugin>
574+
<groupId>org.apache.maven.plugins</groupId>
575+
<artifactId>maven-javadoc-plugin</artifactId>
576+
<configuration>
577+
<!-- Ensure javadoc resolves incubator Vector API -->
578+
<additionalOptions combine.self="merge">${extraJavaVectorArgs}</additionalOptions>
579+
</configuration>
580+
</plugin>
581+
</plugins>
582+
</pluginManagement>
583+
</build>
559584
</project>

core/trino-main/src/main/java/io/trino/FeaturesConfig.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public class FeaturesConfig
9494
* default value is overwritten for fault tolerant execution in {@link #applyFaultTolerantExecutionDefaults()}}
9595
*/
9696
private CompressionCodec exchangeCompressionCodec = NONE;
97+
private boolean exchangeVectorizedSerdeEnabled = true;
9798
private boolean pagesIndexEagerCompactionEnabled;
9899
private boolean omitDateTimeTypePrecision;
99100
private int maxRecursionDepth = 10;
@@ -366,6 +367,19 @@ public FeaturesConfig setExchangeCompressionCodec(CompressionCodec exchangeCompr
366367
return this;
367368
}
368369

370+
@Config("exchange.experimental.vectorized-serde.enabled")
371+
@ConfigDescription("Enable using Java Vector API for faster serialization and deserialization of exchange data")
372+
public FeaturesConfig setExchangeVectorizedSerdeEnabled(boolean exchangeVectorizedSerdeEnabled)
373+
{
374+
this.exchangeVectorizedSerdeEnabled = exchangeVectorizedSerdeEnabled;
375+
return this;
376+
}
377+
378+
public boolean isExchangeVectorizedSerdeEnabled()
379+
{
380+
return exchangeVectorizedSerdeEnabled;
381+
}
382+
369383
public DataIntegrityVerification getExchangeDataIntegrityVerification()
370384
{
371385
return exchangeDataIntegrityVerification;

0 commit comments

Comments
 (0)