aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql
diff options
context:
space:
mode:
authorvvvv <vvvv@yandex-team.com>2024-12-13 12:05:30 +0300
committervvvv <vvvv@yandex-team.com>2024-12-13 12:33:42 +0300
commitfab10ff25473117c056fd8c4ec06e7cbc4783cbd (patch)
tree83c4b5467943f86cb658522169649dfe5c3f8835 /yql/essentials/tests/sql
parentc51abdbd596f06b9580e928ce0d44015f2fa2fcc (diff)
downloadydb-fab10ff25473117c056fd8c4ec06e7cbc4783cbd.tar.gz
yqls library suffix
commit_hash:145c28ad6f2af01a89393fb186a5934394d6f9a0
Diffstat (limited to 'yql/essentials/tests/sql')
-rw-r--r--yql/essentials/tests/sql/sql2yql/canondata/result.json12
-rw-r--r--yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_library-library_yqls_/formatted.sql7
-rw-r--r--yql/essentials/tests/sql/suites/library/lib1.yqls.txt4
-rw-r--r--yql/essentials/tests/sql/suites/library/library_yqls.cfg1
-rw-r--r--yql/essentials/tests/sql/suites/library/library_yqls.sql4
5 files changed, 28 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/sql2yql/canondata/result.json b/yql/essentials/tests/sql/sql2yql/canondata/result.json
index 817b47972c..ab345774f4 100644
--- a/yql/essentials/tests/sql/sql2yql/canondata/result.json
+++ b/yql/essentials/tests/sql/sql2yql/canondata/result.json
@@ -10653,6 +10653,13 @@
"uri": "https://{canondata_backend}/1937429/434276f26b2857be3c5ad3fdbbf877d2bf775ac5/resource.tar.gz#test_sql2yql.test_library-library_via_http_/sql.yql"
}
],
+ "test_sql2yql.test[library-library_yqls]": [
+ {
+ "checksum": "da2872b19c48276062e74b52d7310e26",
+ "size": 1082,
+ "uri": "https://{canondata_backend}/1937001/cf140a1b2b53c08f9746ee7c7b322863316889f0/resource.tar.gz#test_sql2yql.test_library-library_yqls_/sql.yql"
+ }
+ ],
"test_sql2yql.test[library-package]": [
{
"checksum": "106486465eec39d06f2253ff07547c25",
@@ -27580,6 +27587,11 @@
"uri": "file://test_sql_format.test_library-library_via_http_/formatted.sql"
}
],
+ "test_sql_format.test[library-library_yqls]": [
+ {
+ "uri": "file://test_sql_format.test_library-library_yqls_/formatted.sql"
+ }
+ ],
"test_sql_format.test[library-package]": [
{
"uri": "file://test_sql_format.test_library-package_/formatted.sql"
diff --git a/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_library-library_yqls_/formatted.sql b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_library-library_yqls_/formatted.sql
new file mode 100644
index 0000000000..84fd1a4451
--- /dev/null
+++ b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_library-library_yqls_/formatted.sql
@@ -0,0 +1,7 @@
+PRAGMA library("lib1.yqls");
+
+IMPORT lib1 SYMBOLS $sqr;
+
+SELECT
+ $sqr(10)
+;
diff --git a/yql/essentials/tests/sql/suites/library/lib1.yqls.txt b/yql/essentials/tests/sql/suites/library/lib1.yqls.txt
new file mode 100644
index 0000000000..c53ec8e756
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/library/lib1.yqls.txt
@@ -0,0 +1,4 @@
+(
+(let $sqr (lambda '($x) (* $x $x)))
+(export $sqr)
+)
diff --git a/yql/essentials/tests/sql/suites/library/library_yqls.cfg b/yql/essentials/tests/sql/suites/library/library_yqls.cfg
new file mode 100644
index 0000000000..d66b4537ea
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/library/library_yqls.cfg
@@ -0,0 +1 @@
+file lib1.yqls lib1.yqls.txt
diff --git a/yql/essentials/tests/sql/suites/library/library_yqls.sql b/yql/essentials/tests/sql/suites/library/library_yqls.sql
new file mode 100644
index 0000000000..393249f217
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/library/library_yqls.sql
@@ -0,0 +1,4 @@
+pragma library("lib1.yqls");
+import lib1 symbols $sqr;
+select $sqr(10);
+