Repository navigation
[FEATURE] Predicate Push Down Abstract Implementation #223
Copy link
Copy link
Closed
Labels
Description
Feature Description
Design and implement an abstract interface (through a provider's x-stackQL-resources object) to take advantage of predicate push down to limit data (columns and/or rows) returned.
Example(s)
Given API operations which map to SELECT verbs in StackQL, identify the optional query parameters which can be mapped to the following operation:
- column list for projection, invoked using
SELECT <field1>, <field2>including fields operated on by scalar functions (such asSPLIT_PART,JSON_EXTRACT, etc.) - limiting records returned, invoked using
LIMIT <num> - filter expressions, invoked using
WHERE <field> = '<something>' - ordering predicates, invoked using
ORDER BY <field>
for example...
parameters:
fields:
description: Selector specifying which fields to include in a partial response.
in: query
name: fields
schema:
type: stringCreate a document based interface to map verbs in the parser to the specified query parameters.
Possible Approaches or Libraries to Consider
A possible approach would be to create an extension to the provider interface for example...
components:
x-stackQL-resources:
databases:
id: google.spanner.databases
name: databases
title: Databases
methods:
projects_instances_databases_get:
operation:
$ref: '#/paths/~1v1~1projects~1{projectsId}~1instances~1{instancesId}~1databases~1{databasesId}/get'
response:
mediaType: application/json
openAPIDocKey: '200'
projects_instances_databases_list:
operation:
$ref: '#/paths/~1v1~1projects~1{projectsId}~1instances~1{instancesId}~1databases/get'
response:
mediaType: application/json
openAPIDocKey: '200'
objectKey: $.databases
...
sqlVerbs:
select:
- $ref: '#/components/x-stackQL-resources/databases/methods/projects_instances_databases_get'
- $ref: '#/components/x-stackQL-resources/databases/methods/projects_instances_databases_list'
insert:
- $ref: '#/components/x-stackQL-resources/databases/methods/projects_instances_databases_create'
update: []
delete: []
predicates:
select:
rowFilter:
param: filter
example: "column1 = 'value1' AND column2 = 'value2'"
colFilter:
param: fields
example: "column1,column2"
orderBy:
param: orderBy
example: "column1 ASC"
limit:
param: limit
example: 10may need to implement generalized formats for each type of predicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
jeffreyaven commentedon Jul 5, 2026
closed with #678, #679, #680