aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvvvv <vvvv@yandex-team.ru>2022-02-28 15:09:00 +0300
committervvvv <vvvv@yandex-team.ru>2022-02-28 15:09:00 +0300
commit80a3a1445658e0efc8c71355b4ffd1e7249960ea (patch)
treee70f70a9428ca47a6d7b1d51c8e3a9af1e89a1e6
parent20efb5467b747b3329bc1a0b8b70057f0061033a (diff)
downloadydb-80a3a1445658e0efc8c71355b4ffd1e7249960ea.tar.gz
YQL-13710 native bool literal
ref:88e37561dd2c60fc4b6c53edf988a586000f06f7
-rw-r--r--ydb/library/yql/sql/pg/pg_sql.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ydb/library/yql/sql/pg/pg_sql.cpp b/ydb/library/yql/sql/pg/pg_sql.cpp
index 0b0a4aec0d..d8ec0f33bb 100644
--- a/ydb/library/yql/sql/pg/pg_sql.cpp
+++ b/ydb/library/yql/sql/pg/pg_sql.cpp
@@ -1005,6 +1005,10 @@ public:
TStringBuf targetType = StrVal(ListNodeNth(typeName->names, ListLength(typeName->names) - 1));
if (NodeTag(CAST_NODE(A_Const, arg)->val) == T_String && targetType == "bool") {
auto str = StrVal(CAST_NODE(A_Const, arg)->val);
+ if (Settings.PgTypes) {
+ return L(A("PgConst"), QA("bool"), QA(str));
+ }
+
if (!StrCompare(str, "t")) {
return L(A("Just"), L(A("Bool"), QA("1")));
} else if (!StrCompare(str, "f")) {