[ https://issues.apache.org/jira/browse/BEAM-6468?focusedWorklogId=189753&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-189753 ]
ASF GitHub Bot logged work on BEAM-6468: ---------------------------------------- Author: ASF GitHub Bot Created on: 24/Jan/19 23:35 Start Date: 24/Jan/19 23:35 Worklog Time Spent: 10m Work Description: akedin commented on pull request #7568: [BEAM-6468] Allow creating empty TestBoundedTable URL: https://github.com/apache/beam/pull/7568#discussion_r250818620 ########## File path: sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/test/TestBoundedTable.java ########## @@ -92,8 +95,19 @@ public TestBoundedTable addRows(Object... args) { @Override public PCollection<Row> buildIOReader(PBegin begin) { + PTransform<PBegin, PCollection<Row>> valueTransform; + + if (rows.isEmpty()) { + valueTransform = + Create.empty( + SchemaCoder.of( + schema, SerializableFunctions.identity(), SerializableFunctions.identity())); + } else { + valueTransform = Create.of(rows); Review comment: why not just always set the schema, it will then handle both cases: `Create.of(rows).withSchema(SchemaCoder.of(...))` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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: 189753) Time Spent: 3h 10m (was: 3h) > Cannot create empty TestBoundedTable > ------------------------------------ > > Key: BEAM-6468 > URL: https://issues.apache.org/jira/browse/BEAM-6468 > Project: Beam > Issue Type: Bug > Components: dsl-sql > Reporter: Rui Wang > Assignee: Rui Wang > Priority: Major > Time Spent: 3h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)