gemini-code-assist[bot] commented on code in PR #37509:
URL: https://github.com/apache/beam/pull/37509#discussion_r2766376000
##########
sdks/python/apache_beam/coders/row_coder.py:
##########
@@ -81,7 +81,8 @@ def _create_impl(self):
def is_deterministic(self):
return all(c.is_deterministic() for c in self.components)
- def as_deterministic_coder(self, step_label, error_message=None):
+ def as_deterministic_coder(
+ self, step_label, error_message=None, options=None):
Review Comment:

The `options` parameter is added to the signature, but it is not passed down
to the component coders in the `else` block. The recursive call to
`c.as_deterministic_coder` for each component `c` should include the `options`
parameter to ensure consistent behavior, similar to the changes in `TupleCoder`.
##########
sdks/python/apache_beam/coders/coders.py:
##########
@@ -898,7 +910,8 @@ def _create_impl(self):
return coder_impl.CallbackCoderImpl(
lambda x: dumps(x, protocol), pickle.loads)
- def as_deterministic_coder(self, step_label, error_message=None):
+ def as_deterministic_coder(
+ self, step_label, error_message=None, options=None):
Review Comment:

Similar to `DillCoder`, the `options` parameter is accepted but not used in
the method body on line 915. It should be passed to `FastPrimitivesCoder` to
ensure version compatibility logic is correctly handled.
##########
sdks/python/apache_beam/coders/coders.py:
##########
@@ -883,7 +894,8 @@ def _nonhashable_dumps(x):
return coder_impl.CallbackCoderImpl(_nonhashable_dumps, pickler.loads)
- def as_deterministic_coder(self, step_label, error_message=None):
+ def as_deterministic_coder(
+ self, step_label, error_message=None, options=None):
Review Comment:

The `options` parameter is accepted but not used in the method body on line
899. It should be passed to `FastPrimitivesCoder` to ensure version
compatibility logic is correctly handled, as `FastPrimitivesCoder`'s
initialization may depend on it via
`_update_compatible_deterministic_fast_primitives_coder`. The current
implementation will not respect the `update_compatibility_version` option at
this call site.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]