Skip to content

Commit 90390c8

Browse files
committed
review fix
1 parent 019594d commit 90390c8

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
* Query service client support
3+
* Add dunder version to ydb package
14
* OAuth 2.0 token exchange. Allow multiple resource parameters in according to https://www.rfc-editor.org/rfc/rfc8693
25

36
## 3.14.0 ##

docker-compose-tls.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ services:
1111
- ./ydb_certs:/ydb_certs
1212
environment:
1313
- YDB_USE_IN_MEMORY_PDISKS=true
14+
- YDB_ENABLE_COLUMN_TABLES=true

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ services:
88
hostname: localhost
99
environment:
1010
- YDB_USE_IN_MEMORY_PDISKS=true
11+
- YDB_ENABLE_COLUMN_TABLES=true

ydb/convert.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,11 @@ def query_parameters_to_pb(parameters):
290290
for name, value in parameters.items():
291291
if isinstance(value, types.TypedValue):
292292
if value.value_type is None:
293-
value.value_type = _primitive_type_from_python_native(value.value)
293+
value.value_type = _type_from_python_native(value.value)
294294
elif isinstance(value, tuple):
295295
value = types.TypedValue(*value)
296296
else:
297-
value = types.TypedValue(value, _primitive_type_from_python_native(value))
297+
value = types.TypedValue(value, _type_from_python_native(value))
298298

299299
parameters_values[name] = value.value
300300
parameters_types[name] = value.value_type
@@ -310,7 +310,7 @@ def query_parameters_to_pb(parameters):
310310
}
311311

312312

313-
def _primitive_type_from_python_native(value):
313+
def _type_from_python_native(value):
314314
t = type(value)
315315

316316
if t in _from_python_type_map:
@@ -322,7 +322,7 @@ def _primitive_type_from_python_native(value):
322322
"Could not map empty list to any type, please specify "
323323
"it manually by tuple(value, type) or ydb.TypedValue"
324324
)
325-
entry_type = _primitive_type_from_python_native(value[0])
325+
entry_type = _type_from_python_native(value[0])
326326
return types.ListType(entry_type)
327327

328328
if t == dict:
@@ -332,8 +332,8 @@ def _primitive_type_from_python_native(value):
332332
"it manually by tuple(value, type) or ydb.TypedValue"
333333
)
334334
entry = list(value.items())[0]
335-
key_type = _primitive_type_from_python_native(entry[0])
336-
value_type = _primitive_type_from_python_native(entry[1])
335+
key_type = _type_from_python_native(entry[0])
336+
value_type = _type_from_python_native(entry[1])
337337
return types.DictType(key_type, value_type)
338338

339339
raise ValueError(

0 commit comments

Comments
 (0)