Skip to content

Commit 1af6be6

Browse files
committed
Merge upstream/master
2 parents 771001e + 3f588e5 commit 1af6be6

File tree

350 files changed

+34813
-11918
lines changed

Some content is hidden

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

350 files changed

+34813
-11918
lines changed

.github/workflows/prestocpp-linux-adapters-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
prestocpp-linux-adapters-build:
1212
runs-on: ubuntu-22.04
1313
container:
14-
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
14+
image: prestodb/presto-native-dependency:0.297-202512180933-75d7d4ea
1515
concurrency:
1616
group: ${{ github.workflow }}-prestocpp-linux-adapters-build-${{ github.event.pull_request.number }}
1717
cancel-in-progress: true

.github/workflows/prestocpp-linux-build-and-unit-test.yml

Lines changed: 113 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-22.04
3131
needs: changes
3232
container:
33-
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
33+
image: prestodb/presto-native-dependency:0.297-202512180933-75d7d4ea
3434
concurrency:
3535
group: ${{ github.workflow }}-prestocpp-linux-build-test-${{ github.event.pull_request.number }}
3636
cancel-in-progress: true
@@ -135,7 +135,10 @@ jobs:
135135
needs: [changes, prestocpp-linux-build-for-test]
136136
runs-on: ubuntu-22.04
137137
container:
138-
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
138+
image: prestodb/presto-native-dependency:0.297-202512180933-75d7d4ea
139+
volumes:
140+
- /usr:/host_usr
141+
- /opt:/host_opt
139142
env:
140143
MAVEN_OPTS: -Xmx4G -XX:+ExitOnOutOfMemoryError
141144
MAVEN_FAST_INSTALL: -B -V --quiet -T 1C -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true
@@ -156,6 +159,23 @@ jobs:
156159
# it doesn't work
157160
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
158161

162+
# We cannot use the github action to free disk space from the runner
163+
# because we are in the container and not on the runner anymore.
164+
- name: Free Disk Space
165+
run: |
166+
# Re-used from free-disk-space github action.
167+
getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }
168+
# Show before
169+
echo "Original available disk space: " $(getAvailableSpace)
170+
# Remove DotNet.
171+
rm -rf /host_usr/share/dotnet || true
172+
# Remove android
173+
rm -rf /host_usr/local/lib/android || true
174+
# Remove CodeQL
175+
rm -rf /host_opt/hostedtoolcache/CodeQL || true
176+
# Show after
177+
echo "New available disk space: " $(getAvailableSpace)
178+
159179
- name: Download artifacts
160180
if: |
161181
github.event_name == 'schedule' || needs.changes.outputs.codechange == 'true'
@@ -201,14 +221,19 @@ jobs:
201221
github.event_name == 'schedule' || needs.changes.outputs.codechange == 'true'
202222
run: |
203223
export PRESTO_SERVER_PATH="${GITHUB_WORKSPACE}/presto-native-execution/_build/release/presto_cpp/main/presto_server"
204-
export TESTFILES=`find ./presto-native-execution/src/test -type f -name 'TestPrestoNative*.java'`
224+
# Find TestPrestoNative*.java files and iceberg test files
225+
export TESTFILES=$(find ./presto-native-execution/src/test -type f -name 'TestPrestoNative*.java'; find ./presto-native-execution/src/test/java/com/facebook/presto/nativeworker/iceberg -type f -name '*.java')
205226
# Convert file paths to comma separated class names
206227
export TESTCLASSES=
207228
for test_file in $TESTFILES
208229
do
209230
tmp=${test_file##*/}
210231
test_class=${tmp%%\.*}
211-
export TESTCLASSES="${TESTCLASSES},$test_class"
232+
# Exclude CTE tests as they can fail with unknown functions.
233+
# Issue https://github.com/prestodb/presto/issues/26827.
234+
if [[ ! "$test_class" =~ ^TestPrestoNativeCte\.* ]]; then
235+
export TESTCLASSES="${TESTCLASSES},$test_class"
236+
fi
212237
done
213238
export TESTCLASSES=${TESTCLASSES#,}
214239
echo "TESTCLASSES = $TESTCLASSES"
@@ -235,7 +260,10 @@ jobs:
235260
storage-format: [PARQUET, DWRF]
236261
enable-sidecar: [true, false]
237262
container:
238-
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
263+
image: prestodb/presto-native-dependency:0.297-202512180933-75d7d4ea
264+
volumes:
265+
- /usr:/host_usr
266+
- /opt:/host_opt
239267
env:
240268
MAVEN_OPTS: -Xmx4G -XX:+ExitOnOutOfMemoryError
241269
MAVEN_FAST_INSTALL: -B -V --quiet -T 1C -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true
@@ -256,6 +284,23 @@ jobs:
256284
# it doesn't work
257285
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
258286

287+
# We cannot use the github action to free disk space from the runner
288+
# because we are in the container and not on the runner anymore.
289+
- name: Free Disk Space
290+
run: |
291+
# Re-used from free-disk-space github action.
292+
getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }
293+
# Show before
294+
echo "Original available disk space: " $(getAvailableSpace)
295+
# Remove DotNet.
296+
rm -rf /host_usr/share/dotnet || true
297+
# Remove android
298+
rm -rf /host_usr/local/lib/android || true
299+
# Remove CodeQL
300+
rm -rf /host_opt/hostedtoolcache/CodeQL || true
301+
# Show after
302+
echo "New available disk space: " $(getAvailableSpace)
303+
259304
- name: Download artifacts
260305
if: |
261306
github.event_name == 'schedule' || needs.changes.outputs.codechange == 'true'
@@ -343,7 +388,10 @@ jobs:
343388
group: ${{ github.workflow }}-prestocpp-linux-presto-on-spark-e2e-tests-${{ matrix.storage-format }}-${{ matrix.enable-sidecar }}-${{ github.event.pull_request.number }}
344389
cancel-in-progress: true
345390
container:
346-
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
391+
image: prestodb/presto-native-dependency:0.297-202512180933-75d7d4ea
392+
volumes:
393+
- /usr:/host_usr
394+
- /opt:/host_opt
347395
env:
348396
MAVEN_OPTS: -Xmx4G -XX:+ExitOnOutOfMemoryError
349397
MAVEN_FAST_INSTALL: -B -V --quiet -T 1C -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true
@@ -364,6 +412,23 @@ jobs:
364412
# it doesn't work
365413
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
366414

415+
# We cannot use the github action to free disk space from the runner
416+
# because we are in the container and not on the runner anymore.
417+
- name: Free Disk Space
418+
run: |
419+
# Re-used from free-disk-space github action.
420+
getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }
421+
# Show before
422+
echo "Original available disk space: " $(getAvailableSpace)
423+
# Remove DotNet.
424+
rm -rf /host_usr/share/dotnet || true
425+
# Remove android
426+
rm -rf /host_usr/local/lib/android || true
427+
# Remove CodeQL
428+
rm -rf /host_opt/hostedtoolcache/CodeQL || true
429+
# Show after
430+
echo "New available disk space: " $(getAvailableSpace)
431+
367432
- name: Download artifacts
368433
if: |
369434
github.event_name == 'schedule' || needs.changes.outputs.codechange == 'true'
@@ -436,7 +501,10 @@ jobs:
436501
needs: [changes, prestocpp-linux-build-for-test]
437502
runs-on: ubuntu-22.04
438503
container:
439-
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
504+
image: prestodb/presto-native-dependency:0.297-202512180933-75d7d4ea
505+
volumes:
506+
- /usr:/host_usr
507+
- /opt:/host_opt
440508
concurrency:
441509
group: ${{ github.workflow }}-prestocpp-linux-presto-sidecar-tests-${{ github.event.pull_request.number }}
442510
cancel-in-progress: true
@@ -459,6 +527,23 @@ jobs:
459527
# it doesn't work
460528
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
461529

530+
# We cannot use the github action to free disk space from the runner
531+
# because we are in the container and not on the runner anymore.
532+
- name: Free Disk Space
533+
run: |
534+
# Re-used from free-disk-space github action.
535+
getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }
536+
# Show before
537+
echo "Original available disk space: " $(getAvailableSpace)
538+
# Remove DotNet.
539+
rm -rf /host_usr/share/dotnet || true
540+
# Remove android
541+
rm -rf /host_usr/local/lib/android || true
542+
# Remove CodeQL
543+
rm -rf /host_opt/hostedtoolcache/CodeQL || true
544+
# Show after
545+
echo "New available disk space: " $(getAvailableSpace)
546+
462547
- name: Download artifacts
463548
if: |
464549
github.event_name == 'schedule' || needs.changes.outputs.codechange == 'true'
@@ -528,7 +613,10 @@ jobs:
528613
needs: [changes, prestocpp-linux-build-for-test]
529614
runs-on: ubuntu-22.04
530615
container:
531-
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
616+
image: prestodb/presto-native-dependency:0.297-202512180933-75d7d4ea
617+
volumes:
618+
- /usr:/host_usr
619+
- /opt:/host_opt
532620
concurrency:
533621
group: ${{ github.workflow }}-prestocpp-linux-presto-plan-checker-router-plugin-tests-${{ github.event.pull_request.number }}
534622
cancel-in-progress: true
@@ -551,6 +639,23 @@ jobs:
551639
# it doesn't work
552640
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
553641

642+
# We cannot use the github action to free disk space from the runner
643+
# because we are in the container and not on the runner anymore.
644+
- name: Free Disk Space
645+
run: |
646+
# Re-used from free-disk-space github action.
647+
getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }
648+
# Show before
649+
echo "Original available disk space: " $(getAvailableSpace)
650+
# Remove DotNet.
651+
rm -rf /host_usr/share/dotnet || true
652+
# Remove android
653+
rm -rf /host_usr/local/lib/android || true
654+
# Remove CodeQL
655+
rm -rf /host_opt/hostedtoolcache/CodeQL || true
656+
# Show after
657+
echo "New available disk space: " $(getAvailableSpace)
658+
554659
- name: Download artifacts
555660
if: |
556661
github.event_name == 'schedule' || needs.changes.outputs.codechange == 'true'

.github/workflows/prestocpp-linux-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
contents: read
2727
needs: changes
2828
container:
29-
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
29+
image: prestodb/presto-native-dependency:0.297-202512180933-75d7d4ea
3030
volumes:
3131
- /usr:/host_usr
3232
- /opt:/host_opt

.github/workflows/prestocpp-macos-build.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
prestocpp-macos-build-engine:
2828
strategy:
2929
matrix:
30-
os: [macos-13, macos-15]
30+
os: [macos-15]
3131
runs-on: ${{ matrix.os }}
3232
needs: changes
3333
permissions:
@@ -121,13 +121,6 @@ jobs:
121121
export PATH=$(brew --prefix m4)/bin:$(brew --prefix bison)/bin:${PATH}
122122
export BOOST_ROOT=${INSTALL_PREFIX}
123123
cd presto-native-execution
124-
if [[ "${{ matrix.os }}" == "macos-13" ]]; then
125-
# Velox sets -Wno-sign-compare but it needs to apply to Arrow.
126-
# There is also a conflict with Arrow and Velox (Glog) macros which are fixed
127-
# in a newer version of Arrow. The issues cannot be easily fixed in Velox so
128-
# override the warnings that would throw errors.
129-
export CXXFLAGS="-Wno-error=sign-compare -Wno-error=macro-redefined"
130-
fi
131124
cmake -B _build/${BUILD_TYPE} \
132125
-GNinja -DTREAT_WARNINGS_AS_ERRORS=1 \
133126
-DENABLE_ALL_WARNINGS=1 \

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ benchmark_outputs
2828
*.class
2929
.checkstyle
3030
.mvn/timing.properties
31+
.mvn/maven.config
3132
.editorconfig
3233
node_modules
3334
presto-docs-venv/
35+
.m2/
3436

3537
#==============================================================================#
3638
# presto-native-execution

NOTICES

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
The code for the t-digest was originally authored by Ted Dunning
22

33
Adrien Grand contributed the heart of the AVLTreeDigest (https://github.com/jpountz)
4+
5+
This product includes software from the Apache DataSketches C++ project.
6+
* https://github.com/apache/datasketches-cpp/tree/master/theta
7+
which contains the following NOTICE file:
8+
-------
9+
Apache DataSketches C++
10+
Copyright 2025 The Apache Software Foundation
11+
12+
Copyright 2015-2018 Yahoo Inc.
13+
Copyright 2019-2020 Verizon Media
14+
Copyright 2021- Yahoo Inc.
15+
16+
This product includes software developed at
17+
The Apache Software Foundation (http://www.apache.org/).
18+
19+
Prior to moving to ASF, the software for this project was developed at
20+
Yahoo Inc. (https://developer.yahoo.com).
21+
-------

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Presto is a standard Maven project. Simply run the following command from the pr
3131

3232
On the first build, Maven will download all the dependencies from the internet and cache them in the local repository (`~/.m2/repository`), which can take a considerable amount of time. Subsequent builds will be faster.
3333

34+
When building multiple Presto projects locally, each project may write updates to the user's global M2 cache, which could cause build issues. You can configure your local `.mvn/maven.config` to support a local cache specific to that project via `-Dmaven.repo.local=./.m2/repository`.
35+
3436
Presto has a comprehensive set of unit tests that can take several minutes to run. You can disable the tests when building:
3537

3638
./mvnw clean install -DskipTests

pom.xml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<dep.commons.compress.version>1.27.1</dep.commons.compress.version>
8484
<dep.protobuf-java.version>4.29.0</dep.protobuf-java.version>
8585
<dep.jetty.version>12.0.29</dep.jetty.version>
86-
<dep.netty.version>4.1.128.Final</dep.netty.version>
86+
<dep.netty.version>4.1.130.Final</dep.netty.version>
8787
<dep.reactor-netty.version>1.2.8</dep.reactor-netty.version>
8888
<dep.snakeyaml.version>2.5</dep.snakeyaml.version>
8989
<dep.gson.version>2.12.1</dep.gson.version>
@@ -500,6 +500,13 @@
500500
<type>test-jar</type>
501501
</dependency>
502502

503+
<dependency>
504+
<groupId>com.facebook.presto</groupId>
505+
<artifactId>presto-delta</artifactId>
506+
<version>${project.version}</version>
507+
<type>test-jar</type>
508+
</dependency>
509+
503510
<dependency>
504511
<groupId>com.teradata</groupId>
505512
<artifactId>re2j-td</artifactId>
@@ -1547,7 +1554,7 @@
15471554
<dependency>
15481555
<groupId>com.microsoft.sqlserver</groupId>
15491556
<artifactId>mssql-jdbc</artifactId>
1550-
<version>12.10.2.jre8</version>
1557+
<version>13.2.1.jre11</version>
15511558
</dependency>
15521559

15531560
<dependency>
@@ -1636,7 +1643,7 @@
16361643
<dependency>
16371644
<groupId>org.apache.thrift</groupId>
16381645
<artifactId>libthrift</artifactId>
1639-
<version>0.14.1</version>
1646+
<version>0.18.1</version>
16401647
<exclusions>
16411648
<exclusion>
16421649
<groupId>org.apache.httpcomponents</groupId>

presto-accumulo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<air.main.basedir>${project.parent.basedir}</air.main.basedir>
1818
<dep.accumulo.version>1.10.1</dep.accumulo.version>
1919
<dep.curator.version>2.12.0</dep.curator.version>
20-
<dep.log4j.version>2.24.3</dep.log4j.version>
20+
<dep.log4j.version>2.25.3</dep.log4j.version>
2121
<air.check.skip-modernizer>true</air.check.skip-modernizer>
2222
</properties>
2323

presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/Field.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,6 @@ public Field(Optional<NodeLocation> nodeLocation, Optional<QualifiedName> relati
8686
this.aliased = aliased;
8787
}
8888

89-
public static Field newUnqualified(Optional<String> name, Type type)
90-
{
91-
requireNonNull(name, "name is null");
92-
requireNonNull(type, "type is null");
93-
94-
return new Field(Optional.empty(), Optional.empty(), name, type, false, Optional.empty(), Optional.empty(), false);
95-
}
96-
9789
public Optional<NodeLocation> getNodeLocation()
9890
{
9991
return nodeLocation;

0 commit comments

Comments
 (0)