Skip to content

Commit

Permalink
Accept some better suggestions for names
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-XM-Zeng committed Nov 11, 2024
1 parent 75b0af4 commit e8a4aa8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/pgduckdb_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ IsCatalogTable(List *tables) {
}

static bool
IsPartitionedTable(List *tables) {
foreach_node(RangeTblEntry, table, tables) {
if (table->rtekind == RTE_SUBQUERY) {
/* Check whether the table in the subquery is a partitioned table */
if (IsPartitionedTable(table->subquery->rtable)) {
ContainsPartitionedTable(List *rtes) {
foreach_node(RangeTblEntry, rte, rtes) {
if (rte->rtekind == RTE_SUBQUERY) {
/* Check whether any table in the subquery is a partitioned table */
if (ContainsPartitionedTable(rte->subquery->rtable)) {
return true;
}
}

if (table->relkind == RELKIND_PARTITIONED_TABLE) {
if (rte->relkind == RELKIND_PARTITIONED_TABLE) {
return true;
}
}
Expand Down Expand Up @@ -167,7 +167,7 @@ IsAllowedStatement(Query *query, bool throw_error = false) {
/*
* When accessing the partitioned table, we temporarily let PG handle it instead of DuckDB.
*/
if (IsPartitionedTable(query->rtable)) {
if (ContainsPartitionedTable(query->rtable)) {
elog(elevel, "DuckDB does not support querying PG partitioned table");
return false;
}
Expand Down

0 comments on commit e8a4aa8

Please sign in to comment.