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

    https://github.com/apache/spark/pull/10403#discussion_r49266438
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala ---
    @@ -90,6 +90,15 @@ abstract class JdbcDialect extends Serializable {
       }
     
       /**
    +   * Parses a table name in case of containing special characters like . 
seperating database name
    +   * followed by table name (eg "some database"."some-table-name") or 
    +   * in case it contains characters that require quotes (e.g. space).
    +   */
    +  def parseTableName(tableName: String): String = {
    --- End diff --
    
    The method contract here is confusing to me: is this supposed to introduce 
an additional layer of quotes? I find it confusing to couple both the 
responsibilities of quoting identifiers and parsing table names from a 
schema-qualified name.
    
    I'd prefer to have this return just the table name, unquoted, and leave it 
up to later components to escape it. If you _do_ think we should do quoting 
here, please explain that part of the API contract in the Scaladoc.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to