ydb-platform / ydb-platform/ydb-python-sdk
bug: TypeError: 'NoneType' object is not callable while iterating Scanquery results
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 102
- Forks
- 75
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 13
Description
Bug Report
YDB Python SDK version:
ydb-3.3.5
Environment
Mac OS X
Current behavior:
for row_proto in message.rows:
row = _Row(message.columns)
for column, value, column_info in zip(message.columns, row_proto.items, column_parsers):
v_type = value.WhichOneof("value")
if v_type == "null_flag_value":
row[column.name] = None
continue
while v_type == "nested_value":
value = value.nested_value
v_type = value.WhichOneof("value")
column_parser, unwrapped_type = column_info
row[column.name] = column_parser(unwrapped_type, value, table_client_settings)
E TypeError: 'NoneType' object is not callable
Expected behavior:
Steps to reproduce:
--!syntax_v1
pragma EmitAggApply;
SELECT
Pg::count(),Pg::count(key),Pg::min(key),Pg::max(key),Pg::sum(key),Pg::avg(key)
FROM (values (1),(2),(3)) as a(key)
it = ydb_driver.table_client.scan_query(query, settings=settings)
if it is None:
return None
while True:
try:
result = next(it)
Other information:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the scan_query result iteration and the _Row assignment where column_parser is called, then reproduce the aggregate query shown in the issue. Trace why a parser is None for the returned values and verify that iterating these Scanquery results completes without TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100