koedlt commented on code in PR #45776:
URL: https://github.com/apache/spark/pull/45776#discussion_r1545643660


##########
sql/core/src/test/java/test/org/apache/spark/sql/JavaDataFrameWriterV2Suite.java:
##########
@@ -26,29 +32,30 @@
 import org.apache.spark.sql.connector.catalog.InMemoryTableCatalog;
 import org.apache.spark.sql.test.TestSparkSession;
 import org.apache.spark.sql.types.StructType;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
+import org.apache.spark.util.Utils;
 
 import static org.apache.spark.sql.functions.*;
 
 public class JavaDataFrameWriterV2Suite {
   private static StructType schema = new StructType().add("s", "string");
   private SparkSession spark = null;
+  private transient String input;
 
   public Dataset<Row> df() {
-    return spark.read().schema(schema).text();
+    return spark.read().schema(schema).text(input);
   }
 
   @BeforeEach
   public void createTestTable() {
     this.spark = new TestSparkSession();
     spark.conf().set("spark.sql.catalog.testcat", 
InMemoryTableCatalog.class.getName());
     spark.sql("CREATE TABLE testcat.t (s string) USING foo");
+    input = Utils.createTempDir(System.getProperty("java.io.tmpdir"), 
"input").toString();

Review Comment:
   Damn of course, I wasn't looking closely :+1:



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to