Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add TZ_DATE as type for result #320

Closed
rekby opened this issue Jun 29, 2023 · 1 comment
Closed

feature: Add TZ_DATE as type for result #320

rekby opened this issue Jun 29, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@rekby
Copy link
Member

rekby commented Jun 29, 2023

Exaple query:

SELECT AddTimezone(CurrentUtcDate(), "Europe/Moscow")

Now it fail with exception:

Details

Potentially leaked tx: 01h434w9ka19226z7hx7ac626e
Traceback (most recent call last):
  File "/Users/rekby/projects/yandex/ydb-python-sdk/tmp/tmp.py", line 26, in <module>
    results = t.execute("""SELECT AddTimezone(CurrentUtcDate(), "Europe/Moscow")""")
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/table.py", line 2229, in execute
    return self._driver(
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/tracing.py", line 70, in wrapper
    return f(self, *args, **kwargs)
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/pool.py", line 442, in __call__
    res = connection(
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/connection.py", line 460, in __call__
    return response if wrap_result is None else wrap_result(rpc_state, response, *wrap_args)
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/_session_impl.py", line 20, in decorator
    return func(rpc_state, response_pb, session_state, *args, **kwargs)
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/_tx_ctx_impl.py", line 9, in decorator
    return func(rpc_state, response_pb, session_state, tx_state, *args, **kwargs)
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/_tx_ctx_impl.py", line 22, in decorator
    return func(rpc_state, response_pb, session_state, tx_state, query, *args, **kwargs)
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/_tx_ctx_impl.py", line 171, in wrap_result_and_tx_id
    return convert.ResultSets(message.result_sets, session_state.table_client_settings)
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/convert.py", line 466, in __init__
    result_set = initializer(result_set, table_client_settings)
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/convert.py", line 324, in from_message
    row[column.name] = column_parser(unwrapped_type, value, table_client_settings)
  File "/Users/rekby/projects/yandex/ydb-python-sdk/ydb/convert.py", line 51, in _pb_to_primitive
    return _primitive_type_by_id.get(type_pb.type_id).get_value(value_pb, table_client_settings)
AttributeError: 'NoneType' object has no attribute 'get_value'

@rekby rekby added the enhancement New feature or request label Jun 29, 2023
@rekby rekby added the duplicate This issue or pull request already exists label Jul 12, 2023
@rekby
Copy link
Member Author

rekby commented Jul 12, 2023

dup of #321

@rekby rekby closed this as completed Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant