summaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/sql2yql
diff options
context:
space:
mode:
authorvvvv <[email protected]>2025-10-20 18:44:19 +0300
committervvvv <[email protected]>2025-10-20 19:31:02 +0300
commitae55bfb3cdb00950aea6c3a3d8a28837824c75ab (patch)
tree0a5aa2f6be654327753aa08aac7fcfe361cb2348 /yql/essentials/tests/sql/sql2yql
parente10088da1d23e173a6cf83e3cfbd289d364d163a (diff)
YQL-20498: SimplePg infrastructure
commit_hash:309ca86c90175be5a1e016c3e6a5160ba04034e6
Diffstat (limited to 'yql/essentials/tests/sql/sql2yql')
-rw-r--r--yql/essentials/tests/sql/sql2yql/canondata/result.json83
-rw-r--r--yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-now_/formatted.sql3
-rw-r--r--yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-pragma_/formatted.sql5
-rw-r--r--yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-round_/formatted.sql4
-rw-r--r--yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-to_date_/formatted.sql3
5 files changed, 98 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/sql2yql/canondata/result.json b/yql/essentials/tests/sql/sql2yql/canondata/result.json
index 17df9327bdd..d6015859102 100644
--- a/yql/essentials/tests/sql/sql2yql/canondata/result.json
+++ b/yql/essentials/tests/sql/sql2yql/canondata/result.json
@@ -8392,6 +8392,34 @@
"uri": "https://{canondata_backend}/1775059/be020ceb210e118c9d8f06ae73e0f97466c49478/resource.tar.gz#test_sql2yql.test_side_effects-x_not_x_fail_/sql.yql"
}
],
+ "test_sql2yql.test[simple_pg-now]": [
+ {
+ "checksum": "9c101cb0547fdd904399f3c7b83b3ab7",
+ "size": 1048,
+ "uri": "https://{canondata_backend}/1924537/1876fc2fd71d40ff2f24591df6891537a5b4956d/resource.tar.gz#test_sql2yql.test_simple_pg-now_/sql.yql"
+ }
+ ],
+ "test_sql2yql.test[simple_pg-pragma]": [
+ {
+ "checksum": "9c101cb0547fdd904399f3c7b83b3ab7",
+ "size": 1048,
+ "uri": "https://{canondata_backend}/1936947/c82dd7041f2b3bfb7b87a0b701fa34f4580773cb/resource.tar.gz#test_sql2yql.test_simple_pg-pragma_/sql.yql"
+ }
+ ],
+ "test_sql2yql.test[simple_pg-round]": [
+ {
+ "checksum": "4ed23580f5026bd7d37363a78184829a",
+ "size": 1272,
+ "uri": "https://{canondata_backend}/1924537/df91eb332806507b9bce1d113284c9fc64117e5a/resource.tar.gz#test_sql2yql.test_simple_pg-round_/sql.yql"
+ }
+ ],
+ "test_sql2yql.test[simple_pg-to_date]": [
+ {
+ "checksum": "25d4a367b7ebbbce69bb57536228aeac",
+ "size": 1077,
+ "uri": "https://{canondata_backend}/1942278/d4aeb569707e31b9d1898c7eee38a87ffd0b47b9/resource.tar.gz#test_sql2yql.test_simple_pg-to_date_/sql.yql"
+ }
+ ],
"test_sql2yql.test[subselect-aggregate]": [
{
"checksum": "f948f4ad0c25bd1bf52f63dc1ba367e7",
@@ -13380,6 +13408,26 @@
"uri": "file://test_sql_format.test_side_effects-x_not_x_fail_/formatted.sql"
}
],
+ "test_sql_format.test[simple_pg-now]": [
+ {
+ "uri": "file://test_sql_format.test_simple_pg-now_/formatted.sql"
+ }
+ ],
+ "test_sql_format.test[simple_pg-pragma]": [
+ {
+ "uri": "file://test_sql_format.test_simple_pg-pragma_/formatted.sql"
+ }
+ ],
+ "test_sql_format.test[simple_pg-round]": [
+ {
+ "uri": "file://test_sql_format.test_simple_pg-round_/formatted.sql"
+ }
+ ],
+ "test_sql_format.test[simple_pg-to_date]": [
+ {
+ "uri": "file://test_sql_format.test_simple_pg-to_date_/formatted.sql"
+ }
+ ],
"test_sql_format.test[subselect-aggregate]": [
{
"uri": "file://test_sql_format.test_subselect-aggregate_/formatted.sql"
@@ -14057,6 +14105,41 @@
"uri": "https://{canondata_backend}/1924537/c7a75d88255019fa5cdd3450d7e30c52905fc710/resource.tar.gz#test_sql_negative.test_select-use_subrequest_as_table-_/err_file.out"
}
],
+ "test_sql_negative.test[simple_pg-no_prefix-]": [
+ {
+ "checksum": "82ad4cbdf252624cabf99462540b15a6",
+ "size": 217,
+ "uri": "https://{canondata_backend}/1942173/ba37bdfc0cbbc483e28a14d279a103b81539bcd0/resource.tar.gz#test_sql_negative.test_simple_pg-no_prefix-_/err_file.out"
+ }
+ ],
+ "test_sql_negative.test[simple_pg-pg_only_agg-]": [
+ {
+ "checksum": "ffeb98f943a2d86d3fcd64bdf4696d18",
+ "size": 130,
+ "uri": "https://{canondata_backend}/1936273/cac61363c739bb4c3caa53e64b12539fb829b842/resource.tar.gz#test_sql_negative.test_simple_pg-pg_only_agg-_/err_file.out"
+ }
+ ],
+ "test_sql_negative.test[simple_pg-pg_only_normal-]": [
+ {
+ "checksum": "468d7d943aa6b17315278fdba9df67b8",
+ "size": 100,
+ "uri": "https://{canondata_backend}/1936273/cac61363c739bb4c3caa53e64b12539fb829b842/resource.tar.gz#test_sql_negative.test_simple_pg-pg_only_normal-_/err_file.out"
+ }
+ ],
+ "test_sql_negative.test[simple_pg-pragma_off-]": [
+ {
+ "checksum": "9e91df341ed1d8d5aba94245e41ad64b",
+ "size": 226,
+ "uri": "https://{canondata_backend}/1937027/d01fd2a56cb739bdb782ced3cf52623012d7ca49/resource.tar.gz#test_sql_negative.test_simple_pg-pragma_off-_/err_file.out"
+ }
+ ],
+ "test_sql_negative.test[simple_pg-warn_as_error-]": [
+ {
+ "checksum": "06c97b751680598e14632d481ba20d80",
+ "size": 157,
+ "uri": "https://{canondata_backend}/1942173/ba37bdfc0cbbc483e28a14d279a103b81539bcd0/resource.tar.gz#test_sql_negative.test_simple_pg-warn_as_error-_/err_file.out"
+ }
+ ],
"test_sql_negative.test[subselect-group_by_no_source-]": [
{
"checksum": "89df5ece669c02f9a18c773bda291633",
diff --git a/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-now_/formatted.sql b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-now_/formatted.sql
new file mode 100644
index 00000000000..b1dad8c0aa7
--- /dev/null
+++ b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-now_/formatted.sql
@@ -0,0 +1,3 @@
+SELECT
+ SimplePg::now() >= Date('1970-01-01')
+;
diff --git a/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-pragma_/formatted.sql b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-pragma_/formatted.sql
new file mode 100644
index 00000000000..1d36cc3d2be
--- /dev/null
+++ b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-pragma_/formatted.sql
@@ -0,0 +1,5 @@
+PRAGMA SimplePg;
+
+SELECT
+ now() >= Date('1970-01-01')
+;
diff --git a/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-round_/formatted.sql b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-round_/formatted.sql
new file mode 100644
index 00000000000..61bc340acea
--- /dev/null
+++ b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-round_/formatted.sql
@@ -0,0 +1,4 @@
+SELECT
+ SimplePg::round(1.2345, 2),
+ SimplePg::round(1.2345)
+;
diff --git a/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-to_date_/formatted.sql b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-to_date_/formatted.sql
new file mode 100644
index 00000000000..fadc8f35dca
--- /dev/null
+++ b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_simple_pg-to_date_/formatted.sql
@@ -0,0 +1,3 @@
+SELECT
+ SimplePg::to_date('2023-03-01', '%Y-%m-%d')
+;