Skip to content

IGNITE-13863: Fix Null reading and writing#6

Closed
isapego wants to merge 7 commits intoapache:masterfrom
isapego:ignite-13863
Closed

IGNITE-13863: Fix Null reading and writing#6
isapego wants to merge 7 commits intoapache:masterfrom
isapego:ignite-13863

Conversation

@isapego
Copy link
Copy Markdown
Contributor

@isapego isapego commented Jan 25, 2021

No description provided.

Comment thread pyignite/datatypes/complex.py Outdated
Comment thread pyignite/datatypes/complex.py Outdated
@classmethod
def to_python(cls, ctype_object, *args, **kwargs):
return ctype_object.type, super().to_python(
typ = getattr(ctype_object, "type", None)
Copy link
Copy Markdown
Contributor

@ivandasch ivandasch Feb 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent naming, may be it's better to use tc_type or 'obj_type'

Comment thread tests/test_binary.py Outdated
class AllTypesObject(
metaclass=GenericObjectMeta,
type_name='TestObject',
schema=OrderedDict([
Copy link
Copy Markdown
Contributor

@ivandasch ivandasch Feb 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too many repeats.


def camel_to_snake(name):
     name = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
     return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).lower()

fields = [(camel_to_snake(type_.__name__, type_) for type_  in [ByteObject,... ]]

class AllTypesObject(schema=OrderedDict(fields)):
      pass
 
for field,_ in fields:
   setattr(obj, field, None) 

@asfgit asfgit closed this in 2c0ecb2 Feb 2, 2021
isapego pushed a commit to isapego/ignite-python-thin-client that referenced this pull request Feb 10, 2021
… composite keys (apache#6)

* GG-27261 Python client incorrect hash code calculation for classes as composite keys

Co-authored-by: Aleksandr Shapkin <lexwert@yandex.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants