Skip to content

Support map lookup by key operation #1884

@comphead

Description

@comphead

What is the problem the feature request solves?

Currently test cannot be run in native mode

  test("test lookup map by a key") {
    withSQLConf(
      CometConf.COMET_EXEC_ENABLED.key -> "true",
      SQLConf.USE_V1_SOURCE_LIST.key -> "parquet",
      CometConf.COMET_ENABLED.key -> "true",
      CometConf.COMET_EXPLAIN_FALLBACK_ENABLED.key -> "false",
      CometConf.COMET_NATIVE_SCAN_IMPL.key -> "native_datafusion") {

      testSingleLineQuery(
        """
          | select map(str0, str1) c0 from
          | (
          |    select 'key0' str0, named_struct('a', 1, 'b', 'str') str1
          | )
          |""".stripMargin,
        "select c0['key0'].a from tbl")
    }
  }

org.scalatest.exceptions.TestFailedException: Expected only Comet native operators, but found Project.

Describe the potential solution

Should be supported

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions