Skip to content

Commit

Permalink
misc(fuzzer): Enable aggregation fuzzer test with FB-only functions (#…
Browse files Browse the repository at this point in the history
…12288)

Summary:
Pull Request resolved: #12288

This diff also removes LogicalDummyScan from velox/parse/DuckLogicalOperator.h because this symbol already exists in duckdb/planner/operator/logical_dummy_scan.hpp which causes a linking error due to duplicate symbols

Reviewed By: kgpai

Differential Revision: D68338748

fbshipit-source-id: c57e7c7f0d49400d7329f643eb381e46147b5bc8
  • Loading branch information
kagamiori authored and facebook-github-bot committed Feb 25, 2025
1 parent 4787a99 commit b0d7de9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 26 deletions.
2 changes: 2 additions & 0 deletions velox/functions/prestosql/fuzzer/AggregationFuzzerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ DEFINE_uint32(
"Timeout in milliseconds for HTTP requests made to reference DB, "
"such as Presto. Example: --req_timeout_ms=2000");

// Any change made in the file should be reflected in
// the FB-internal aggregation fuzzer test too:
namespace facebook::velox::exec::test {
namespace {

Expand Down
26 changes: 0 additions & 26 deletions velox/parse/DuckLogicalOperator.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,32 +48,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/// of DuckDB.
namespace duckdb {

//! LogicalDummyScan represents a dummy scan returning a single row
class LogicalDummyScan : public LogicalOperator {
public:
explicit LogicalDummyScan(idx_t table_index)
: LogicalOperator(LogicalOperatorType::LOGICAL_DUMMY_SCAN),
table_index(table_index) {}

idx_t table_index;

public:
vector<ColumnBinding> GetColumnBindings() override {
return {ColumnBinding(table_index, 0)};
}

idx_t EstimateCardinality(ClientContext& context) override {
return 1;
}

protected:
void ResolveTypes() override {
if (types.size() == 0) {
types.emplace_back(LogicalType::INTEGER);
}
}
};

//! LogicalGet represents a scan operation from a data source
class LogicalGet : public LogicalOperator {
public:
Expand Down
1 change: 1 addition & 0 deletions velox/parse/QueryPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <duckdb/planner/expression/bound_constant_expression.hpp> // @manual
#include <duckdb/planner/expression/bound_function_expression.hpp> // @manual
#include <duckdb/planner/expression/bound_reference_expression.hpp> // @manual
#include <duckdb/planner/operator/logical_dummy_scan.hpp> // @manual

namespace facebook::velox::core {

Expand Down

0 comments on commit b0d7de9

Please sign in to comment.