Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6352

The map_contains_key function may return true when the key and mapkeytype types are different.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.36.0
    • 1.37.0
    • core
    • None

    Description

       

      scala>  val df = spark.sql("select map_contains_key(map(1, 'a', 2, 'b'), 2.0)")
      val df: org.apache.spark.sql.DataFrame = [map_contains_key(map(1, a, 2, b), 2.0): boolean]
      
      scala> df.show()
      +--------------------------------------+
      |map_contains_key(map(1, a, 2, b), 2.0)|
      +--------------------------------------+
      |                                  true|
      +--------------------------------------+
       

      calcite return false

       

      Attachments

        Activity

          People

            caicancai Caican Cai
            caicancai Caican Cai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: