Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16340#discussion_r93125645
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala
 ---
    @@ -301,6 +301,7 @@ private[jdbc] class JDBCRDD(
         rs = stmt.executeQuery()
         val rowsIterator = JdbcUtils.resultSetToSparkInternalRows(rs, schema, 
inputMetrics)
     
    -    CompletionIterator[InternalRow, Iterator[InternalRow]](rowsIterator, 
close())
    +    CompletionIterator[InternalRow, Iterator[InternalRow]](
    +      new InterruptibleIterator(context, rowsIterator), close())
    --- End diff --
    
    I suppose I could also have added the check into 
`resultSetToSparkInternalRows` but that function is exposed for use outside of 
Spark internals. Also, I think that JDBCRDD is going to be slow enough that the 
performance impact here shouldn't be noticeable.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to