This is an automated email from the ASF dual-hosted git repository.

reshke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 32f515dd1113922a73cc05c08a6a697b53f80a71
Author: Chris Hajas <[email protected]>
AuthorDate: Mon Aug 14 11:38:49 2023 -0700

    Change fallback message from GPORCA to Postgres-based planner
    
    It will now be:
    
    "Falling back to Postgres-based planner because GPORCA does not support the 
following feature:<>"
    
    instead of:
    
    "Feature not supported:<>"
---
 src/backend/gporca/libgpopt/src/exception.cpp     | 34 +++++++++++---------
 src/backend/gporca/libnaucrates/src/exception.cpp | 38 ++++++++++++++---------
 2 files changed, 43 insertions(+), 29 deletions(-)

diff --git a/src/backend/gporca/libgpopt/src/exception.cpp 
b/src/backend/gporca/libgpopt/src/exception.cpp
index 96c6d751f5..309d842827 100644
--- a/src/backend/gporca/libgpopt/src/exception.cpp
+++ b/src/backend/gporca/libgpopt/src/exception.cpp
@@ -31,11 +31,12 @@ gpopt::EresExceptionInit(CMemoryPool *mp)
        // Basic DXL messages in English
        
//---------------------------------------------------------------------------
        CMessage rgmsg[ExmiSentinel] = {
-               CMessage(CException(gpopt::ExmaGPOPT, gpopt::ExmiNoPlanFound),
-                                CException::ExsevError,
-                                GPOS_WSZ_WSZLEN(
-                                        "No plan has been computed for 
required properties"),
-                                0, GPOS_WSZ_WSZLEN("No plan found")),
+               CMessage(
+                       CException(gpopt::ExmaGPOPT, gpopt::ExmiNoPlanFound),
+                       CException::ExsevError,
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
no plan has been computed for required properties in GPORCA"),
+                       0, GPOS_WSZ_WSZLEN("No plan found")),
 
                CMessage(
                        CException(gpopt::ExmaGPOPT, 
gpopt::ExmiInvalidPlanAlternative),
@@ -68,27 +69,30 @@ gpopt::EresExceptionInit(CMemoryPool *mp)
                                           
gpopt::ExmiUnsupportedCompositePartKey),
                        CException::ExsevNotice,
                        GPOS_WSZ_WSZLEN(
-                               "Feature not supported by GPORCA: composite 
partitioning keys"),
+                               "Falling back to Postgres-based planner because 
GPORCA does not support the following feature: composite partitioning keys"),
                        0,
                        GPOS_WSZ_WSZLEN(
-                               "Feature not supported by GPORCA: composite 
partitioning keys")),
+                               "Falling back to Postgres-based planner because 
GPORCA does not support the following feature: composite partitioning keys")),
 
                CMessage(
                        CException(gpopt::ExmaGPOPT,
                                           
gpopt::ExmiUnsupportedNonDeterministicUpdate),
                        CException::ExsevNotice,
                        GPOS_WSZ_WSZLEN(
-                               "Feature not supported by GPORCA: 
non-deterministic DML statements"),
+                               "Falling back to Postgres-based planner because 
GPORCA does not support the following feature: non-deterministic DML 
statements"),
                        0,
                        GPOS_WSZ_WSZLEN(
-                               "Feature not supported by GPORCA: 
non-deterministic DML statements")),
+                               "Falling back to Postgres-based planner because 
GPORCA does not support the following feature: non-deterministic DML 
statements")),
 
-               CMessage(CException(gpopt::ExmaGPOPT,
-                                                       
gpopt::ExmiUnsatisfiedRequiredProperties),
-                                CException::ExsevError,
-                                GPOS_WSZ_WSZLEN("Plan does not satisfy 
required properties"),
-                                0,
-                                GPOS_WSZ_WSZLEN("Plan does not satisfy 
required properties")),
+               CMessage(
+                       CException(gpopt::ExmaGPOPT,
+                                          
gpopt::ExmiUnsatisfiedRequiredProperties),
+                       CException::ExsevError,
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
plan does not satisfy required properties in GPORCA"),
+                       0,
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
plan does not satisfy required properties in GPORCA")),
 
                CMessage(
                        CException(gpopt::ExmaGPOPT, 
gpopt::ExmiEvalUnsupportedScalarExpr),
diff --git a/src/backend/gporca/libnaucrates/src/exception.cpp 
b/src/backend/gporca/libnaucrates/src/exception.cpp
index 5c7e016c02..14181927f8 100644
--- a/src/backend/gporca/libnaucrates/src/exception.cpp
+++ b/src/backend/gporca/libnaucrates/src/exception.cpp
@@ -94,11 +94,14 @@ gpdxl::EresExceptionInit(CMemoryPool *mp)
                        0,      //
                        GPOS_WSZ_WSZLEN("Incorrect Number of children")),
 
-               CMessage(CException(gpdxl::ExmaDXL, 
gpdxl::ExmiDXL2PlStmtConversion),
-                                CException::ExsevNotice,
-                                GPOS_WSZ_WSZLEN("Feature not supported: %ls"),
-                                1,      //
-                                GPOS_WSZ_WSZLEN("Feature not supported")),
+               CMessage(
+                       CException(gpdxl::ExmaDXL, 
gpdxl::ExmiDXL2PlStmtConversion),
+                       CException::ExsevNotice,
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
GPORCA does not support the following feature: %ls"),
+                       1,      //
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
GPORCA does not support this feature")),
 
                CMessage(
                        CException(gpdxl::ExmaDXL, 
gpdxl::ExmiQuery2DXLAttributeNotFound),
@@ -112,9 +115,11 @@ gpdxl::EresExceptionInit(CMemoryPool *mp)
                CMessage(
                        CException(gpdxl::ExmaDXL, 
gpdxl::ExmiQuery2DXLUnsupportedFeature),
                        CException::ExsevNotice,
-                       GPOS_WSZ_WSZLEN("Feature not supported: %ls"),
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
GPORCA does not support the following feature: %ls"),
                        1,      //
-                       GPOS_WSZ_WSZLEN("Feature not supported")),
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
GPORCA does not support this feature.")),
 
                // MD related messages
                CMessage(
@@ -131,11 +136,14 @@ gpdxl::EresExceptionInit(CMemoryPool *mp)
                                 1,      // mdid
                                 GPOS_WSZ_WSZLEN("Lookup of object in cache 
failed")),
 
-               CMessage(CException(gpdxl::ExmaMD, gpdxl::ExmiMDObjUnsupported),
-                                CException::ExsevNotice,
-                                GPOS_WSZ_WSZLEN("Feature not supported: %ls"),
-                                1,      // md obj
-                                GPOS_WSZ_WSZLEN("Feature not supported")),
+               CMessage(
+                       CException(gpdxl::ExmaMD, gpdxl::ExmiMDObjUnsupported),
+                       CException::ExsevNotice,
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
GPORCA does not support the following feature: %ls"),
+                       1,      // md obj
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
GPORCA does not support this feature")),
 
                CMessage(CException(gpdxl::ExmaGPDB, gpdxl::ExmiGPDBError),
                                 CException::ExsevError, GPOS_WSZ_WSZLEN("PG 
exception raised"),
@@ -154,9 +162,11 @@ gpdxl::EresExceptionInit(CMemoryPool *mp)
                CMessage(
                        CException(gpdxl::ExmaDXL, 
gpdxl::ExmiExpr2DXLUnsupportedFeature),
                        CException::ExsevNotice,
-                       GPOS_WSZ_WSZLEN("Feature not supported: %ls"),
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
GPORCA does not support the following feature: %ls"),
                        1,      // feature name
-                       GPOS_WSZ_WSZLEN("Feature not supported")),
+                       GPOS_WSZ_WSZLEN(
+                               "Falling back to Postgres-based planner because 
GPORCA does not support this feature")),
 
                CMessage(
                        CException(gpdxl::ExmaConstExprEval,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to