diff options
author | vvvv <vvvv@yandex-team.ru> | 2022-02-28 15:24:17 +0300 |
---|---|---|
committer | vvvv <vvvv@yandex-team.ru> | 2022-02-28 15:24:17 +0300 |
commit | 52f05c876de41f4431bde71a2e68d71c86692d1b (patch) | |
tree | 0601f2933294ee47faefa9f823ec5cccc6f2761a | |
parent | 80a3a1445658e0efc8c71355b4ffd1e7249960ea (diff) | |
download | ydb-52f05c876de41f4431bde71a2e68d71c86692d1b.tar.gz |
YQL-13710 PassByValue type attribute
ref:eabd0f9dba477ce0e09a067e50673a6d9a15f68d
-rw-r--r-- | ydb/library/yql/parser/pg_catalog/catalog.cpp | 8 | ||||
-rw-r--r-- | ydb/library/yql/parser/pg_catalog/catalog.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ydb/library/yql/parser/pg_catalog/catalog.cpp b/ydb/library/yql/parser/pg_catalog/catalog.cpp index 0cebe1baac..0202c39fec 100644 --- a/ydb/library/yql/parser/pg_catalog/catalog.cpp +++ b/ydb/library/yql/parser/pg_catalog/catalog.cpp @@ -222,6 +222,14 @@ public: LastType.Name = value; } else if (key == "typelem") { LastType.ElementType = value; + } else if (key == "typbyval") { + if (value == "f") { + LastType.PassByValue = false; + } else if (value == "t" || value == "FLOAT8PASSBYVAL") { + LastType.PassByValue = true; + } else { + ythrow yexception() << "Unknown typbyval value: " << value; + } } } diff --git a/ydb/library/yql/parser/pg_catalog/catalog.h b/ydb/library/yql/parser/pg_catalog/catalog.h index fadfe3ae82..13437887c5 100644 --- a/ydb/library/yql/parser/pg_catalog/catalog.h +++ b/ydb/library/yql/parser/pg_catalog/catalog.h @@ -35,6 +35,7 @@ struct TTypeDesc { ui32 ArrayTypeId = 0; TString Name; TString ElementType; + bool PassByValue = false; }; const TProcDesc& LookupProc(const TString& name, const TVector<ui32>& argTypeIds); |