-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The CteWorkTable discards the projection argument of the TableProvider::scan instead of properly applying it. It can cause issues when the projection is not the identity
To Reproduce
Use CteWorkTable with a projection that is not the identity
Example of query plan where the optimizer create a projection:
RecursiveQuery: is_distinct=true
Projection: quads.subject, quads.predicate, quads.object
Inner Join: 98c0b23282ec3edfa32aea6fa0af5240 = quads.subject
Projection: Binary("1,98,167,105,102,76,38,234,212,25,70,164,18,107,5,43,205") AS 98c0b23282ec3edfa32aea6fa0af5240
EmptyRelation: rows=1
TableScan: quads projection=[subject, predicate, object], full_filters=[quads.graph_name IS NULL]
Projection: quads.subject, quads.predicate, quads.object
Inner Join: cbd.object = quads.subject
Filter: sparql:isBlank(cbd.object)
TableScan: cbd projection=[object]
TableScan: quads projection=[subject, predicate, object], full_filters=[quads.graph_name IS NULL]
Note the TableScan: cbd projection=[object] that is using `CteWorkTable
Expected behavior
Projection properly applied
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working