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

    https://github.com/apache/spark/pull/8391#discussion_r37830657
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala
 ---
    @@ -275,6 +275,7 @@ private[sql] class JDBCRDD(
        */
       private def compileFilter(f: Filter): String = f match {
         case EqualTo(attr, value) => s"$attr = ${compileValue(value)}"
    +    case EqualNullSafe(attr, value) => s"$attr <=> ${compileValue(value)}"
    --- End diff --
    
    I thought the comparison operator is official and a standard one (because 
both I am used to MySQL and thought Spark and Hive uses Standard SQL Syntax). 
However, it looks like it is a MySQL dialect. 
    
    In details, 
    Firstly, I looked through several documents.
    I assume there are several standard documentations as mentioned in the 
`Where can I get a copy of the SQL standards?` 
https://wiki.postgresql.org/wiki/Developer_FAQ#Where_can_I_get_a_copy_of_the_SQL_standards.3F).
    
    (SQL-92 http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
    SQL:1999 
http://web.cs.ualberta.ca/~yuan/courses/db_readings/ansi-iso-9075-2-1999.pdf
    SQL:2003 http://www.wiscorp.com/sql_2003_standard.zip
    SQL:201x (preliminary) http://www.wiscorp.com/sql20nn.zip)
    
    Though I can guarantee, It looks null-safe equality comparison is not the 
standard one. It seems there are no mentions about this.
    
    Secondly, I got a list of the top 10 databases here 
(http://www.improgrammer.net/top-10-databases-should-learn-2015/)
    
    and reviewed if there is a such operation or not.
    
    1. Oracle - not support (http://docs.oracle.com/html/A95915_01/sqopr.htm)
    
    2. MySQL - support 
(https://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html)
    
    3. Microsoft SQL Server - not support 
(https://msdn.microsoft.com/en-us/library/ms188074.aspx)
    
    4. PostgreSQL - not support 
(http://www.postgresql.org/docs/9.2/static/functions-comparison.html)
    
    5. MongoDB  - N/A
    
    6. DB 2 - not support 
(http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/sqlp/rbafycompop.htm)
    
    7. Microsoft Access - not support 
(https://support.office.com/en-za/article/Table-of-operators-e1bc04d5-8b76-429f-a252-e9223117d6bd)
    
    8. SQLite - not support 
(http://www.tutorialspoint.com/sqlite/sqlite_comparison_operators.htm)
    
    9. Cassandra  - N/A
    
    10. Redis - N/A



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