Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
541 changes: 541 additions & 0 deletions .github/workflows/build-meson-cloudberry.yml

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions contrib/interconnect/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to You 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.

interconnect_sources = files(
'ic_common.c',
'ic_modules.c',
'tcp/ic_tcp.c',
'udp/ic_udpifc.c',
)

# Proxy mode is gated on --enable-ic-proxy and requires libuv.
# Mirrors: ifeq ($(enable_ic_proxy), yes) in this directory's Makefile.
interconnect_mod_args = contrib_mod_args
if get_option('ic_proxy').enabled()
interconnect_sources += files(
'proxy/ic_proxy_addr.c',
'proxy/ic_proxy_backend.c',
'proxy/ic_proxy_client.c',
'proxy/ic_proxy_iobuf.c',
'proxy/ic_proxy_key.c',
'proxy/ic_proxy_main.c',
'proxy/ic_proxy_packet.c',
'proxy/ic_proxy_peer.c',
'proxy/ic_proxy_pkt_cache.c',
'proxy/ic_proxy_router.c',
)
interconnect_mod_args += {
'dependencies': contrib_mod_args['dependencies'] + [libuv],
}
endif

if host_system == 'windows'
interconnect_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
'--NAME', 'interconnect',
'--FILEDESC', 'interconnect - inter connection module',])
endif

interconnect = shared_module('interconnect',
interconnect_sources,
include_directories: include_directories('.'),
kwargs: interconnect_mod_args,
)
contrib_targets += interconnect

install_data(
'interconnect--1.0.sql',
'interconnect.control',
kwargs: contrib_data_args,
)
5 changes: 5 additions & 0 deletions contrib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ subdir('pg_walinspect')
subdir('postgres_fdw')
subdir('seg')
subdir('sepgsql')
# --enable-pax; requires protobuf >= 3.5, zstd >= 1.4 and the shared backend
if get_option('pax').enabled()
subdir('pax_storage')
endif
subdir('interconnect')
subdir('spi')
subdir('sslinfo')
# start-scripts doesn't contain build products
Expand Down
165 changes: 165 additions & 0 deletions contrib/pax_storage/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to You 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.

#
# PAX ships a standalone CMake project driven from its Makefile. The source
# lists here mirror the groups in src/cpp/cmake/pax.cmake for the default
# configuration (USE_PAX_CATALOG=ON, USE_MANIFEST_API=OFF, VEC_BUILD off).

subdir('src/cpp/storage/proto')

# --- generated extension SQL ---------------------------------------------
# cmake/pax.cmake builds tools/gen_sql.c and pipes its stdout into
# pax-cdbinit--1.0.sql, writing into the source tree; capture it instead.
pax_gen_sql = executable('pax_gen_sql',
files('tools/gen_sql.c'),
include_directories: include_directories('src/cpp'),
dependencies: [backend_code],
build_by_default: false,
install: false,
)

pax_cdbinit_sql = custom_target('pax-cdbinit--1.0.sql',
output: 'pax-cdbinit--1.0.sql',
command: [pax_gen_sql],
capture: true,
build_by_default: true,
install: true,
install_dir: dir_data / 'cdb_init.d',
)

# --- the module -----------------------------------------------------------
pax_sources = files(
'src/cpp/access/pax_access_handle.cc',
'src/cpp/access/pax_access_method_internal.cc',
'src/cpp/access/pax_deleter.cc',
'src/cpp/access/pax_dml_state.cc',
'src/cpp/access/pax_inserter.cc',
'src/cpp/access/pax_scanner.cc',
'src/cpp/access/pax_table_cluster.cc',
'src/cpp/access/pax_updater.cc',
'src/cpp/access/pax_visimap.cc',
'src/cpp/access/paxc_rel_options.cc',
'src/cpp/catalog/pax_aux_table.cc',
'src/cpp/catalog/pax_fastsequence.cc',
'src/cpp/catalog/pax_manifest.cc',
'src/cpp/catalog/pg_pax_tables.cc',
'src/cpp/clustering/clustering.cc',
'src/cpp/clustering/index_clustering.cc',
'src/cpp/clustering/lexical_clustering.cc',
'src/cpp/clustering/pax_clustering_reader.cc',
'src/cpp/clustering/pax_clustering_writer.cc',
'src/cpp/clustering/sorter_index.cc',
'src/cpp/clustering/sorter_tuple.cc',
'src/cpp/clustering/zorder_clustering.cc',
'src/cpp/clustering/zorder_utils.cc',
'src/cpp/comm/bitmap.cc',
'src/cpp/comm/bloomfilter.cc',
'src/cpp/comm/byte_buffer.cc',
'src/cpp/comm/cbdb_wrappers.cc',
'src/cpp/comm/fast_io.cc',
'src/cpp/comm/guc.cc',
'src/cpp/comm/pax_memory.cc',
'src/cpp/comm/pax_resource.cc',
'src/cpp/comm/paxc_wrappers.cc',
'src/cpp/comm/vec_numeric.cc',
'src/cpp/exceptions/CException.cc',
'src/cpp/storage/columns/pax_column.cc',
'src/cpp/storage/columns/pax_column_traits.cc',
'src/cpp/storage/columns/pax_columns.cc',
'src/cpp/storage/columns/pax_compress.cc',
'src/cpp/storage/columns/pax_decoding.cc',
'src/cpp/storage/columns/pax_delta_encoding.cc',
'src/cpp/storage/columns/pax_dict_encoding.cc',
'src/cpp/storage/columns/pax_encoding.cc',
'src/cpp/storage/columns/pax_encoding_column.cc',
'src/cpp/storage/columns/pax_encoding_non_fixed_column.cc',
'src/cpp/storage/columns/pax_encoding_utils.cc',
'src/cpp/storage/columns/pax_rlev2_decoding.cc',
'src/cpp/storage/columns/pax_rlev2_encoding.cc',
'src/cpp/storage/columns/pax_vec_bitpacked_column.cc',
'src/cpp/storage/columns/pax_vec_bpchar_column.cc',
'src/cpp/storage/columns/pax_vec_column.cc',
'src/cpp/storage/columns/pax_vec_encoding_column.cc',
'src/cpp/storage/columns/pax_vec_numeric_column.cc',
'src/cpp/storage/file_system.cc',
'src/cpp/storage/filter/pax_filter.cc',
'src/cpp/storage/filter/pax_row_filter.cc',
'src/cpp/storage/filter/pax_sparse_filter.cc',
'src/cpp/storage/filter/pax_sparse_pg_path.cc',
'src/cpp/storage/filter/pax_sparse_vec_path.cc',
'src/cpp/storage/local_file_system.cc',
'src/cpp/storage/micro_partition.cc',
'src/cpp/storage/micro_partition_file_factory.cc',
'src/cpp/storage/micro_partition_iterator.cc',
'src/cpp/storage/micro_partition_metadata.cc',
'src/cpp/storage/micro_partition_row_filter_reader.cc',
'src/cpp/storage/micro_partition_stats.cc',
'src/cpp/storage/micro_partition_stats_updater.cc',
'src/cpp/storage/micro_partition_udf.cc',
'src/cpp/storage/oper/pax_oper.cc',
'src/cpp/storage/oper/pax_oper_udf.cc',
'src/cpp/storage/oper/pax_stats.cc',
'src/cpp/storage/orc/orc_dump_reader.cpp',
'src/cpp/storage/orc/orc_format_reader.cc',
'src/cpp/storage/orc/orc_group.cc',
'src/cpp/storage/orc/orc_reader.cc',
'src/cpp/storage/orc/orc_type.cc',
'src/cpp/storage/orc/orc_vec_group.cc',
'src/cpp/storage/orc/orc_writer.cc',
'src/cpp/storage/pax.cc',
'src/cpp/storage/pax_buffer.cc',
'src/cpp/storage/pax_itemptr.cc',
'src/cpp/storage/paxc_smgr.cc',
'src/cpp/storage/proto/protobuf_stream.cc',
'src/cpp/storage/strategy.cc',
'src/cpp/storage/toast/pax_toast.cc',
'src/cpp/storage/vec/arrow_wrapper.cc',
'src/cpp/storage/vec/pax_porc_adpater.cc',
'src/cpp/storage/vec/pax_porc_vec_adpater.cc',
'src/cpp/storage/vec/pax_vec_adapter.cc',
'src/cpp/storage/vec/pax_vec_comm.cc',
'src/cpp/storage/vec/pax_vec_reader.cc',
'src/cpp/storage/wal/pax_wal.cc',
'src/cpp/storage/wal/paxc_desc.c',
'src/cpp/storage/wal/paxc_wal.cc',

)

pax_deps = [zstd, zlib, protobuf]
if get_option('lz4').enabled()
pax_deps += lz4
endif
if host_machine.system() == 'linux'
# cmake/pax.cmake: list(APPEND pax_target_link_libs uring)
pax_deps += dependency('liburing', required: true)
endif

pax_inc = include_directories(
'src/cpp',
'src/cpp/contrib/tabulate/include',
)

pax = shared_module('pax',
pax_sources,
pax_proto_sources,
include_directories: pax_inc,
override_options: ['cpp_std=c++17'],
kwargs: contrib_mod_args + {
'dependencies': contrib_mod_args['dependencies'] + pax_deps,
},
)
contrib_targets += pax
36 changes: 36 additions & 0 deletions contrib/pax_storage/src/cpp/storage/proto/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to You 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.

# The sources include these as "storage/proto/xxx.pb.h", so the generated
# headers must sit in a storage/proto directory inside the build tree.
# Generating from this subdirectory puts them exactly there; the parent adds
# src/cpp to the include path, which covers the build tree as well.
#
# The CMake build instead runs protoc during configure and writes the results
# back into the source tree (PROTO_OUTPUT_DIR is the source directory).
pax_proto_sources = []

foreach base : ['micro_partition_stats', 'pax', 'orc_proto']
pax_proto_sources += custom_target('pax_' + base + '_pb',
input: base + '.proto',
output: [base + '.pb.cc', base + '.pb.h'],
# protoc needs -I to be an exact textual prefix of the file argument.
command: [protoc,
'-I', meson.current_source_dir(),
'--cpp_out=@OUTDIR@',
meson.current_source_dir() / (base + '.proto')],
)
endforeach
Loading
Loading