bvolpato commented on PR #39619: URL: https://github.com/apache/beam/pull/39619#issuecomment-6527487839
To clarify the schema-option point in the earlier discussion: the current [encode path](https://github.com/apache/beam/blob/b738d2087d448e1156f48e290cdd941829af2cc3/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/RowCoderGenerator.java#L225-L234) reads `SCHEMA_OPTION_STATIC_ENCODING` from `value.getSchema()`, while [decode](https://github.com/apache/beam/blob/b738d2087d448e1156f48e290cdd941829af2cc3/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/RowCoderGenerator.java#L284-L297) reads it from the schema held by the coder. The hand-written experiment cached that option from the coder's schema at construction. That is equivalent only when the row and coder agree on the option. I have not established that invariant for all supported inputs, so a generated implementation would need to preserve the per-row lookup or establish that constraint before baking the value into generated code. This was a constraint on the experiment, not a demonstrated regression in this PR, which retains the existing lookup. -- 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]
