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

    https://github.com/apache/spark/pull/1612#discussion_r16704875
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/JdbcRDD.scala ---
    @@ -57,6 +61,8 @@ class JdbcRDD[T: ClassTag](
         mapRow: (ResultSet) => T = JdbcRDD.resultSetToObjectArray _)
       extends RDD[T](sc, Nil) with Logging {
     
    +  private var schema: Seq[(String, Int, Boolean)] = null
    --- End diff --
    
    yep, i tried to do like you said before, but there is no public method or 
attribute to get ResultSet or Statement from this ```JdbcRDD``` in spark core, 
so in ```JdbcResultSetRDD``` i have no idea how can we get the metadata from 
```JdbcRDD```... otherwise we do something like ```jdbcRDD.head``` then we can 
get the metadata from first row, but it may execute the whole query at plan 
phase.


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