Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-30826

LIKE returns wrong result from external table using parquet

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2, 2.1.3, 2.2.3, 2.3.4, 2.4.5, 3.0.0
    • Fix Version/s: 2.4.6, 3.0.0
    • Component/s: SQL
    • Labels:

      Description

      1. Write a parquet file with a column in upper case:
        Seq("42").toDF("COL").write.parquet(path)
        
      2. Create an external table on top of the written parquet files with a column in lower case
        CREATE TABLE t1 (col STRING)
        USING parquet
        OPTIONS (path '$path')
        
      3. Read the table using LIKE
        SELECT * FROM t1 WHERE col LIKE '4%'
        

        It returns empty set but must be one row with 42.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                maxgekk Maxim Gekk
                Reporter:
                maxgekk Maxim Gekk
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: