-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make table functions as part of the reading clause
- Loading branch information
1 parent
184d8df
commit 5846c5e
Showing
24 changed files
with
2,892 additions
and
2,722 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "binder/binder.h" | ||
#include "binder/call/bound_call_config.h" | ||
#include "parser/call/call_config.h" | ||
|
||
namespace kuzu { | ||
namespace binder { | ||
|
||
std::unique_ptr<BoundStatement> Binder::bindCallConfig(const parser::Statement& statement) { | ||
auto& callStatement = reinterpret_cast<const parser::CallConfig&>(statement); | ||
auto option = main::DBConfig::getOptionByName(callStatement.getOptionName()); | ||
if (option == nullptr) { | ||
throw common::BinderException{ | ||
"Invalid option name: " + callStatement.getOptionName() + "."}; | ||
} | ||
auto optionValue = expressionBinder.bindLiteralExpression(*callStatement.getOptionValue()); | ||
// TODO(Ziyi): add casting rule for option value. | ||
ExpressionBinder::validateExpectedDataType(*optionValue, option->parameterType); | ||
return std::make_unique<BoundCallConfig>(*option, std::move(optionValue)); | ||
} | ||
|
||
} // namespace binder | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#include "parser/expression/parsed_expression.h" | ||
#include "parser/query/reading_clause/reading_clause.h" | ||
|
||
namespace kuzu { | ||
namespace parser { | ||
|
||
class CallTableFunc : public ReadingClause { | ||
public: | ||
CallTableFunc(std::string optionName, std::unique_ptr<ParsedExpression> optionValue) | ||
: ReadingClause{common::ClauseType::CALL_TABLE_FUNC}, funcName{std::move(optionName)}, | ||
parameter{std::move(optionValue)} {} | ||
|
||
inline std::string getFuncName() const { return funcName; } | ||
|
||
inline ParsedExpression* getParameter() const { return parameter.get(); } | ||
|
||
private: | ||
std::string funcName; | ||
std::unique_ptr<ParsedExpression> parameter; | ||
}; | ||
|
||
} // namespace parser | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.