Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Support LEFT JOIN, WHERE and GROUP BY on Nested Field. #245

@penghuo

Description

@penghuo

SQL

SELECT e.name AS employeeName, 
       COUNT(p.name) AS queryProjectsNum
FROM hr.employeesNest e LEFT JOIN e.projects AS p ON p.name LIKE '%querying%'
WHERE p.name LIKE '%querying%'
GROUP BY e.id, e.name

Test Data

https://github.com/opendistro-for-elasticsearch/sql/blob/master/src/test/resources/employee_nested.json

Expected Result

  {
    'employeeName': 'Bob Smith',
    'queryProjectsNum': 2
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions