You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@madlib.apache.org by "zhangwenchao-123 (via GitHub)" <gi...@apache.org> on 2025/10/21 09:05:44 UTC
[PR] Support cloudberry [madlib]
zhangwenchao-123 opened a new pull request, #627:
URL: https://github.com/apache/madlib/pull/627
<!--
Thanks for sending a pull request! Here are some tips for you:
1. Refer to this link for contribution guidelines https://cwiki.apache.org/confluence/display/MADLIB/Contribution+Guidelines
2. Please Provide the Module Name, a JIRA Number and a short description about your changes.
-->
- [ ] Add the module name, JIRA# to PR/commit and description.
- [ ] Add tests for the change.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2450152728
##########
src/ports/cloudberry/3/CMakeLists.txt:
##########
Review Comment:
Apache MADlib should be able to build against both the REL_2_STABLE and main (3.0.0) branches. I believe it is better to keep support for Cloudberry 3.0. As main (3.0) has not released, maybe support for 3.0 can be labelled as experimental.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3430167077
As @tuhaihe mentioned about ASF headers, when I ran the Apache Release Audit Tool (RAT), the following is seen (run the following in the root of the MADlib source: mvn apache-rat:check):
```
⯠head -30 target/rat.txt
*****************************************************
Summary
-------
Generated at: 2025-10-21T18:46:08-07:00
Notes: 4
Binaries: 5
Archives: 0
Standards: 311
Apache Licensed: 307
Generated Documents: 0
JavaDocs are generated and so license header is optional
Generated files do not required license headers
4 Unknown Licenses
*******************************
Unapproved licenses:
src/ports/cloudberry/cmake/FindCloudberry.cmake
src/ports/cloudberry/cmake/FindCloudberry_1.cmake
src/ports/cloudberry/cmake/FindCloudberry_2.cmake
src/ports/cloudberry/cmake/FindCloudberry_3.cmake
*******************************
```
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2447527242
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
Review Comment:
We also need to add the standard Apache license header to the new files, including `FindCloudberry.cmake`, and `FindCloudberry_1.cmake` and other files.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangyue1818 (via GitHub)" <gi...@apache.org>.
zhangyue1818 commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2786448675
##########
src/ports/cloudberry/cmake/FindCloudberry_2.cmake:
##########
Review Comment:
fix in [e665a9f](https://github.com/apache/madlib/pull/627/commits/e665a9f35dabb5c8eb134fcdda64809ddb1ef0d4)
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3460597324
Hi @zhangwenchao-123 could you rebase your commits on the latest `madlib2-master`? Let's see if the CI can pass successfully. Thanks!
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3430160545
Have you looked at the website updates (https://madlib.apache.org - https://github.com/apache/madlib-site) other source documentation files? We will need to review these as well.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3430292638
> > > Have you looked at the website updates (https://madlib.apache.org - https://github.com/apache/madlib-site) other source documentation files? We will need to review these as well.
> >
> >
> > No, have not. Should we update this website?
>
> Yes, we should update the related description on the website. Iād like to help with this.
Nice!
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3465918082
> Hi @zhangwenchao-123 could you rebase your commits on the latest `madlib2-master`? Let's see if the CI can pass successfully. Thanks!
It's the NOTICE file check failed, I have fixed and test whether it can pass.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangyue1818 (via GitHub)" <gi...@apache.org>.
zhangyue1818 commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3883251048
> > Hi @zhangyue1818 thanks for your contribution. But I tested this PR in Cloudberry 2.0 and the coming Cloudberry 2.1 release, one test case failed:
>
> The error above occurred in a Docker container environment. I retested MADlib installation and install-check on Cloudberry 2.0 and 2.1 running in a virtual machine, and all tests (including assoc_rules) passed without errors.
>
> Thanks again.
fix in https://github.com/apache/madlib/pull/627/commits/b57e5a9ce5c3c8ed56c004928af3d738b010e97a
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2450227270
##########
src/ports/cloudberry/3/CMakeLists.txt:
##########
Review Comment:
Agree with ed.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2450286946
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
@@ -0,0 +1,33 @@
+# 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"
Review Comment:
Have added path /usr/local/cloudberry/bin
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2447490112
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
@@ -0,0 +1,33 @@
+# 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"
+ "$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")
+ if(_PG_CONFIG_HEADER_CONTENTS MATCHES "#define SERVERLESS 1")
+ message("-- Detected Hashdata Cloud (Cloudberry Serverless)")
+ set(CLOUDBERRY_SERVERLESS TRUE PARENT_SCOPE)
Review Comment:
Remove these lines?
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
@@ -0,0 +1,33 @@
+# 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"
Review Comment:
Is there a need to add `/usr/local/cbdb/bin`?
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2594529321
##########
src/ports/postgres/modules/pmml/table_to_pmml.sql_in:
##########
@@ -307,6 +307,14 @@ File table_to_pmml.sql_in documenting the PMML export functions.
CREATE OR REPLACE FUNCTION MADLIB_SCHEMA.pmml(
model_table varchar
) RETURNS xml AS $$
+
+import collections
+import collections.abc
+if not hasattr(collections, 'MutableSequence'):
+ collections.MutableSequence = collections.abc.MutableSequence
+ collections.MutableMapping = collections.abc.MutableMapping
+ collections.MutableSet = collections.abc.MutableSet
+
Review Comment:
This change has been successfully tested in the Cloudberry environment and MADlib Jenkins CI.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3430585871
PR Review: Cloudberry MADlib Build Issues
CMake Configuration Command
```
cmake \
-DCLOUDBERRY_3_PG_CONFIG=/usr/local/cloudberry/bin/pg_config \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local/madlib \
-DCLOUDBERRY_3_EXECUTABLE=/usr/local/cloudberry/bin/postgres \
..
```
CMake Configuration Error
```
Error:
CMake Error at src/CMakeLists.txt:202 (add_library):
Cannot find source file:
/home/cbadmin/bom-parts/madlib/src/ports/cloudberry/dbconnector/Compatibility.hpp
```
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
.hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
CMake Error at src/CMakeLists.txt:202 (add_library):
No SOURCES given to target: madlib_cloudberry_3
CMake Generate step failed. Build files cannot be regenerated correctly.
Location: Referenced in src/ports/cloudberry/CMakeLists.txt:61
Observation: The directory /home/cbadmin/bom-parts/madlib/src/ports/cloudberry/dbconnector/ does not exist, while the equivalent Greenplum
directory does exist at /home/cbadmin/bom-parts/madlib/src/ports/greenplum/dbconnector/ containing:
- Compatibility.hpp
- dbconnector.hpp
---
Additional Build Errors (After Manual Directory Creation)
After manually creating the missing directory and copying files from Greenplum, cmake succeeded but compilation fails with multiple errors in
Compatibility.hpp:
1. AggState API change: aggcontext member doesn't exist (suggests aggcontexts)
2. WindowState renamed: T_WindowState not declared (suggests T_WindowAggState)
3. Missing function: format_procedure not declared
4. Function conflict: Ambiguous AggCheckCallContext - both the compatibility shim and PostgreSQL's native version exist
These errors indicate API differences between Greenplum's PostgreSQL base and Cloudberry's PostgreSQL base.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2450225922
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
@@ -0,0 +1,33 @@
+# 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"
Review Comment:
Have we used this path?
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2454362612
##########
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:
```suggestion
# Assumes Apache Cloudberry always follows semantic versioning
```
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3881896614
Hi @zhangyue1818 thanks for your contribution. But I tested this PR in Cloudberry 2.0 and the coming Cloudberry 2.1 release, one test case failed:
```
[gpadmin@cdw build]$ ./src/bin/madpack -p cloudberry -c gpadmin@localhost:7000/postgres install-check
madpack.py: INFO : Detected Apache Cloudberry version 2.0.0.
TEST CASE RESULT|Module: array_ops|array_ops.ic.sql_in|PASS|Time: 74 milliseconds
TEST CASE RESULT|Module: bayes|bayes.ic.sql_in|PASS|Time: 320 milliseconds
TEST CASE RESULT|Module: crf|crf_test_small.ic.sql_in|PASS|Time: 285 milliseconds
TEST CASE RESULT|Module: crf|crf_train_small.ic.sql_in|PASS|Time: 285 milliseconds
TEST CASE RESULT|Module: elastic_net|elastic_net.ic.sql_in|PASS|Time: 190 milliseconds
TEST CASE RESULT|Module: linalg|svd.ic.sql_in|PASS|Time: 572 milliseconds
TEST CASE RESULT|Module: linalg|matrix_ops.ic.sql_in|PASS|Time: 822 milliseconds
TEST CASE RESULT|Module: linalg|linalg.ic.sql_in|PASS|Time: 76 milliseconds
TEST CASE RESULT|Module: pmml|pmml.ic.sql_in|PASS|Time: 452 milliseconds
TEST CASE RESULT|Module: prob|prob.ic.sql_in|PASS|Time: 28 milliseconds
TEST CASE RESULT|Module: svm|svm.ic.sql_in|PASS|Time: 315 milliseconds
TEST CASE RESULT|Module: tsa|arima.ic.sql_in|PASS|Time: 1074 milliseconds
TEST CASE RESULT|Module: stemmer|porter_stemmer.ic.sql_in|PASS|Time: 34 milliseconds
TEST CASE RESULT|Module: conjugate_gradient|conj_grad.ic.sql_in|PASS|Time: 142 milliseconds
TEST CASE RESULT|Module: knn|knn.ic.sql_in|PASS|Time: 175 milliseconds
TEST CASE RESULT|Module: lda|lda.ic.sql_in|PASS|Time: 246 milliseconds
TEST CASE RESULT|Module: stats|correlation.ic.sql_in|PASS|Time: 182 milliseconds
TEST CASE RESULT|Module: stats|mw_test.ic.sql_in|PASS|Time: 42 milliseconds
TEST CASE RESULT|Module: stats|pred_metrics.ic.sql_in|PASS|Time: 255 milliseconds
TEST CASE RESULT|Module: stats|chi2_test.ic.sql_in|PASS|Time: 37 milliseconds
TEST CASE RESULT|Module: stats|anova_test.ic.sql_in|PASS|Time: 47 milliseconds
TEST CASE RESULT|Module: stats|t_test.ic.sql_in|PASS|Time: 42 milliseconds
TEST CASE RESULT|Module: stats|cox_prop_hazards.ic.sql_in|PASS|Time: 211 milliseconds
TEST CASE RESULT|Module: stats|ks_test.ic.sql_in|PASS|Time: 84 milliseconds
TEST CASE RESULT|Module: stats|robust_and_clustered_variance_coxph.ic.sql_in|PASS|Time: 355 milliseconds
TEST CASE RESULT|Module: stats|wsr_test.ic.sql_in|PASS|Time: 46 milliseconds
TEST CASE RESULT|Module: stats|f_test.ic.sql_in|PASS|Time: 38 milliseconds
TEST CASE RESULT|Module: utilities|utilities.ic.sql_in|PASS|Time: 115 milliseconds
TEST CASE RESULT|Module: utilities|pivot.ic.sql_in|PASS|Time: 119 milliseconds
TEST CASE RESULT|Module: utilities|path.ic.sql_in|PASS|Time: 159 milliseconds
TEST CASE RESULT|Module: utilities|transform_vec_cols.ic.sql_in|PASS|Time: 156 milliseconds
TEST CASE RESULT|Module: utilities|text_utilities.ic.sql_in|PASS|Time: 126 milliseconds
TEST CASE RESULT|Module: utilities|sessionize.ic.sql_in|PASS|Time: 105 milliseconds
TEST CASE RESULT|Module: utilities|encode_categorical.ic.sql_in|PASS|Time: 186 milliseconds
TEST CASE RESULT|Module: utilities|minibatch_preprocessing.ic.sql_in|PASS|Time: 186 milliseconds
TEST CASE RESULT|Module: assoc_rules|assoc_rules.ic.sql_in|FAIL|Time: 568 milliseconds
madpack.py: ERROR : Failed executing /tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp
madpack.py: ERROR : Check the log at /tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.log
TEST CASE RESULT|Module: convex|lmf.ic.sql_in|PASS|Time: 297 milliseconds
TEST CASE RESULT|Module: convex|mlp.ic.sql_in|PASS|Time: 507 milliseconds
TEST CASE RESULT|Module: deep_learning|keras_model_arch_table.ic.sql_in|PASS|Time: 149 milliseconds
TEST CASE RESULT|Module: glm|glm.ic.sql_in|PASS|Time: 906 milliseconds
TEST CASE RESULT|Module: graph|graph.ic.sql_in|PASS|Time: 1343 milliseconds
TEST CASE RESULT|Module: linear_systems|sparse_linear_sytems.ic.sql_in|PASS|Time: 132 milliseconds
TEST CASE RESULT|Module: linear_systems|dense_linear_sytems.ic.sql_in|PASS|Time: 125 milliseconds
TEST CASE RESULT|Module: recursive_partitioning|decision_tree.ic.sql_in|PASS|Time: 252 milliseconds
TEST CASE RESULT|Module: recursive_partitioning|random_forest.ic.sql_in|PASS|Time: 322 milliseconds
TEST CASE RESULT|Module: regress|robust.ic.sql_in|PASS|Time: 193 milliseconds
TEST CASE RESULT|Module: regress|logistic.ic.sql_in|PASS|Time: 249 milliseconds
TEST CASE RESULT|Module: regress|linear.ic.sql_in|PASS|Time: 31 milliseconds
TEST CASE RESULT|Module: regress|clustered.ic.sql_in|PASS|Time: 189 milliseconds
TEST CASE RESULT|Module: regress|multilogistic.ic.sql_in|PASS|Time: 323 milliseconds
TEST CASE RESULT|Module: regress|marginal.ic.sql_in|PASS|Time: 457 milliseconds
TEST CASE RESULT|Module: sample|balance_sample.ic.sql_in|PASS|Time: 139 milliseconds
TEST CASE RESULT|Module: sample|train_test_split.ic.sql_in|PASS|Time: 166 milliseconds
TEST CASE RESULT|Module: sample|sample.ic.sql_in|PASS|Time: 20 milliseconds
TEST CASE RESULT|Module: sample|stratified_sample.ic.sql_in|PASS|Time: 112 milliseconds
TEST CASE RESULT|Module: summary|summary.ic.sql_in|PASS|Time: 148 milliseconds
TEST CASE RESULT|Module: kmeans|kmeans.ic.sql_in|PASS|Time: 661 milliseconds
TEST CASE RESULT|Module: pca|pca.ic.sql_in|PASS|Time: 1475 milliseconds
TEST CASE RESULT|Module: pca|pca_project.ic.sql_in|PASS|Time: 528 milliseconds
TEST CASE RESULT|Module: validation|cross_validation.ic.sql_in|PASS|Time: 332 milliseconds
INFO: Log files saved in /tmp/madlib.7qnxdkya
```
```
[gpadmin@cdw build]$ cat /tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.log
-- Switch to test user:
SET ROLE "madlib_210_installcheck_postgres";
SET
-- Set SEARCH_PATH for install-check:
SET search_path=madlib_installcheck_assoc_rules,madlib;
SET
/* ----------------------------------------------------------------------- *//**
*
* 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.
*
*//* ----------------------------------------------------------------------- */
---------------------------------------------------------------------------
-- Rules:
-- ------
-- 1) Any DB objects should be created w/o schema prefix,
-- since this file is executed in a separate schema context.
-- 2) There should be no DROP statements in this script, since
-- all objects created in the default schema will be cleaned-up outside.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
-- Setup:
---------------------------------------------------------------------------
CREATE OR REPLACE FUNCTION assoc_array_eq
(
arr1 TEXT[],
arr2 TEXT[]
)
RETURNS BOOL AS $$
SELECT COUNT(*) = array_upper($1, 1) AND array_upper($1, 1) = array_upper($2, 1)
FROM (SELECT unnest($1) id) t1, (SELECT unnest($2) id) t2
WHERE t1.id = t2.id;
$$ LANGUAGE sql IMMUTABLE;
CREATE FUNCTION
CREATE OR REPLACE FUNCTION install_test() RETURNS VOID AS $$
declare
result1 TEXT;
result2 TEXT;
result3 TEXT;
result_maxiter TEXT;
res madlib.assoc_rules_results;
output_schema TEXT;
output_table TEXT;
total_rules INT;
total_time INTERVAL;
begin
DROP TABLE IF EXISTS test_data1;
CREATE TABLE test_data1 (
trans_id INT
, product INT
);
DROP TABLE IF EXISTS test_data2;
CREATE TABLE test_data2 (
trans_id INT
, product VARCHAR
);
INSERT INTO test_data1 VALUES (1,1);
INSERT INTO test_data1 VALUES (1,2);
INSERT INTO test_data1 VALUES (3,3);
INSERT INTO test_data1 VALUES (8,4);
INSERT INTO test_data1 VALUES (10,1);
INSERT INTO test_data1 VALUES (10,2);
INSERT INTO test_data1 VALUES (10,3);
INSERT INTO test_data1 VALUES (19,2);
INSERT INTO test_data2 VALUES (1, 'beer');
INSERT INTO test_data2 VALUES (1, 'diapers');
INSERT INTO test_data2 VALUES (1, 'chips');
INSERT INTO test_data2 VALUES (2, 'beer');
INSERT INTO test_data2 VALUES (2, 'diapers');
INSERT INTO test_data2 VALUES (3, 'beer');
INSERT INTO test_data2 VALUES (3, 'diapers');
INSERT INTO test_data2 VALUES (4, 'beer');
INSERT INTO test_data2 VALUES (4, 'chips');
INSERT INTO test_data2 VALUES (5, 'beer');
INSERT INTO test_data2 VALUES (6, 'beer');
INSERT INTO test_data2 VALUES (6, 'diapers');
INSERT INTO test_data2 VALUES (6, 'chips');
INSERT INTO test_data2 VALUES (7, 'beer');
INSERT INTO test_data2 VALUES (7, 'diapers');
DROP TABLE IF EXISTS test1_exp_result;
CREATE TABLE test1_exp_result (
ruleid integer,
pre text[],
post text[],
support double precision,
confidence double precision,
lift double precision,
conviction double precision
) ;
DROP TABLE IF EXISTS test2_exp_result;
CREATE TABLE test2_exp_result (
ruleid integer,
pre text[],
post text[],
support double precision,
confidence double precision,
lift double precision,
conviction double precision
) ;
INSERT INTO test1_exp_result VALUES (7, '{3}', '{1}', 0.20000000000000001, 0.5, 1.2499999999999998, 1.2);
INSERT INTO test1_exp_result VALUES (4, '{2}', '{1}', 0.40000000000000002, 0.66666666666666674, 1.6666666666666667, 1.8000000000000003);
INSERT INTO test1_exp_result VALUES (1, '{1}', '{2,3}', 0.20000000000000001, 0.5, 2.4999999999999996, 1.6000000000000001);
INSERT INTO test1_exp_result VALUES (9, '{2,3}', '{1}', 0.20000000000000001, 1, 2.4999999999999996, 0);
INSERT INTO test1_exp_result VALUES (6, '{1,2}', '{3}', 0.20000000000000001, 0.5, 1.2499999999999998, 1.2);
INSERT INTO test1_exp_result VALUES (8, '{3}', '{2}', 0.20000000000000001, 0.5, 0.83333333333333337, 0.80000000000000004);
INSERT INTO test1_exp_result VALUES (5, '{1}', '{2}', 0.40000000000000002, 1, 1.6666666666666667, 0);
INSERT INTO test1_exp_result VALUES (2, '{3}', '{2,1}', 0.20000000000000001, 0.5, 1.2499999999999998, 1.2);
INSERT INTO test1_exp_result VALUES (10, '{3,1}', '{2}', 0.20000000000000001, 1, 1.6666666666666667, 0);
INSERT INTO test1_exp_result VALUES (3, '{1}', '{3}', 0.20000000000000001, 0.5, 1.2499999999999998, 1.2);
INSERT INTO test2_exp_result VALUES (7, '{chips,diapers}', '{beer}', 0.2857142857142857, 1, 1, 0);
INSERT INTO test2_exp_result VALUES (2, '{chips}', '{diapers}', 0.2857142857142857, 0.66666666666666663, 0.93333333333333324, 0.85714285714285698);
INSERT INTO test2_exp_result VALUES (1, '{chips}', '{diapers,beer}', 0.2857142857142857, 0.66666666666666663, 0.93333333333333324, 0.85714285714285698);
INSERT INTO test2_exp_result VALUES (6, '{diapers}', '{beer}', 0.7142857142857143, 1, 1, 0);
INSERT INTO test2_exp_result VALUES (4, '{beer}', '{diapers}', 0.7142857142857143, 0.7142857142857143, 1, 1);
INSERT INTO test2_exp_result VALUES (3, '{chips,beer}', '{diapers}', 0.2857142857142857, 0.66666666666666663, 0.93333333333333324, 0.85714285714285698);
INSERT INTO test2_exp_result VALUES (5, '{chips}', '{beer}', 0.42857142857142855, 1, 1, 0);
res = madlib.assoc_rules (.1, .5, 'trans_id', 'product', 'test_data1','madlib_installcheck_assoc_rules', false);
RETURN;
end $$ language plpgsql;
CREATE FUNCTION
---------------------------------------------------------------------------
-- Test
---------------------------------------------------------------------------
SELECT install_test();
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: NOTICE: table "test_data1" does not exist, skipping
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'trans_id' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: NOTICE: table "test_data2" does not exist, skipping
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'trans_id' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: NOTICE: table "test1_exp_result" does not exist, skipping
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'ruleid' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: NOTICE: table "test2_exp_result" does not exist, skipping
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'ruleid' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: WARNING: terminating connection because of crash of another server process (seg0 slice3 172.17.0.6:7002 pid=45213)
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: WARNING: terminating connection because of crash of another server process (seg0 slice1 172.17.0.6:7002 pid=45202)
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: WARNING: terminating connection because of crash of another server process (seg0 172.17.0.6:7002 pid=45137)
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: WARNING: writer gang of current global transaction is lost
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: WARNING: Any temporary tables for this session have been dropped because the gang was disconnected (session id = 596)
psql:/tmp/madlib.7qnxdkya/assoc_rules/assoc_rules.ic.sql_in.tmp:154: ERROR: DTX RollbackAndReleaseCurrentSubTransaction dispatch failed
CONTEXT: PL/Python function "assoc_rules"
PL/pgSQL function install_test() line 93 at assignment
```
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3441491386
All mentioned comments have been fixed and have tested it in cloudberry 3.0.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3435445033
> PR Review: Cloudberry MADlib Build Issues
>
> CMake Configuration Command
>
> ```
> cmake \
> -DCLOUDBERRY_3_PG_CONFIG=/usr/local/cloudberry/bin/pg_config \
> -DCMAKE_C_COMPILER=gcc \
> -DCMAKE_CXX_COMPILER=g++ \
> -DCMAKE_BUILD_TYPE=Release \
> -DCMAKE_INSTALL_PREFIX=/usr/local/madlib \
> -DCLOUDBERRY_3_EXECUTABLE=/usr/local/cloudberry/bin/postgres \
> ..
> ```
>
> CMake Configuration Error
>
> ```
> Error:
> CMake Error at src/CMakeLists.txt:202 (add_library):
> Cannot find source file:
>
> /home/cbadmin/bom-parts/madlib/src/ports/cloudberry/dbconnector/Compatibility.hpp
> ```
>
> Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
>
> CMake Error at src/CMakeLists.txt:202 (add_library): No SOURCES given to target: madlib_cloudberry_3
>
> CMake Generate step failed. Build files cannot be regenerated correctly.
>
> Location: Referenced in src/ports/cloudberry/CMakeLists.txt:61
>
> Observation: The directory /home/cbadmin/bom-parts/madlib/src/ports/cloudberry/dbconnector/ does not exist, while the equivalent Greenplum directory does exist at /home/cbadmin/bom-parts/madlib/src/ports/greenplum/dbconnector/ containing:
>
> * Compatibility.hpp
> * dbconnector.hpp
>
> Additional Build Errors (After Manual Directory Creation)
>
> After manually creating the missing directory and copying files from Greenplum, cmake succeeded but compilation fails with multiple errors in Compatibility.hpp:
>
> 1. AggState API change: aggcontext member doesn't exist (suggests aggcontexts)
> 2. WindowState renamed: T_WindowState not declared (suggests T_WindowAggState)
> 3. Missing function: format_procedure not declared
> 4. Function conflict: Ambiguous AggCheckCallContext - both the compatibility shim and PostgreSQL's native version exist
>
> These errors indicate API differences between Greenplum's PostgreSQL base and Cloudberry's PostgreSQL base.
Yeah, there are some other commits not picked, I will continue to complete this commit and test it.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2454273336
##########
src/ports/cloudberry/cmake/FindCloudberry_1.cmake:
##########
Review Comment:
Is this symlink needed? I believe we should only be providing support for the Apache Cloudberry 2 & 3 (future) releases.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2454282801
##########
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[a-zA-Z\s]*(\d+\.\d+\.\d+)"` should be `"Apache Cloudberry[a-zA-Z\s]*(\d+\.\d+\.\d+)"` ?
I am not entirely sure about this.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3430304861
> cloudberry
Have fixed all mentioned problems and license lose
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2480077796
##########
src/ports/cloudberry/cmake/FindCloudberry_2.cmake:
##########
Review Comment:
I noticed these two files, `FindCloudberry_2.cmake` & `FindCloudberry_3.cmake`, are all symbolic links to `FindCloudberry.cmake`. Should we create them like GP / PG as ASCII text files? FYI.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3471298791
Based on the new codebase, I can build and deploy the MADlib into the Cloudberry 2.0 + 3.0 (main) gpdemo database:
1. Build the Cloudberry gpdemo env following the [docs](https://cloudberry.apache.org/docs/deployment/quick-build)
2. Build and deploy the MADlib
```
## Download this PR change
git clone https://github.com/apache/madlib.git
cd madlib
git fetch origin pull/627/head:zhangwenchao-123/support_cloudberry
git switch zhangwenchao-123/support_cloudberry
## Set Python env
sudo alternatives --install /usr/bin/python python /usr/bin/python3 1
## Install required depencies to the Cloudberry Dev container
sudo dnf install boost-devel -y
sudo dnf install -y graphviz # for docs
sudo dnf install --enablerepo=crb doxygen -y # for docs
##
cd ~/madlib
mkdir build ; cd build
## for Cloudberry 3.0
cmake \
-DCLOUDBERRY_3_PG_CONFIG=$GPHOME/bin/pg_config \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local/madlib \
-DCLOUDBERRY_3_EXECUTABLE=$GPHOME/bin/postgres \
..
## for Cloudberry 2.0
cmake \
-DCLOUDBERRY_2_PG_CONFIG=$GPHOME/bin/pg_config \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local/madlib \
-DCLOUDBERRY_2_EXECUTABLE=$GPHOME/bin/postgres \
..
## Make, deploy, and run test
make -j$(nproc)
./src/bin/madpack -p cloudberry -c gpadmin@localhost:7000/postgres install
./src/bin/madpack -p cloudberry -c gpadmin@localhost:7000/postgres install-check
```
If something wrong, please help correct me. Thanks!
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2450208365
##########
src/ports/cloudberry/3/CMakeLists.txt:
##########
Review Comment:
That makes sense. Thanks!
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3430306044
> ā What's Missing (Critical Issues)
>
> ```
> 1. No main CMakeLists.txt for Cloudberry:
> - src/ports/cloudberry/CMakeLists.txt doesn't exist
> - This file should mirror the structure of
> src/ports/greenplum/CMakeLists.txt (13KB, ~300 lines)
> - Should define: port configuration, source files, SQL handling,
> build functions, and version management
>
> 2. Not integrated into the build system:
> - src/ports/CMakeLists.txt only contains:
> add_subdirectory(postgres)
> add_subdirectory(greenplum)
> - Missing: add_subdirectory(cloudberry)
> 3. No CloudberryUtils.cmake:
> - Greenplum has GreenplumUtils.cmake with utility functions
> - May need similar utilities for Cloudberry-specific features
> ```
>
> š Current State
>
> ```
> CMake configuration completed but:
> - Cloudberry was NOT detected (the FindCloudberry code was never executed)
> - Only PostgreSQL and Greenplum detection ran
> - Build directory shows only postgres/ and greenplum/ subdirectories
>
> However, there IS a Cloudberry installation:
> - Location: /usr/local/cloudberry/
> - Version: Based on PostgreSQL 14.4 with GP_VERSION_NUM 30000 (Cloudberry v3.0.0)
> - This matches the src/ports/cloudberry/3/ directory structure
> ```
>
> š Summary
>
> ```
> The Cloudberry port is partially implemented. The detection logic and
> version-specific configs exist, but they're not wired into the build
> system.
>
> To complete the implementation, you would need:
>
> 1. Create src/ports/cloudberry/CMakeLists.txt (modeled after Greenplum's)
> 2. Add add_subdirectory(cloudberry) to src/ports/CMakeLists.txt
> 3. Potentially create CloudberryUtils.cmake for Cloudberry-specific features
> 4. Test the full build process with Cloudberry detection
> ```
Have fixed all mentioned problems and license lose
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2454292924
##########
requirements.txt:
##########
Review Comment:
Why is this empty file needed?
I noticed this when I ran the Apache Release Audit tool (`mvn apache-rat:check`).
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3883422031
> > > Hi @zhangyue1818 thanks for your contribution. But I tested this PR in Cloudberry 2.0 and the coming Cloudberry 2.1 release, one test case failed:
> >
> >
> > The error above occurred in a Docker container environment. I retested MADlib installation and install-check on Cloudberry 2.0 and 2.1 running in a virtual machine, and all tests (including assoc_rules) passed without errors.
> > Thanks again.
>
> fix in [b57e5a9](https://github.com/apache/madlib/commit/b57e5a9ce5c3c8ed56c004928af3d738b010e97a)
Thanks! Now tested and run well both on Docker and vitual machine env.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2786331313
##########
src/ports/postgres/modules/pmml/__init__.py_in:
##########
Review Comment:
We also need to add the ASF license header to this file:
```
# 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.
```
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2454137870
##########
src/config/Ports.yml:
##########
@@ -9,3 +9,6 @@ postgres:
greenplum:
name: Greenplum DB
+
+cloudberry:
+ name: Cloudberry DB
Review Comment:
`Cloudberry DB` should be `Apache Cloudberry`
##########
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:
`Assume Cloudberry will stick to semantic versioning` should be `Assume Apache Cloudberry will stick to semantic versioning`
##########
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:
`message("-- Detected Cloudberry")` should be `message("-- Detected Apache Cloudberry")`
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2454401941
##########
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:
**Testing Note:** Encountering `TypeError: decoding str is not supported` when installing on PostgreSQL 14.19.
**Root Cause:**
For Postgres 13+ (line 1347), `libdir` is already decoded to a string via `.decode()`, but line 1349 attempts to decode it again with
`str(libdir.strip(), encoding='utf-8')`, which fails because you cannot decode a string that's already been decoded.
**Recommended Solution:**
Ensure `libdir` is always decoded to a string before line 1349, then simply strip and append the path:
```python
libdir = subprocess.check_output(['pg_config','--libdir'])
if ((portid == 'greenplum' and is_rev_gte(dbver_split, get_rev_num('7.0'))) or
(portid == 'postgres' and is_rev_gte(dbver_split, get_rev_num('13.0')))):
libdir = libdir.decode()
else:
libdir = libdir.decode('utf-8')
libdir = libdir.strip() + '/postgresql'
This ensures libdir is consistently a string for all code paths (older and newer versions), eliminating the type inconsistency that causes the
error.
Request for Review: Please validate this fix works correctly for both:
- Older versions (Postgres <13, Greenplum <7) where subprocess.check_output() returns bytes
- Newer versions (Postgres 13+, Greenplum 7+) where explicit decoding is needed
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2454248356
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
@@ -0,0 +1,33 @@
+# 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"
Review Comment:
I believe the line just after this `"$ENV{GPHOME}/bin"` will help catch most scenarios. Users will be sourcing `cloudberry-env.sh` (Cloudberry 3+) or `greenplum_path.sh` (Cloudberry 2 ).
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2450224357
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
@@ -0,0 +1,33 @@
+# 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"
+ "$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")
+ if(_PG_CONFIG_HEADER_CONTENTS MATCHES "#define SERVERLESS 1")
+ message("-- Detected Hashdata Cloud (Cloudberry Serverless)")
+ set(CLOUDBERRY_SERVERLESS TRUE PARENT_SCOPE)
Review Comment:
OK
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangwenchao-123 (via GitHub)" <gi...@apache.org>.
zhangwenchao-123 commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3430253840
> Have you looked at the website updates (https://madlib.apache.org - https://github.com/apache/madlib-site) other source documentation files? We will need to review these as well.
No, have not. Should we update this website?
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3430287497
> > Have you looked at the website updates (https://madlib.apache.org - https://github.com/apache/madlib-site) other source documentation files? We will need to review these as well.
>
> No, have not. Should we update this website?
Yes, we should update the related description on the website. Iād like to help with this.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "edespino (via GitHub)" <gi...@apache.org>.
edespino commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3430588994
@zhangwenchao-123 - Unless absolutely necessary, there is no need to force push additional PR commits. This will allow us to view the PR history easily.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2447495674
##########
src/ports/cloudberry/3/CMakeLists.txt:
##########
Review Comment:
There is still no Cloudberry 3.0 yet. So can remove this file?
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2454345368
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
@@ -0,0 +1,33 @@
+# 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"
Review Comment:
Cool idea!
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2454357925
##########
src/ports/cloudberry/cmake/FindCloudberry_1.cmake:
##########
Review Comment:
+1.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2592197695
##########
src/ports/postgres/modules/pmml/table_to_pmml.sql_in:
##########
@@ -307,6 +307,14 @@ File table_to_pmml.sql_in documenting the PMML export functions.
CREATE OR REPLACE FUNCTION MADLIB_SCHEMA.pmml(
model_table varchar
) RETURNS xml AS $$
+
+import collections
+import collections.abc
+if not hasattr(collections, 'MutableSequence'):
+ collections.MutableSequence = collections.abc.MutableSequence
+ collections.MutableMapping = collections.abc.MutableMapping
+ collections.MutableSet = collections.abc.MutableSet
+
Review Comment:
Maybe we can move the Python3 compatibility code into `src/ports/postgres/modules/pmml/__init__.py_in` to avoid the SQL-side code interfering with M4 macro expansion?
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangyue1818 (via GitHub)" <gi...@apache.org>.
zhangyue1818 commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2786447707
##########
src/ports/postgres/modules/pmml/table_to_pmml.sql_in:
##########
@@ -307,6 +307,14 @@ File table_to_pmml.sql_in documenting the PMML export functions.
CREATE OR REPLACE FUNCTION MADLIB_SCHEMA.pmml(
model_table varchar
) RETURNS xml AS $$
+
+import collections
+import collections.abc
+if not hasattr(collections, 'MutableSequence'):
+ collections.MutableSequence = collections.abc.MutableSequence
+ collections.MutableMapping = collections.abc.MutableMapping
+ collections.MutableSet = collections.abc.MutableSet
+
Review Comment:
fix in [e665a9f](https://github.com/apache/madlib/pull/627/commits/e665a9f35dabb5c8eb134fcdda64809ddb1ef0d4)
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "zhangyue1818 (via GitHub)" <gi...@apache.org>.
zhangyue1818 commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2786457549
##########
src/ports/postgres/modules/pmml/__init__.py_in:
##########
Review Comment:
fix in https://github.com/apache/madlib/pull/627/commits/d018805800d0321f13d226002f07ee903fcbcaa3
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support cloudberry [madlib]
Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on PR #627:
URL: https://github.com/apache/madlib/pull/627#issuecomment-3882015679
> Hi @zhangyue1818 thanks for your contribution. But I tested this PR in Cloudberry 2.0 and the coming Cloudberry 2.1 release, one test case failed:
>
The error above occurred in a Docker container environment. I retested MADlib installation and install-check on Cloudberry 2.0 and 2.1 running in a virtual machine, and all tests (including assoc_rules) passed without errors.
Thanks again.
--
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: dev-unsubscribe@madlib.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org