pavibhai commented on code in PR #6293:
URL: https://github.com/apache/iceberg/pull/6293#discussion_r1051170766


##########
orc/src/test/java/org/apache/iceberg/orc/TestOrcDataWriter.java:
##########
@@ -126,4 +135,116 @@ public void testDataWriter() throws IOException {
 
     Assert.assertEquals("Written records should match", records, 
writtenRecords);
   }
+
+  @Test
+  public void testUsingFileIO() throws IOException {
+    // Show that FileSystem access is not possible for the file we are 
supplying as the scheme
+    // dummy is not handled
+    ProxyOutputFile outFile = new 
ProxyOutputFile(Files.localOutput(temp.newFile()));
+    Assertions.assertThatThrownBy(
+            () -> HadoopOutputFile.fromPath(new Path(outFile.location()), new 
Configuration()))
+        .isInstanceOf(RuntimeIOException.class)
+        .hasMessageStartingWith("Failed to get file system for path: dummy");
+
+    // We are creating the proxy
+    SortOrder sortOrder = 
SortOrder.builderFor(SCHEMA).withOrderId(10).asc("id").build();
+
+    DataWriter<Record> dataWriter =
+        ORC.writeData(outFile)
+            .schema(SCHEMA)
+            .createWriterFunc(GenericOrcWriter::buildWriter)
+            .overwrite()
+            .withSpec(PartitionSpec.unpartitioned())

Review Comment:
   yeah we need it, without it I get an error that `Cannot create data writer 
without spec`



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to