[ https://issues.apache.org/jira/browse/BEAM-7886?focusedWorklogId=290892&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-290892 ]
ASF GitHub Bot logged work on BEAM-7886: ---------------------------------------- Author: ASF GitHub Bot Created on: 08/Aug/19 00:09 Start Date: 08/Aug/19 00:09 Worklog Time Spent: 10m Work Description: robinyqiu commented on pull request #9188: [BEAM-7886] Make row coder a standard coder and implement in Python URL: https://github.com/apache/beam/pull/9188#discussion_r311280635 ########## File path: runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/CoderTranslators.java ########## @@ -118,6 +122,32 @@ public T fromComponents(List<Coder<?>> components) { }; } + static CoderTranslator<RowCoder> row() { + return new CoderTranslator<RowCoder>() { + @Override + public List<? extends Coder<?>> getComponents(RowCoder from) { + return ImmutableList.of(); + } + + @Override + public byte[] getPayload(RowCoder from) { + return SchemaTranslation.toProto(from.getSchema()).toByteArray(); + } + + @Override + public RowCoder fromComponents(List<Coder<?>> components, byte[] payload) { + // Assert that components are empty? Review comment: I think adding an assert here won't hurt. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 290892) > Make row coder a standard coder and implement in python > ------------------------------------------------------- > > Key: BEAM-7886 > URL: https://issues.apache.org/jira/browse/BEAM-7886 > Project: Beam > Issue Type: Improvement > Components: beam-model, sdk-java-core, sdk-py-core > Reporter: Brian Hulette > Assignee: Brian Hulette > Priority: Major > Time Spent: 1h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.14#76016)