Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Support TopK aggregate in RelAlgDagBuilder. #626

Merged
merged 1 commit into from
Aug 15, 2023
Merged

Conversation

ienkovich
Copy link
Contributor

No description provided.

arg1 = std::dynamic_pointer_cast<const hdk::ir::Constant>(sources[operands[1]]);
if (!arg1 || !arg1->type()->isInteger() || arg1->value().intval == 0) {
throw std::runtime_error(
"TOP_K's second parameter should be non-zero integer literl");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in literal

@@ -49,6 +49,8 @@ const hdk::ir::Type* get_agg_type(hdk::ir::AggType agg_kind,
}
case hdk::ir::AggType::kSample:
return arg_expr->type();
case hdk::ir::AggType::kTopK:
return ctx.arrayVarLen(arg_expr->type(), 4, false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call as well as the signature of the method is not clear at first glance.

@ienkovich ienkovich force-pushed the ienkovich/json-topk branch from 38e8c98 to 269038d Compare August 15, 2023 16:59
@ienkovich ienkovich merged commit 7e9e427 into main Aug 15, 2023
@ienkovich ienkovich deleted the ienkovich/json-topk branch August 15, 2023 21:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants