aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2025-01-20 19:52:03 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2025-01-20 20:24:50 +0300
commit0b6cd06b8d859e8ed867b5574cb15b7353b3bcd2 (patch)
treed93e83ae7c137867d1fd821e493d1ea200f9499a
parent2c0b6f62749a11e0adb8d1318d2fa79122f29af4 (diff)
downloadydb-0b6cd06b8d859e8ed867b5574cb15b7353b3bcd2.tar.gz
Intermediate changes
commit_hash:302db606da88098276d69272eb2346a8ad040a89
-rw-r--r--yql/essentials/tests/common/test_framework/test_file_common.py8
-rw-r--r--yql/essentials/tests/common/test_framework/test_utils.py18
-rw-r--r--yt/yql/tests/sql/suites/type_v3/bare_yson.cfg3
-rw-r--r--yt/yql/tests/sql/suites/type_v3/bare_yson.sql7
-rw-r--r--yt/yql/tests/sql/suites/type_v3/input.txt4
5 files changed, 18 insertions, 22 deletions
diff --git a/yql/essentials/tests/common/test_framework/test_file_common.py b/yql/essentials/tests/common/test_framework/test_file_common.py
index 3bd6b7af1d..69d5af2c7a 100644
--- a/yql/essentials/tests/common/test_framework/test_file_common.py
+++ b/yql/essentials/tests/common/test_framework/test_file_common.py
@@ -12,8 +12,6 @@ from yql_utils import execute, get_supported_providers, get_tables, get_files, g
from yqlrun import YQLRun
from test_utils import get_parameters_json, replace_vars
-# FIXME dq usage
-from test_utils import DATA_PATH
def get_gateways_config(http_files, yql_http_file_server, force_blocks=False, is_hybrid=False, allow_llvm=True):
@@ -56,10 +54,7 @@ def check_provider(provider, config):
pytest.skip('%s provider is not supported here' % provider)
-# FIXME make data_path required (dq usage)
def get_sql_query(provider, suite, case, config, data_path=None, template='.sql'):
- if data_path is None:
- data_path = DATA_PATH
pragmas = get_pragmas(config)
if get_param('TARGET_PLATFORM'):
@@ -93,9 +88,6 @@ def run_file_no_cache(provider, suite, case, cfg, config, yql_http_file_server,
yqlrun_binary=None, extra_args=[], force_blocks=False, allow_llvm=True, data_path=None,
run_sql=True):
check_provider(provider, config)
- # FIXME dq usage
- if data_path is None:
- data_path = DATA_PATH
sql_query = get_sql_query(provider, suite, case, config, data_path, template='.sql' if run_sql else '.yqls')
sql_query = replace_vars(sql_query, "yqlrun_var")
diff --git a/yql/essentials/tests/common/test_framework/test_utils.py b/yql/essentials/tests/common/test_framework/test_utils.py
index 3b9282eef5..0865245fd9 100644
--- a/yql/essentials/tests/common/test_framework/test_utils.py
+++ b/yql/essentials/tests/common/test_framework/test_utils.py
@@ -9,8 +9,6 @@ from yql_utils import get_param as yql_get_param
from google.protobuf import text_format
import yql.essentials.providers.common.proto.gateways_config_pb2 as gateways_config_pb2
-# FIXME: remove usage from dq_file/hybrid_file/kqp_yt_file
-DATA_PATH = yatest.common.source_path('yql/essentials/tests/sql/suites')
try:
SQLRUN_PATH = yatest.common.binary_path('yql/essentials/tools/sql2yql/sql2yql')
except BaseException:
@@ -112,11 +110,7 @@ def pytest_generate_tests_for_run(metafunc, template='.sql', suites=None, curren
)
-# FIXME make data_path required (dq usage)
def pytest_generate_tests_for_part(metafunc, currentPart, partsCount, data_path=None, template='.sql', mode_expander=None):
- if data_path is None:
- data_path = DATA_PATH
-
return pytest_generate_tests_for_run(metafunc, currentPart=currentPart, partsCount=partsCount,
data_path=data_path, template=template, mode_expander=mode_expander)
@@ -153,10 +147,8 @@ def validate_cfg(result):
), "Unknown command in .cfg: %s" % (r[0])
-# FIXME make data_path required (dq usage)
-def get_config(suite, case, cfg, data_path=None):
- if data_path is None:
- data_path = DATA_PATH
+def get_config(suite, case, cfg, data_path):
+ assert data_path is not None
result = []
try:
default_cfg = get_cfg_file('default.txt', case)
@@ -179,10 +171,8 @@ def load_json_file_strip_comments(path):
return '\n'.join([line for line in file.readlines() if not line.startswith('#')])
-# FIXME make data_path required (dq usage)
-def get_parameters_files(suite, config, data_path=None):
- if data_path is None:
- data_path = DATA_PATH
+def get_parameters_files(suite, config, data_path):
+ assert data_path is not None
result = []
for line in config:
diff --git a/yt/yql/tests/sql/suites/type_v3/bare_yson.cfg b/yt/yql/tests/sql/suites/type_v3/bare_yson.cfg
new file mode 100644
index 0000000000..867a5837c3
--- /dev/null
+++ b/yt/yql/tests/sql/suites/type_v3/bare_yson.cfg
@@ -0,0 +1,3 @@
+xfail
+in Input input.txt
+providers yt
diff --git a/yt/yql/tests/sql/suites/type_v3/bare_yson.sql b/yt/yql/tests/sql/suites/type_v3/bare_yson.sql
new file mode 100644
index 0000000000..9419467ae3
--- /dev/null
+++ b/yt/yql/tests/sql/suites/type_v3/bare_yson.sql
@@ -0,0 +1,7 @@
+/* custom error: Strict Yson type is not allowed to write, please use Optional<Yson> */
+use plato;
+
+pragma yt.UseNativeYtTypes;
+pragma yt.NativeYtTypeCompatibility="complex";
+
+select [key] as keys, Yson::From(subkey) as yson_subkey from Input;
diff --git a/yt/yql/tests/sql/suites/type_v3/input.txt b/yt/yql/tests/sql/suites/type_v3/input.txt
new file mode 100644
index 0000000000..65949ea745
--- /dev/null
+++ b/yt/yql/tests/sql/suites/type_v3/input.txt
@@ -0,0 +1,4 @@
+{"key"="075";"subkey"="1";"value"="abc"};
+{"key"="800";"subkey"="2";"value"="ddd"};
+{"key"="020";"subkey"="3";"value"="q"};
+{"key"="150";"subkey"="4";"value"="qzz"};