zhangwenchao-123 commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2459112745
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
Review Comment:
fixed
##########
src/config/Ports.yml:
##########
@@ -9,3 +9,6 @@ postgres:
greenplum:
name: Greenplum DB
+
+cloudberry:
+ name: Cloudberry DB
Review Comment:
fixed
##########
src/madpack/madpack.py:
##########
@@ -1482,6 +1484,9 @@ def main(argv):
else:
# only need the first two digits for <= 4.3.4
dbver = '.'.join(map(str, dbver_split[:2]))
+ elif portid == 'cloudberry':
+ # Assume Cloudberry will stick to semantic versioning
Review Comment:
fixed
##########
src/ports/cloudberry/cmake/FindCloudberry_1.cmake:
##########
Review Comment:
fixed
##########
requirements.txt:
##########
Review Comment:
In apache cloudberry, it's not needed. I will remove it.
##########
src/madpack/utilities.py:
##########
@@ -189,6 +189,8 @@ def get_dbver(con_args, portid):
# for Greenplum the 3rd digit is necessary to differentiate
# 4.3.5+ from versions < 4.3.5
match = re.search("Greenplum[a-zA-Z\s]*(\d+\.\d+\.\d+)",
versionStr)
+ elif portid == 'cloudberry':
+ match = re.search("Cloudberry[a-zA-Z\s]*(\d+\.\d+\.\d+)",
versionStr)
Review Comment:
Cloudberry is enough to achieve our goal, while Apache Cloudberry is more
accurate that maybe is better.
##########
src/ports/postgres/cmake/PostgreSQLUtils.cmake:
##########
@@ -87,6 +87,9 @@ function(determine_target_versions OUT_VERSIONS)
# Starting Postgresql 10, semantic versioning will be followed,
# implying we only need 1 folder for same major versions
set(VERSION ${${PORT_UC}_VERSION_MAJOR})
+ elseif(${PORT_UC} STREQUAL "CLOUDBERRY")
+ # Assumes CBDB always follows semantic versioning
Review Comment:
fiexd
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
@@ -0,0 +1,46 @@
+# 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.
+
+# Set defaults that can be overridden by files that include this file:
+if(NOT DEFINED _FIND_PACKAGE_FILE)
+ set(_FIND_PACKAGE_FILE "${CMAKE_CURRENT_LIST_FILE}")
+endif(NOT DEFINED _FIND_PACKAGE_FILE)
+
+# Set parameters for calling FindPostgreSQL.cmake
+set(_NEEDED_PG_CONFIG_PACKAGE_NAME "Apache Cloudberry")
+set(_PG_CONFIG_VERSION_NUM_MACRO "GP_VERSION_NUM")
+set(_PG_CONFIG_VERSION_MACRO "GP_VERSION")
+set(_SEARCH_PATH_HINTS
+ "/usr/local/cloudberry-db-devel/bin"
+ "/usr/local/cloudberry-db/bin"
+ "/usr/local/cloudberry/bin"
+ "$ENV{GPHOME}/bin"
+)
+
+include("${CMAKE_CURRENT_LIST_DIR}/../../postgres/cmake/FindPostgreSQL.cmake")
+
+if(${PKG_NAME}_FOUND)
+ # server/funcapi.h ultimately includes server/access/xact.h, from which
+ # cdb/cdbpathlocus.h is included
+ execute_process(COMMAND ${${PKG_NAME}_PG_CONFIG} --pkgincludedir
+ OUTPUT_VARIABLE ${PKG_NAME}_ADDITIONAL_INCLUDE_DIRS
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ set(${PKG_NAME}_ADDITIONAL_INCLUDE_DIRS
+ "${${PKG_NAME}_ADDITIONAL_INCLUDE_DIRS}/internal")
+ message("-- Detected Cloudberry")
Review Comment:
OK
##########
src/madpack/madpack.py:
##########
@@ -1344,14 +1346,14 @@ def set_dynamic_library_path_in_database(dbver_split,
madlib_library_path):
(portid == 'postgres' and is_rev_gte(dbver_split,
get_rev_num('13.0')))):
libdir = libdir.decode()
- libdir = libdir.strip()+'/postgresql'
+ libdir = str(libdir.strip(), encoding='utf-8')+'/postgresql'
Review Comment:
cool!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]