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

    https://github.com/apache/spark/pull/6937#discussion_r32967136
  
    --- Diff: python/pyspark/sql/readwriter.py ---
    @@ -370,10 +402,18 @@ def jdbc(self, url, table, mode="error", 
properties={}):
                                arbitrary string tag/value. Normally at least a
                                "user" and "password" property should be 
included.
             """
    +        if mode is not "error":
    +            # At the JVM side, the default value of mode is already set to 
"error".
    +            # So, if mode at here is "error", we will not call mode method.
    +            # This behavior is used to prevent us accidentally overriding 
the mode because
    +            # user can call mode method directly.
    +            # We leave "error" as the default in the method signature, so 
users can
    +            # see what is the default value in Python doc.
    +            self.mode(mode)
    --- End diff --
    
    We can put these into a internal method `_updateMode()`


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