summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yql/essentials/sql/v1/query.cpp')
-rw-r--r--yql/essentials/sql/v1/query.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/yql/essentials/sql/v1/query.cpp b/yql/essentials/sql/v1/query.cpp
index 8e886064784..fc18200b513 100644
--- a/yql/essentials/sql/v1/query.cpp
+++ b/yql/essentials/sql/v1/query.cpp
@@ -3677,9 +3677,10 @@ TNodePtr BuildAnalyze(TPosition pos, const TString& service, const TDeferredAtom
class TShowCreateNode final : public TAstListNode {
public:
- TShowCreateNode(TPosition pos, const TTableRef& tr, TScopedStatePtr scoped)
+ TShowCreateNode(TPosition pos, const TTableRef& tr, const TString& type, TScopedStatePtr scoped)
: TAstListNode(pos)
, Table(tr)
+ , Type(type)
, Scoped(scoped)
, FakeSource(BuildFakeSource(pos))
{
@@ -3691,9 +3692,9 @@ public:
if (!Table.Options->Init(ctx, src)) {
return false;
}
- Table.Options = L(Table.Options, Q(Y(Q("showCreateTable"))));
+ Table.Options = L(Table.Options, Q(Y(Q(Type))));
} else {
- Table.Options = Y(Q(Y(Q("showCreateTable"))));
+ Table.Options = Y(Q(Y(Q(Type))));
}
bool asRef = ctx.PragmaRefSelect;
@@ -3741,12 +3742,14 @@ public:
}
private:
TTableRef Table;
+ // showCreateTable, showCreateView, ...
+ TString Type;
TScopedStatePtr Scoped;
TSourcePtr FakeSource;
};
-TNodePtr BuildShowCreate(TPosition pos, const TTableRef& tr, TScopedStatePtr scoped) {
- return new TShowCreateNode(pos, tr, scoped);
+TNodePtr BuildShowCreate(TPosition pos, const TTableRef& tr, const TString& type, TScopedStatePtr scoped) {
+ return new TShowCreateNode(pos, tr, type, scoped);
}
class TBaseBackupCollectionNode