Skip to content

[FilterableSource] Add order parameter? #8

@rubensworks

Description

@rubensworks

An important aspect during query execution is the ability to exploit sort orders of result streams, as this can significantly improve performance during join processing.

To enable query engines to ask for certain orders, we may consider adding an additional parameter to the FilterableSource interface, which could look something like this:

interface FilterableSource {
  FilterResult matchExpression (
    optional Term? subject,
    optional Term? predicate,
    optional Term? obj,
    optional Term? graph,
    optional Expression? expression,
    optional { attribute QuadOrder? order } options,
  );
};
type QuadOrder = { term: string; order: 'asc' | 'desc' }[];

Furthermore, to help query engines out during query optimization, we could also add all available orders to the result metadata:

interface QueryResultMetadata {
  attribute QueryResultMetadataCount? count;
  attribute QuadOrder? order;
  attribute QuadOrder[]? alternativeOrders;
};

\cc @jacoscaz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions