You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ma...@apache.org on 2025/01/10 08:20:41 UTC

(cloudberry) 07/08: Fix relcache lookup in Orca when selecting from sequence

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

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

commit 58a65a41049ebf27e471d4f1987c7f63a0763380
Author: Chris Hajas <ch...@vmware.com>
AuthorDate: Fri Dec 16 12:33:27 2022 -0800

    Fix relcache lookup in Orca when selecting from sequence
    
    In d0f8614d1f1b18eb9101bb18b8e9192709bd670c, we removed an if statement
    that was previously catching and falling back to planner if a table AM
    was not recognized. Add this back, as there are cases of an unrecognized
    AM and otherwise we'll crash.
---
 src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp b/src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp
index 91c353aefb..4c4c42ecf7 100644
--- a/src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp
+++ b/src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp
@@ -2351,6 +2351,11 @@ CTranslatorRelcacheToDXL::RetrieveRelStorageType(Relation rel)
 			{
 				rel_storage_type = IMDRelation::ErelstorageForeign;
 			}
+			else
+			{
+				GPOS_RAISE(gpdxl::ExmaMD, gpdxl::ExmiMDObjUnsupported,
+						   GPOS_WSZ_LIT("Unsupported table AM"));
+			}
 			break;
 		default:
 			GPOS_RAISE(gpdxl::ExmaMD, gpdxl::ExmiMDObjUnsupported,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org