diff --git a/src/duckdb/src/execution/operator/scan/physical_table_scan.cpp b/src/duckdb/src/execution/operator/scan/physical_table_scan.cpp index e9f66bea4..a777689b1 100644 --- a/src/duckdb/src/execution/operator/scan/physical_table_scan.cpp +++ b/src/duckdb/src/execution/operator/scan/physical_table_scan.cpp @@ -259,7 +259,7 @@ bool PhysicalTableScan::Equals(const PhysicalOperator &other_p) const { return false; } auto &other = other_p.Cast(); - if (function.function != other.function.function) { + if (function != other.function) { return false; } if (column_ids != other.column_ids) { diff --git a/src/duckdb/src/execution/physical_plan/plan_filter.cpp b/src/duckdb/src/execution/physical_plan/plan_filter.cpp index 292fe1bc8..796e4aeb3 100644 --- a/src/duckdb/src/execution/physical_plan/plan_filter.cpp +++ b/src/duckdb/src/execution/physical_plan/plan_filter.cpp @@ -14,7 +14,6 @@ PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalFilter &op) { D_ASSERT(op.children.size() == 1); reference plan = CreatePlan(*op.children[0]); if (!op.expressions.empty()) { - D_ASSERT(!plan.get().GetTypes().empty()); // create a filter if there is anything to filter auto &filter = Make(plan.get().GetTypes(), std::move(op.expressions), op.estimated_cardinality); filter.children.push_back(plan); diff --git a/src/duckdb/src/function/table/version/pragma_version.cpp b/src/duckdb/src/function/table/version/pragma_version.cpp index 95001bcd1..c799882a5 100644 --- a/src/duckdb/src/function/table/version/pragma_version.cpp +++ b/src/duckdb/src/function/table/version/pragma_version.cpp @@ -1,5 +1,5 @@ #ifndef DUCKDB_PATCH_VERSION -#define DUCKDB_PATCH_VERSION "2" +#define DUCKDB_PATCH_VERSION "3-dev8" #endif #ifndef DUCKDB_MINOR_VERSION #define DUCKDB_MINOR_VERSION 4 @@ -8,10 +8,10 @@ #define DUCKDB_MAJOR_VERSION 1 #endif #ifndef DUCKDB_VERSION -#define DUCKDB_VERSION "v1.4.2" +#define DUCKDB_VERSION "v1.4.3-dev8" #endif #ifndef DUCKDB_SOURCE_ID -#define DUCKDB_SOURCE_ID "68d7555f68" +#define DUCKDB_SOURCE_ID "5f0c38c5eb" #endif #include "duckdb/function/table/system_functions.hpp" #include "duckdb/main/database.hpp" diff --git a/src/duckdb/src/function/table_function.cpp b/src/duckdb/src/function/table_function.cpp index 310f75b58..a87a2d234 100644 --- a/src/duckdb/src/function/table_function.cpp +++ b/src/duckdb/src/function/table_function.cpp @@ -37,6 +37,30 @@ TableFunction::TableFunction(const vector &arguments, table_functio TableFunction::TableFunction() : TableFunction("", {}, nullptr, nullptr, nullptr, nullptr) { } +bool TableFunction::operator==(const TableFunction &rhs) const { + return name == rhs.name && arguments == rhs.arguments && varargs == rhs.varargs && bind == rhs.bind && + bind_replace == rhs.bind_replace && bind_operator == rhs.bind_operator && init_global == rhs.init_global && + init_local == rhs.init_local && function == rhs.function && in_out_function == rhs.in_out_function && + in_out_function_final == rhs.in_out_function_final && statistics == rhs.statistics && + dependency == rhs.dependency && cardinality == rhs.cardinality && + pushdown_complex_filter == rhs.pushdown_complex_filter && pushdown_expression == rhs.pushdown_expression && + to_string == rhs.to_string && dynamic_to_string == rhs.dynamic_to_string && + table_scan_progress == rhs.table_scan_progress && get_partition_data == rhs.get_partition_data && + get_bind_info == rhs.get_bind_info && type_pushdown == rhs.type_pushdown && + get_multi_file_reader == rhs.get_multi_file_reader && supports_pushdown_type == rhs.supports_pushdown_type && + get_partition_info == rhs.get_partition_info && get_partition_stats == rhs.get_partition_stats && + get_virtual_columns == rhs.get_virtual_columns && get_row_id_columns == rhs.get_row_id_columns && + serialize == rhs.serialize && deserialize == rhs.deserialize && + verify_serialization == rhs.verify_serialization && projection_pushdown == rhs.projection_pushdown && + filter_pushdown == rhs.filter_pushdown && filter_prune == rhs.filter_prune && + sampling_pushdown == rhs.sampling_pushdown && late_materialization == rhs.late_materialization && + global_initialization == rhs.global_initialization; +} + +bool TableFunction::operator!=(const TableFunction &rhs) const { + return !(*this == rhs); +} + bool TableFunction::Equal(const TableFunction &rhs) const { // number of types if (this->arguments.size() != rhs.arguments.size()) { diff --git a/src/duckdb/src/include/duckdb/function/table_function.hpp b/src/duckdb/src/include/duckdb/function/table_function.hpp index f6c9cc55e..6da688d04 100644 --- a/src/duckdb/src/include/duckdb/function/table_function.hpp +++ b/src/duckdb/src/include/duckdb/function/table_function.hpp @@ -432,6 +432,8 @@ class TableFunction : public SimpleNamedParameterFunction { // NOLINT: work-arou TableFunctionInitialization global_initialization = TableFunctionInitialization::INITIALIZE_ON_EXECUTE; DUCKDB_API bool Equal(const TableFunction &rhs) const; + DUCKDB_API bool operator==(const TableFunction &rhs) const; + DUCKDB_API bool operator!=(const TableFunction &rhs) const; }; } // namespace duckdb diff --git a/src/duckdb/src/planner/binder/query_node/plan_select_node.cpp b/src/duckdb/src/planner/binder/query_node/plan_select_node.cpp index 46e5d2e12..dec721262 100644 --- a/src/duckdb/src/planner/binder/query_node/plan_select_node.cpp +++ b/src/duckdb/src/planner/binder/query_node/plan_select_node.cpp @@ -30,7 +30,7 @@ unique_ptr Binder::CreatePlan(BoundSelectNode &statement) { root = PlanFilter(std::move(statement.where_clause), std::move(root)); } - if (!statement.aggregates.empty() || !statement.groups.group_expressions.empty()) { + if (!statement.aggregates.empty() || !statement.groups.group_expressions.empty() || statement.having) { if (!statement.groups.group_expressions.empty()) { // visit the groups for (auto &group : statement.groups.group_expressions) {