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

    https://github.com/apache/spark/pull/10312#discussion_r47673153
  
    --- Diff: python/pyspark/sql/readwriter.py ---
    @@ -511,13 +511,20 @@ def jdbc(self, url, table, mode=None, 
properties=None):
             :param properties: JDBC database connection arguments, a list of
                                arbitrary string tag/value. Normally at least a
                                "user" and "password" property should be 
included.
    +        :param columnMapping: optional column name mapping from DF field 
names to 
    +                              JDBC table column names.
             """
             if properties is None:
                 properties = dict()
             jprop = JavaClass("java.util.Properties", 
self._sqlContext._sc._gateway._gateway_client)()
             for k in properties:
                 jprop.setProperty(k, properties[k])
    -        self._jwrite.mode(mode).jdbc(url, table, jprop)
    +        if columnMapping is None:
    +             columnMapping = dict()
    --- End diff --
    
    Will do updates. - Can you please remind me of best git commands for 
    updating the PR without creating extra commits?
    
    On 15.12.2015 18:59, Sean Owen wrote:
    >
    > In python/pyspark/sql/readwriter.py 
    > <https://github.com/apache/spark/pull/10312#discussion_r47672003>:
    >
    > >          """
    > >          if properties is None:
    > >              properties = dict()
    > >          jprop = JavaClass("java.util.Properties", 
self._sqlContext._sc._gateway._gateway_client)()
    > >          for k in properties:
    > >              jprop.setProperty(k, properties[k])
    > > -        self._jwrite.mode(mode).jdbc(url, table, jprop)
    > > +        if columnMapping is None:
    > > +                 columnMapping = dict()
    >
    > Then indent looks too deep here
    >
    > —
    > Reply to this email directly or view it on GitHub 
    > <https://github.com/apache/spark/pull/10312/files#r47672003>.
    >
    



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