Skip to content

Conversation

@mdumandag
Copy link
Contributor

This change was needed to support efficient eager deserialization of the SQL columns of type OBJECT.

I have also refactored the language_specific_funcs so that we don't have to put dummy values even for functions that are needed for a single language.

This change was needed to support efficient eager deserialization
of the SQL columns of type OBJECT.

I have also refactored the `language_specific_funcs` so that
we don't have to put dummy values even for functions that are
needed for a single language.
cs_types_encode,
cs_custom_codec_param_name,
cs_init_env
cs_sizeof
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the .Net guys review this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no behaviour change, in the init method they were just adding this function to the env, which we do as well

Copy link
Contributor

@srknzl srknzl left a comment

Choose a reason for hiding this comment

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

We are passing to_object fn to codecs if one of its response parameters is SqlPage. I think this can be execute and fetch.

I did not get why we pass to_object fn to SqlPage. Can't we keep a to_object_fn in SqlResult and call it in _IteratorBase._get_current_row after SqlPage.get_value returns a Data.

@mdumandag
Copy link
Contributor Author

@srknzl

  1. Yes, if you take a look at the Python PR, these two are the changed codecs.
  2. No, that doesn't work, we need to receive "SchemaNotFoundError" while decoding the client message. Doing it on the iterator has the same problems as our old lazily-deserialized list. Plus, we would have to deal with the positions etc. in that case, which would result in a fairly complex solution. This is much simpler, and actually a bit faster, because we now eliminated unnecessary to_object calls for column types that we don't need to deserialize (i.e. everything other than OBJECT)

@mdumandag mdumandag merged commit 9ce557d into hazelcast:master Mar 28, 2023
@mdumandag mdumandag deleted the python-sql-eager-deser branch March 28, 2023 10:43
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.

3 participants