Skip to content

Commit 2438a8f

Browse files
authored
Merge branch 'main' into orca-support-two-step-window-func
2 parents 33da8f3 + 8da79b3 commit 2438a8f

File tree

2,486 files changed

+1939903
-1165
lines changed

Some content is hidden

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

2,486 files changed

+1939903
-1165
lines changed

.asf.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ github:
6060
issues: true
6161
# Enable GitHub Projects for project management and planning
6262
projects: true
63+
# Enable GitHub Discussions for community discussions
64+
discussions: true
6365

6466
# Configure available merge strategies for pull requests
6567
enabled_merge_buttons:
@@ -88,6 +90,10 @@ github:
8890
- RPM Install Test Apache Cloudberry
8991
- ic-good-opt-off
9092
- ic-good-opt-on
93+
- pax-ic-good-opt-off
94+
- pax-ic-good-opt-on
95+
- pax-ic-isolation2-opt-off
96+
- pax-ic-isolation2-opt-on
9197
- ic-expandshrink
9298
- ic-singlenode
9399
- ic-resgroup-v2

.github/workflows/build-cloudberry.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,42 @@ jobs:
230230
"make_configs":["src/test/regress:installcheck-good"],
231231
"pg_settings":{"optimizer":"on"}
232232
},
233+
{"test":"pax-ic-good-opt-off",
234+
"make_configs":[
235+
"contrib/pax_storage/:pax-test",
236+
"contrib/pax_storage/:regress_test"
237+
],
238+
"pg_settings":{
239+
"optimizer":"off",
240+
"default_table_access_method":"pax"
241+
}
242+
},
243+
{"test":"pax-ic-good-opt-on",
244+
"make_configs":[
245+
"contrib/pax_storage/:pax-test",
246+
"contrib/pax_storage/:regress_test"
247+
],
248+
"pg_settings":{
249+
"optimizer":"on",
250+
"default_table_access_method":"pax"
251+
}
252+
},
253+
{"test":"pax-ic-isolation2-opt-off",
254+
"make_configs":["contrib/pax_storage/:isolation2_test"],
255+
"pg_settings":{
256+
"optimizer":"off",
257+
"default_table_access_method":"pax"
258+
},
259+
"enable_core_check":false
260+
},
261+
{"test":"pax-ic-isolation2-opt-on",
262+
"make_configs":["contrib/pax_storage/:isolation2_test"],
263+
"pg_settings":{
264+
"optimizer":"on",
265+
"default_table_access_method":"pax"
266+
},
267+
"enable_core_check":false
268+
},
233269
{"test":"ic-expandshrink",
234270
"make_configs":["src/test/isolation2:installcheck-expandshrink"]
235271
},
@@ -482,6 +518,11 @@ jobs:
482518
run: |
483519
set -eo pipefail
484520
521+
if ! time su - gpadmin -c "cd ${SRC_DIR} && git submodule update --init"; then
522+
echo "::error::Fail to pull submodule."
523+
exit 1
524+
fi
525+
485526
chmod +x "${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/build-cloudberry.sh
486527
if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/build-cloudberry.sh"; then
487528
echo "::error::Build script failed"
@@ -1267,6 +1308,10 @@ jobs:
12671308
PG_OPTS="$PG_OPTS -c optimizer=${{ matrix.pg_settings.optimizer }}"
12681309
fi
12691310
1311+
if [[ "${{ matrix.pg_settings.default_table_access_method != '' }}" == "true" ]]; then
1312+
PG_OPTS="$PG_OPTS -c default_table_access_method=${{ matrix.pg_settings.default_table_access_method }}"
1313+
fi
1314+
12701315
# Read configs into array
12711316
IFS=' ' read -r -a configs <<< "${{ join(matrix.make_configs, ' ') }}"
12721317

.github/workflows/build-dbg-cloudberry.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,11 @@ jobs:
427427
run: |
428428
set -eo pipefail
429429
430+
if ! time su - gpadmin -c "cd ${SRC_DIR} && git submodule update --init"; then
431+
echo "::error::Fail to pull submodule."
432+
exit 1
433+
fi
434+
430435
chmod +x "${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/build-cloudberry.sh
431436
if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/build-cloudberry.sh"; then
432437
echo "::error::Build script failed"

.github/workflows/coverity.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ name: Apache Cloudberry Coverity Scan
4040

4141
on:
4242
schedule:
43-
- cron: "0 0 * * *"
43+
- cron: "0 0 * * 1"
4444
workflow_dispatch:
4545

4646
permissions:
@@ -62,7 +62,8 @@ jobs:
6262
uses: actions/checkout@v4
6363
with:
6464
fetch-depth: 1
65-
65+
submodules: true
66+
6667
- name: Environment Initialization
6768
run: |
6869
if ! su - gpadmin -c "/tmp/init_system.sh"; then
@@ -72,15 +73,16 @@ jobs:
7273
7374
- name: Download Coverity build tool
7475
run: |
76+
set -euox pipefail
7577
wget -c -N https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=apache%2Fcloudberry" -O coverity_tool.tar.gz
7678
mkdir -p coverity_tool
7779
tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool
7880
chown -R gpadmin:gpadmin coverity_tool
7981
8082
- name: Build with Coverity build tool
8183
run: |
84+
set -euox pipefail
8285
WORKSPACE="${GITHUB_WORKSPACE}"
83-
sudo rm -rf /usr/local/cloudberry-db
8486
sudo chmod a+w /usr/local
8587
mkdir -p /usr/local/cloudberry-db/lib
8688
sudo cp /usr/local/xerces-c/lib/libxerces-c.so \
@@ -96,6 +98,7 @@ jobs:
9698
--enable-ic-proxy \
9799
--enable-orafce \
98100
--enable-orca \
101+
--enable-pax \
99102
--enable-pxf \
100103
--enable-tap-tests \
101104
--with-gssapi \
@@ -122,4 +125,4 @@ jobs:
122125
123126
--form version="Commit $GITHUB_SHA" \
124127
--form description="Build submitted via CI" \
125-
https://scan.coverity.com/builds?project=apache%2Fcloudberry
128+
https://scan.coverity.com/builds?project=apache%2Fcloudberry

.github/workflows/sonarqube.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# --------------------------------------------------------------------
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed
5+
# with this work for additional information regarding copyright
6+
# ownership. The ASF licenses this file to You under the Apache
7+
# License, Version 2.0 (the "License"); you may not use this file
8+
# except in compliance with the License. You may obtain a copy of the
9+
# License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16+
# implied. See the License for the specific language governing
17+
# permissions and limitations under the License.
18+
#
19+
# --------------------------------------------------------------------
20+
# GitHub Actions Workflow: Apache Cloudberry SonarQube Pipeline
21+
# --------------------------------------------------------------------
22+
# Description:
23+
#
24+
# This workflow performs scheduled SonarQube analysis for Cloudberry.
25+
#
26+
# Workflow Overview:
27+
# 1. **Check Skip**:
28+
# - workflow run currently is limited to "apache" GitHub organization
29+
#
30+
# 2. **scan Job**:
31+
# - performs scan and upload result to https://sonarcloud.io/project/overview?id=apache_cloudberry
32+
# Triggers:
33+
# - Weekly schedule
34+
# - optional manual dispatch.
35+
#
36+
# Notes:
37+
# - SONARCLOUD_TOKEN secret is provided by the ASF Infra team
38+
# --------------------------------------------------------------------
39+
name: Apache Cloudberry SonarQube Cloud Analysis
40+
41+
on:
42+
schedule:
43+
- cron: "0 0 * * 1"
44+
workflow_dispatch:
45+
46+
permissions:
47+
contents: read
48+
49+
jobs:
50+
sonarqube-analysis:
51+
runs-on: ubuntu-22.04
52+
if: ${{ github.repository_owner == 'apache' }}
53+
54+
container:
55+
image: apache/incubator-cloudberry:cbdb-build-rocky9-latest
56+
options: >-
57+
--user root
58+
-h cdw
59+
env:
60+
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
61+
62+
steps:
63+
- name: Checkout Apache Cloudberry
64+
uses: actions/checkout@v4
65+
with:
66+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
67+
submodules: true
68+
69+
- name: Environment Initialization
70+
run: |
71+
if ! su - gpadmin -c "/tmp/init_system.sh"; then
72+
echo "::error::Container initialization failed"
73+
exit 1
74+
fi
75+
76+
- name: Install Build Wrapper
77+
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5
78+
79+
- name: Run Build Wrapper
80+
run: |
81+
set -euox pipefail
82+
sudo chmod a+w /usr/local
83+
mkdir -p /usr/local/cloudberry-db/lib
84+
sudo cp /usr/local/xerces-c/lib/libxerces-c.so \
85+
/usr/local/xerces-c/lib/libxerces-c-3.3.so \
86+
/usr/local/cloudberry-db/lib
87+
sudo chown -R gpadmin:gpadmin /usr/local/cloudberry-db
88+
export LD_LIBRARY_PATH=/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH
89+
./configure --prefix=/usr/local/cloudberry-db \
90+
--disable-external-fts \
91+
--enable-gpcloud \
92+
--enable-ic-proxy \
93+
--enable-orafce \
94+
--enable-orca \
95+
--enable-pax \
96+
--enable-pxf \
97+
--enable-tap-tests \
98+
--with-gssapi \
99+
--with-ldap \
100+
--with-libxml \
101+
--with-lz4 \
102+
--with-openssl \
103+
--with-pam \
104+
--with-perl \
105+
--with-pgport=5432 \
106+
--with-python \
107+
--with-pythonsrc-ext \
108+
--with-ssl=openssl \
109+
--with-uuid=e2fs \
110+
--with-includes=/usr/local/xerces-c/include \
111+
--with-libraries=/usr/local/cloudberry-db/lib
112+
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make -j$(nproc)
113+
114+
- name: SonarQube Scan
115+
uses: SonarSource/sonarqube-scan-action@v5
116+
env:
117+
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
118+
with:
119+
args: >
120+
--define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"

.gitmodules

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
[submodule "gpcontrib/gpcloud/test/googletest"]
22
path = gpcontrib/gpcloud/test/googletest
33
url = https://github.com/google/googletest.git
4+
[submodule "contrib/pax_storage/src/cpp/contrib/googletest"]
5+
path = contrib/pax_storage/src/cpp/contrib/googletest
6+
url = https://github.com/google/googletest.git
7+
branch = v1.15.x
8+
[submodule "contrib/pax_storage/src/cpp/contrib/tabulate"]
9+
path = contrib/pax_storage/src/cpp/contrib/tabulate
10+
url = https://github.com/p-ranav/tabulate.git
11+
[submodule "contrib/pax_storage/src/cpp/contrib/googlebench"]
12+
path = contrib/pax_storage/src/cpp/contrib/googlebench
13+
url = https://github.com/google/benchmark.git
14+
[submodule "contrib/pax_storage/src/cpp/contrib/cpp-stub"]
15+
path = contrib/pax_storage/src/cpp/contrib/cpp-stub
16+
url = https://github.com/coolxv/cpp-stub.git
17+
[submodule "dependency/yyjson"]
18+
path = dependency/yyjson
19+
url = https://github.com/ibireme/yyjson.git
20+

GNUmakefile.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ all:
3131
$(MAKE) -C contrib/pg_buffercache all
3232
ifeq ($(with_openssl), yes)
3333
$(MAKE) -C contrib/sslinfo all
34+
endif
35+
ifeq ($(enable_pax), yes)
36+
$(MAKE) -C contrib/pax_storage all
3437
endif
3538
$(MAKE) -C gpMgmt all
3639
$(MAKE) -C gpcontrib all
@@ -73,6 +76,9 @@ install:
7376
$(MAKE) -C contrib/tablefunc $@
7477
$(MAKE) -C contrib/passwordcheck $@
7578
$(MAKE) -C contrib/pg_buffercache $@
79+
ifeq ($(enable_pax), yes)
80+
$(MAKE) -C contrib/pax_storage $@
81+
endif
7682
ifeq ($(with_openssl), yes)
7783
$(MAKE) -C contrib/sslinfo $@
7884
endif
@@ -180,6 +186,9 @@ ICW_TARGETS += contrib/extprotocol contrib/dblink contrib/pg_trgm
180186
ICW_TARGETS += contrib/indexscan contrib/hstore contrib/pgcrypto
181187
ICW_TARGETS += contrib/tablefunc contrib/passwordcheck
182188
ICW_TARGETS += contrib/pg_buffercache
189+
ifeq ($(enable_pax), yes)
190+
ICW_TARGETS += contrib/pax_storage
191+
endif
183192
# sslinfo depends on openssl
184193
ifeq ($(with_openssl), yes)
185194
ICW_TARGETS += contrib/sslinfo

LICENSE

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ The PostgreSQL software includes:
213213
src/bin/pg_controldata/pg_controldata.c
214214
copyright (c) Oliver Elphick <[email protected]>, 2001
215215

216+
gpMgmt/bin/pythonSrc/ext/behave-1.2.6.tar.gz
217+
see licenses/LICENSE-bsd2-behave.txt
218+
219+
gpMgmt/bin/pythonSrc/ext/mock-1.0.1.tar.gz
220+
see licenses/LICENSE-bsd2-mock.txt
221+
216222
----------------------------
217223
BSD-4-Clause (University of California-Specific)
218224

@@ -239,6 +245,21 @@ The PostgreSQL software includes:
239245
src/backend/libpq/sha2.h
240246
see licenses/LICENSE-bsd3-sha2.txt
241247

248+
gpMgmt/bin/pythonSrc/ext/psutil-5.7.0.tar.gz
249+
see licenses/LICENSE-bsd3-psutil.txt
250+
251+
----------------------------
252+
MIT LICENSE
253+
254+
gpMgmt/bin/pythonSrc/ext/PyYAML-5.3.1.tar.gz
255+
see licenses/LICENSE-pyyaml.txt
256+
257+
gpMgmt/bin/pythonSrc/ext/setuptools-36.6.0.tar.gz
258+
see licenses/LICENSE-setuptools.txt
259+
260+
gpMgmt/bin/pythonSrc/ext/parse-1.8.2.tar.gz
261+
see licenses/LICENSE-parse.txt
262+
242263
----------------------------
243264
Internet Systems Consortium/Internet Software Consortium (ISC) LICENSE
244265

@@ -335,4 +356,4 @@ This product includes code from pg_cron under PostgreSQL license:
335356
/src/backend/task/job_metadata.c
336357
/src/backend/task/pg_cron.c
337358

338-
see licenses/LICENSE-citusdata.txt
359+
see licenses/LICENSE-citusdata.txt

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
<img alt="Coverity Scan Build Status"
2424
src="https://scan.coverity.com/projects/31473/badge.svg"/>
2525
</a>
26-
26+
<a href="https://sonarcloud.io/summary/new_code?id=apache_cloudberry">
27+
<img alt="SonarQube Cloud" src="https://sonarcloud.io/images/project_badges/sonarcloud-highlight.svg" width="100px">
28+
</a>
2729
---------
2830

2931
## Introduction

0 commit comments

Comments
 (0)