diff --git a/zetasql/parser/parse_tree_manual.h b/zetasql/parser/parse_tree_manual.h index 2771343aa..4d1706627 100644 --- a/zetasql/parser/parse_tree_manual.h +++ b/zetasql/parser/parse_tree_manual.h @@ -4671,14 +4671,17 @@ class ASTDropUserStatement final : public ASTDdlStatement { bool is_if_exists_ = false; }; -class ASTCreateUserStatement final : public ASTCreateTableStmtBase { +class ASTCreateUserStatement final : public ASTCreateStatement { public: static constexpr ASTNodeKind kConcreteNodeKind = AST_CREATE_USER_STATEMENT; - explicit ASTCreateUserStatement() : ASTCreateTableStmtBase(kConcreteNodeKind) {} + explicit ASTCreateUserStatement() : ASTCreateStatement(kConcreteNodeKind) {} void Accept(ParseTreeVisitor* visitor, void* data) const override; zetasql_base::StatusOr Accept( NonRecursiveParseTreeVisitor* visitor) const override; + const ASTPathExpression* name() const { return name_; } + const ASTOptionsList* options_list() const { return options_list_; } + const ASTPathExpression* GetDdlTarget() const override { return name_; } private: void InitFields() final { @@ -4687,6 +4690,9 @@ class ASTCreateUserStatement final : public ASTCreateTableStmtBase { fl.AddOptional(&options_list_, AST_OPTIONS_LIST); } + const ASTPathExpression* name_ = nullptr; + const ASTOptionsList* options_list_ = nullptr; + }; class ASTCreateTableStatement final : public ASTCreateTableStmtBase {