Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no error handling when window frame bound node is not required type #4009

Open
aceforeverd opened this issue Dec 24, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@aceforeverd
Copy link
Collaborator

aceforeverd commented Dec 24, 2024

SqlNode *NodeManager::MakeFrameBound(BoundType bound_type, ExprNode *expr) {
if (kExprPrimary != expr->expr_type_) {
LOG(WARNING) << "cannot create window frame, only support "
"const number and const time offset of frame";
return nullptr;
}
ConstNode *primary = dynamic_cast<ConstNode *>(expr);

No check for nullptr returns MakeFrameBound, cause seg fault

SQL:

WINDOW w as (.... ROWS BETWEEN id AND CURRENT ROW
@aceforeverd aceforeverd added the bug Something isn't working label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants