diff options
author | robot-piglet <[email protected]> | 2025-04-02 02:01:30 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-04-02 02:11:42 +0300 |
commit | 4157756a3454887710fee0613e550ea1d3051f2c (patch) | |
tree | a00f34981daf23169099a2abd9670be9755ac546 /yql/essentials/tools/sql_functions_dump | |
parent | 9bc77e49a21b083a3dfabac658351d060f1525d8 (diff) |
Intermediate changes
commit_hash:35e335cd8fb87b060881460b5b592519967d5ca0
Diffstat (limited to 'yql/essentials/tools/sql_functions_dump')
-rw-r--r-- | yql/essentials/tools/sql_functions_dump/sql_functions_dump.cpp | 7 | ||||
-rw-r--r-- | yql/essentials/tools/sql_functions_dump/test/test.py | 10 |
2 files changed, 9 insertions, 8 deletions
diff --git a/yql/essentials/tools/sql_functions_dump/sql_functions_dump.cpp b/yql/essentials/tools/sql_functions_dump/sql_functions_dump.cpp index 14627a85aed..66dae62d636 100644 --- a/yql/essentials/tools/sql_functions_dump/sql_functions_dump.cpp +++ b/yql/essentials/tools/sql_functions_dump/sql_functions_dump.cpp @@ -10,16 +10,17 @@ int Main(int argc, const char *argv[]) Y_UNUSED(argc); Y_UNUSED(argv); NJsonWriter::TBuf json; - json.BeginObject(); + json.BeginList(); NSQLTranslationV1::EnumerateBuiltins([&](auto name, auto kind) { - json.WriteKey(name); json.BeginObject(); + json.WriteKey("name"); + json.WriteString(name); json.WriteKey("kind"); json.WriteString(kind); json.EndObject(); }); - json.EndObject(); + json.EndList(); Cout << json.Str() << Endl; return 0; diff --git a/yql/essentials/tools/sql_functions_dump/test/test.py b/yql/essentials/tools/sql_functions_dump/test/test.py index 2595e4bc0b6..ca4d1ad5b87 100644 --- a/yql/essentials/tools/sql_functions_dump/test/test.py +++ b/yql/essentials/tools/sql_functions_dump/test/test.py @@ -8,13 +8,13 @@ TOOL_PATH = yatest.common.binary_path('yql/essentials/tools/sql_functions_dump/s def test_functions_dump(): with open(os.path.join(DATA_PATH, "sql_functions.json")) as f: - types_from_file = json.load(f) + func_from_file = json.load(f) res = yatest.common.execute( [TOOL_PATH], check_exit_code=True, wait=True ) - types_from_tool = json.loads(res.stdout) - assert types_from_tool == types_from_file, 'JSON_DIFFER\n' \ - 'File:\n %(types_from_file)s\n\n' \ - 'Tool:\n %(types_from_tool)s\n' % locals() + func_from_tool = json.loads(res.stdout) + assert func_from_tool == func_from_file, 'JSON_DIFFER\n' \ + 'File:\n %(func_from_file)s\n\n' \ + 'Tool:\n %(func_from_tool)s\n' % locals() |