Skip to content

Optimization for existential subquery #316

Description

@sileix

Existential subqueries can be optimized as operations like sorting won't affect the value of the boolean expression.

Operations that have effect:

  • filter
  • projection: the output parameter could be optional, the semantics is at least one row has all projections are not null or undefined.
  • aggregation: similar to projection, as long as the fields used are not null or undefined, this should be true, so this can probably be optimized to projection.
  • slice: the semantics is at least any of x rows are returned, where x is the length of the slice

Operations that have no effect:

  • sort
  • index
  • argmin/argmax
  • alias

Metadata

Metadata

Assignees

Labels

P2We need to fix it (backlog)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions