Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/yardstick_ffi.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ struct YardstickMeasureAggResult {

bool yardstick_has_as_measure(const char* sql);
bool yardstick_has_aggregate(const char* sql);
bool yardstick_drop_measure_view_from_sql(const char* sql);
bool yardstick_has_curly_brace(const char* sql);
bool yardstick_has_at_syntax(const char* sql);

Expand Down
5 changes: 5 additions & 0 deletions src/yardstick_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ extern "C" {
extern "C" {
bool yardstick_has_as_measure(const char *sql);
bool yardstick_has_aggregate(const char *sql);
bool yardstick_drop_measure_view_from_sql(const char *sql);
YardstickCreateViewResult yardstick_process_create_view(const char *sql);
YardstickAggregateResult yardstick_expand_aggregate(const char *sql);
void yardstick_free(char *ptr);
Expand Down Expand Up @@ -338,6 +339,10 @@ ParserExtensionParseResult yardstick_parse(ParserExtensionInfo *,
sql_to_check = semantic_stripped;
}

if (yardstick_drop_measure_view_from_sql(sql_to_check.c_str())) {
return ParserExtensionParseResult();
}

// Check for AGGREGATE() function
if (yardstick_has_aggregate(sql_to_check.c_str())) {
YardstickAggregateResult result = yardstick_expand_aggregate(sql_to_check.c_str());
Expand Down
Loading
Loading