hvanhovell commented on code in PR #40234:
URL: https://github.com/apache/spark/pull/40234#discussion_r1122155644


##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/PlanGenerationTestSuite.scala:
##########
@@ -152,11 +161,9 @@ class PlanGenerationTestSuite
   }
 
   private def readRelation(path: Path): proto.Relation = {
-    val input = Files.newInputStream(path)
-    try proto.Relation.parseFrom(input)
-    finally {
-      input.close()
-    }
+    val builder = proto.Relation.newBuilder()
+    parser.merge(Files.readString(path), builder)

Review Comment:
   Are you sure it is safe to read this as a string? The files we are reading 
are binary (so no valid UTF-8).



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