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

CBL-6285: Explain for predictive query no longer names an index #2193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jianminzhao
Copy link
Contributor

@jianminzhao jianminzhao commented Dec 12, 2024

The main issue is that we need to know the kv table on which the PredictiveNode is created, and the pass that SourceNodes are assigned table names is run after the pass all nodes are created.

Several technical changes.

  • SourceNode::collection() is empty string only if it's not given in the query expression. (Currently it will be turned to empty string if explicitly given "_default."
  • We assign the table name to the main data source in the pass of node creation, so that it can be used when PredictiveNode is populated. It can be later altered if flag _usesDeleted is set.
  • The result of keystore.compileQuery() should be the same, except that empty data source in the FROM clause will be substituted for with collection corresponding to the invoking key store.

@cbl-bot
Copy link

cbl-bot commented Dec 12, 2024

Code Coverage Results:

Type Percentage
branches 66.25
functions 78.54
instantiations 70.71
lines 77.64
regions 73.45

@jianminzhao jianminzhao requested a review from snej December 12, 2024 03:15
@jianminzhao jianminzhao marked this pull request as draft December 12, 2024 14:01
The main issue is that we need to know the kv table on which the PredictiveNode is created, and the pass that SourceNodes are assigned table names is run after the pass all nodes are created.

Several technical changes.
- SourceNode::collection() is empty string only if it's not given in the query expression. (Currently it will be turned to empty string if explicitly given "_default."
- We assign the table name to the main data source in the pass of node creation, so that it can be used when PredictiveNode is populated. It can be later altered if flag _usesDeleted is set.
- The result of keystore.compileQuery() should be the same, except that empty data source in the FROM clause will be substituted for with collection corresponding to the invoking key store.
@jianminzhao jianminzhao marked this pull request as ready for review December 14, 2024 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants