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

ESQL: Remove aliasing inside Eval #100174

Closed
costin opened this issue Oct 3, 2023 · 2 comments · Fixed by #100238
Closed

ESQL: Remove aliasing inside Eval #100174

costin opened this issue Oct 3, 2023 · 2 comments · Fixed by #100238
Assignees
Labels
:Analytics/ES|QL AKA ESQL >enhancement Team:QL (Deprecated) Meta label for query languages team

Comments

@costin
Copy link
Member

costin commented Oct 3, 2023

Description

Evals that introduce aliased can be simplified by extracting them into a project (and thus signaling there's no underlying processing).

The following eval:
eval x = a + 1, y = x, z = y + 1, y = z, w = y + 1
can be converted into:
eval x = a + 1, z = a + 1 + 1, w = a + 1 + 1 | project x, z, z as y, w

This helps fuse the project with other projections/aggs downstream.

@costin costin self-assigned this Oct 3, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@elasticsearchmachine elasticsearchmachine added the Team:QL (Deprecated) Meta label for query languages team label Oct 3, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL)

costin added a commit to costin/elasticsearch that referenced this issue Oct 4, 2023
Evals that introduce aliased can be simplified by extracting them into a
 project (and thus signaling there's no underlying processing).

The following eval:
  eval x = a + 1, y = x, z = y + 1, y = z, w = y + 1
can be converted into:
  eval x = a + 1, z = a + 1 + 1, w = a + 1 + 1 | project x, z, z as y, w

Fix elastic#100174
costin added a commit to costin/elasticsearch that referenced this issue Oct 4, 2023
Evals that introduce aliased can be simplified by extracting them into a
 project (and thus signaling there's no underlying processing).

The following eval:
  eval x = a + 1, y = x, z = y + 1, y = z, w = y + 1
can be converted into:
  eval x = a + 1, z = a + 1 + 1, w = a + 1 + 1 | project x, z, z as y, w

Fix elastic#100174
costin added a commit to costin/elasticsearch that referenced this issue Oct 4, 2023
Evals that introduce aliased can be simplified by extracting them into a
 project (and thus signaling there's no underlying processing).

The following eval:
  eval x = a + 1, y = x, z = y + 1, y = z, w = y + 1
can be converted into:
  eval x = a + 1, z = a + 1 + 1, w = a + 1 + 1 | project x, z, z as y, w

Fix elastic#100174
costin added a commit to costin/elasticsearch that referenced this issue Oct 4, 2023
Evals that introduce aliased can be simplified by extracting them into a
 project (and thus signaling there's no underlying processing).

The following eval:
  eval x = a + 1, y = x, z = y + 1, y = z, w = y + 1
can be converted into:
  eval x = a + 1, z = a + 1 + 1, w = a + 1 + 1 | project x, z, z as y, w

Fix elastic#100174
costin added a commit that referenced this issue Oct 5, 2023
Evals that introduce aliased can be simplified by extracting them into a
 project (and thus signaling there's no underlying processing).

The following eval:
  eval x = a + 1, y = x, z = y + 1, y = z, w = y + 1
can be converted into:
  eval x = a + 1, z = a + 1 + 1, w = a + 1 + 1 | project x, z, z as y, w

Fix #100174
Fix #100050
costin added a commit to costin/elasticsearch that referenced this issue Oct 5, 2023
Evals that introduce aliased can be simplified by extracting them into a
 project (and thus signaling there's no underlying processing).

The following eval:
  eval x = a + 1, y = x, z = y + 1, y = z, w = y + 1
can be converted into:
  eval x = a + 1, z = a + 1 + 1, w = a + 1 + 1 | project x, z, z as y, w

Fix elastic#100174
Fix elastic#100050
elasticsearchmachine pushed a commit that referenced this issue Oct 5, 2023
* ESQL: Remove aliasing inside Eval (#100238)

Evals that introduce aliased can be simplified by extracting them into a
 project (and thus signaling there's no underlying processing).

The following eval:
  eval x = a + 1, y = x, z = y + 1, y = z, w = y + 1
can be converted into:
  eval x = a + 1, z = a + 1 + 1, w = a + 1 + 1 | project x, z, z as y, w

Fix #100174
Fix #100050

* Incorporate #100357

* Temporarily disable failing test

Relates #100365

(cherry picked from commit 0ef4da2)

* ESQL: Temporarily disable huge concat tests (#100352)

We're working on these and we have a plan!

(cherry picked from commit acca114)

---------

Co-authored-by: Nik Everett <nik9000@gmail.com>
davidkyle pushed a commit to davidkyle/elasticsearch that referenced this issue Oct 9, 2023
Evals that introduce aliased can be simplified by extracting them into a
 project (and thus signaling there's no underlying processing).

The following eval:
  eval x = a + 1, y = x, z = y + 1, y = z, w = y + 1
can be converted into:
  eval x = a + 1, z = a + 1 + 1, w = a + 1 + 1 | project x, z, z as y, w

Fix elastic#100174
Fix elastic#100050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >enhancement Team:QL (Deprecated) Meta label for query languages team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants