diff options
author | aneporada <aneporada@yandex-team.com> | 2024-12-05 13:02:30 +0300 |
---|---|---|
committer | aneporada <aneporada@yandex-team.com> | 2024-12-05 13:19:17 +0300 |
commit | e96f434399710cd67c5e25d1888930caedc1b655 (patch) | |
tree | 8deb3c6b0bd1d2f57e4c622b8767ae5bb2eaecb5 | |
parent | 3b1f4cd76ffb777bc6498fd1ffcb541472c830f9 (diff) | |
download | ydb-e96f434399710cd67c5e25d1888930caedc1b655.tar.gz |
Enable FlexibleTypes by default. Deprecate DisableFlexibleTypes
commit_hash:32b898cffdffa9c41e8e4093f35bf6db27ed2560
-rw-r--r-- | yql/essentials/sql/v1/context.h | 2 | ||||
-rw-r--r-- | yql/essentials/sql/v1/sql_query.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/yql/essentials/sql/v1/context.h b/yql/essentials/sql/v1/context.h index 6f5ce7b8f4..de7760a5d1 100644 --- a/yql/essentials/sql/v1/context.h +++ b/yql/essentials/sql/v1/context.h @@ -291,7 +291,7 @@ namespace NSQLTranslationV1 { ui32 PragmaGroupByLimit = 1 << 6; ui32 PragmaGroupByCubeLimit = 5; // if FlexibleTypes=true, emit TypeOrMember callable and resolve Type/Column uncertainty on type annotation stage, otherwise always emit Type - bool FlexibleTypes = false; + bool FlexibleTypes = true; // see YQL-10265 bool AnsiCurrentRow = false; TMaybe<bool> YsonCastToString; diff --git a/yql/essentials/sql/v1/sql_query.cpp b/yql/essentials/sql/v1/sql_query.cpp index 781e5d7a5f..2e213d02ad 100644 --- a/yql/essentials/sql/v1/sql_query.cpp +++ b/yql/essentials/sql/v1/sql_query.cpp @@ -3007,6 +3007,9 @@ TNodePtr TSqlQuery::PragmaStatement(const TRule_pragma_stmt& stmt, bool& success Ctx.FlexibleTypes = true; Ctx.IncrementMonCounter("sql_pragma", "FlexibleTypes"); } else if (normalizedPragma == "disableflexibletypes") { + Ctx.Warning(Ctx.Pos(), TIssuesIds::YQL_DEPRECATED_PRAGMA) + << "Deprecated pragma DisableFlexibleTypes - it will be removed soon. " + "Consider submitting bug report if FlexibleTypes doesn't work for you"; Ctx.FlexibleTypes = false; Ctx.IncrementMonCounter("sql_pragma", "DisableFlexibleTypes"); } else if (normalizedPragma == "ansicurrentrow") { |