diff options
author | Maxim Akhmedov <max@nebius.com> | 2023-12-07 14:32:43 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-12-07 15:34:07 +0300 |
commit | 97ebc0b98d06d87ffb15a18ddf9a94496194b849 (patch) | |
tree | bea8b08277ab6d4c827d48417007c6040d8ad4f5 | |
parent | 35ec2ddad1d503933c15edd0583d20eb70368085 (diff) | |
download | ydb-97ebc0b98d06d87ffb15a18ddf9a94496194b849.tar.gz |
Fix wrong naming of Parquet
It is `parquet`, not `parquete`. Let's fix the naming until it is too late.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
---
Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/214
Co-authored-by: nadya02 <nadya02@yandex-team.com>
-rw-r--r-- | yt/python/yt/yson/__init__.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/yt/python/yt/yson/__init__.py b/yt/python/yt/yson/__init__.py index 1bfcd8595e..aca29e6030 100644 --- a/yt/python/yt/yson/__init__.py +++ b/yt/python/yt/yson/__init__.py @@ -38,8 +38,10 @@ from . import parser # noqa from . import yson_types # noqa TYPE = None +HAS_PARQUET = False + try: - from yt_yson_bindings import load, loads, dump, dumps, dump_parquete # noqa + from yt_yson_bindings import load, loads, dump, dumps # noqa TYPE = "BINARY" except ImportError as error: # XXX(asaitgalin): Sometimes module can't be imported because @@ -50,6 +52,19 @@ except ImportError as error: import sys as _sys print("Warning! Failed to import YSON bindings: " + message, file=_sys.stderr) +try: + from yt_yson_bindings import dump_parquet # noqa + HAS_PARQUET = True +except ImportError: + try: + from yt_yson_bindings import dump_parquete as dump_parquet # noqa + HAS_PARQUET = True + except ImportError as error: + message = str(error) + if "No module named" not in message: + import sys as _sys + print("Warning! Failed to import dump_parquet binding: " + message, file=_sys.stderr) + if TYPE is None: from .parser import load, loads # noqa from .writer import dump, dumps # noqa |