Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add more details in the explain for ProjectOperator #2901

Open
qianheng-aws opened this issue Aug 6, 2024 · 1 comment · May be fixed by #2911
Open

[FEATURE] Add more details in the explain for ProjectOperator #2901

qianheng-aws opened this issue Aug 6, 2024 · 1 comment · May be fixed by #2911
Labels
enhancement New feature or request

Comments

@qianheng-aws
Copy link
Contributor

qianheng-aws commented Aug 6, 2024

Is your feature request related to a problem?
Currently, in an explain for a sql which produces ProjectOperator, it only shows the field information of ProjectOperator.

However, if a sql-produced ProjectOperator contains alias, its source-related information is missing in the explain, thus users cannot tell whether the plan is right or not.
e.g.

POST _plugins/_sql/_explain
{
  "query": "SELECT (FlightTimeMin + 1) as FlightTimeMinPlusOne FROM opensearch_dashboards_sample_data_flights LIMIT 5"
}


# explain response
{
  "root": {
    "name": "ProjectOperator",
    "description": {
      "fields": "[FlightTimeMinPlusOne]"
    },
    "children": [
      {
        "name": "OpenSearchIndexScan",
        "description": {
          "request": """OpenSearchQueryRequest(indexName=opensearch_dashboards_sample_data_flights, sourceBuilder={"from":0,"size":5,"timeout":"1m","_source":{"includes":["FlightTimeMin"],"excludes":[]}}, searchDone=false)"""
        },
        "children": []
      }
    ]
  }
}

What solution would you like?
Show the information of name which is (FlightTimeMin + 1) or delegate which is +(FlightTimeMin, 1) in the explain of ProjectOperators.

What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?
Add any other context or screenshots about the feature request here.

@qianheng-aws qianheng-aws added enhancement New feature or request untriaged labels Aug 6, 2024
@qianheng-aws qianheng-aws changed the title [FEATURE] Add more details in explain for ProjectOperator [FEATURE] Add more details in the explain for ProjectOperator Aug 6, 2024
@dblock dblock removed the untriaged label Aug 26, 2024
@dblock
Copy link
Member

dblock commented Aug 26, 2024

[Catch All Triage - 1, 2, 3, 4, 5]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants