Browse Source

YQL-13710 PassByValue type attribute

ref:eabd0f9dba477ce0e09a067e50673a6d9a15f68d
vvvv 3 years ago
parent
commit
52f05c876d

+ 8 - 0
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;
+            }
         }
     }
 

+ 1 - 0
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);