This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.5 by this push:
     new 6e19fb2853b [MINOR][CONNECT] Remove redundant type cast in 
`ArtifactManager`
6e19fb2853b is described below

commit 6e19fb2853b26b5da3f02bc829e0c05e52d5a929
Author: yangjie01 <[email protected]>
AuthorDate: Sat Jul 22 16:50:27 2023 +0900

    [MINOR][CONNECT] Remove redundant type cast in `ArtifactManager`
    
    ### What changes were proposed in this pull request?
    This pr just remove redundant type cast in `ArtifactManager`
    
    ### Why are the changes needed?
    remove redundant type cast.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    Pass GitHub Actions
    
    Closes #42107 from LuciferYang/redundant-cast.
    
    Authored-by: yangjie01 <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
    (cherry picked from commit 49401c7a679c807abd25613648bd156a221ccc7b)
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 .../scala/org/apache/spark/sql/connect/client/ArtifactManager.scala   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/ArtifactManager.scala
 
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/ArtifactManager.scala
index b24c36ea474..a0158170a5b 100644
--- 
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/ArtifactManager.scala
+++ 
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/ArtifactManager.scala
@@ -219,7 +219,7 @@ class ArtifactManager(
       .setUserContext(userContext)
       .setSessionId(sessionId)
     artifacts.foreach { artifact =>
-      val in = new 
CheckedInputStream(artifact.storage.asInstanceOf[LocalData].stream, new CRC32)
+      val in = new CheckedInputStream(artifact.storage.stream, new CRC32)
       try {
         val data = proto.AddArtifactsRequest.ArtifactChunk
           .newBuilder()
@@ -274,7 +274,7 @@ class ArtifactManager(
       .setUserContext(userContext)
       .setSessionId(sessionId)
 
-    val in = new 
CheckedInputStream(artifact.storage.asInstanceOf[LocalData].stream, new CRC32)
+    val in = new CheckedInputStream(artifact.storage.stream, new CRC32)
     try {
       // First RPC contains the `BeginChunkedArtifact` payload (`begin_chunk`).
       // Subsequent RPCs contains the `ArtifactChunk` payload (`chunk`).


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

Reply via email to