Skip to content

Fix StringSplit conversion failure #1845

@Flyangz

Description

@Flyangz

Describe the bug
Simple StringSplit fail to match in

if Seq(",", ", ", ":", ";", "#", "@", "_", "-", "\\|", "\\.").contains(pat.value) =>

because pat.value is UTF8String which can not be compared to String directly.

To Reproduce
debug this query in AuronQuerySuite

test("my test") {
    withTable("my_table") {
      sql("""
            |create table my_table using parquet as
            |select col1 from values ('a,A'), ('b,B'), ('c,C')
            |""".stripMargin)
      sql("""
            |select split(col1, ',')[0]
            |from my_table
            |""".stripMargin).show()
    }
  }

Expected behavior
Simple StringSplit can be converted to native.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions