reuvenlax commented on a change in pull request #15810:
URL: https://github.com/apache/beam/pull/15810#discussion_r741580687



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/testing/FakeDatasetService.java
##########
@@ -249,7 +254,21 @@ public void createTable(Table table) throws IOException {
             "Tried to get a dataset %s:%s, but no such table was set",
             tableReference.getProjectId(), tableReference.getDatasetId());
       }
-      dataset.computeIfAbsent(tableReference.getTableId(), k -> new 
TableContainer(table));
+      dataset.computeIfAbsent(
+          tableReference.getTableId(),
+          k -> {
+            TableContainer tableContainer = new TableContainer(table);
+            // Create the default stream.
+            String streamName =
+                String.format(
+                    "projects/%s/datasets/%s/tables/%s/streams/_default",
+                    tableReference.getProjectId(),
+                    tableReference.getDatasetId(),
+                    
BigQueryHelpers.stripPartitionDecorator(tableReference.getTableId()));
+            writeStreams.put(streamName, new Stream(tableContainer, 
Type.COMMITTED));

Review comment:
       This is just the unit-testing fake though.




-- 
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]


Reply via email to