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

[CBRD-23749] Support HASH LIST SCAN for Hierarchical Queries #2520

Merged
merged 15 commits into from
Dec 21, 2020

Conversation

shparkcubrid
Copy link
Contributor

@shparkcubrid shparkcubrid commented Dec 8, 2020

http://jira.cubrid.org/browse/CBRD-23749

OPTIMIZER
There are no modifications in the OPTIMIZER.
Checking whether the predicate of the CONNECT BY clause is hashable is performed in XASL generation. The mergeable term used in the HASH LIST SCAN is for join term, and a different checklist is required in hierarchical query. I implemented the checklist in XASL generation.

XASL generator
Add access spec of list scan for HQ having join. (pt_make_connect_by_proc() )
data filter predicates is not involved in list scan. instead of data filter, if_pred will be evaluated at EXECUTION step.

Check whether the predicate of the CONNECT BY clause is hashable. (pt_split_hash_attrs_for_HQ() )
HASH LIST SCAN for HQ is possible under the following conditions.

1. CNF predicate (node is NOT PT_AND, PT_OR)
2. only equal operation
3. predicate without OR (or_next is null)
4. symmetric predicate (having PRIOR, probe. having NAME, build. Having these two makes it unhashable)
5. subquery is not allowed in syntax check

Split predicates into build attributes and probe attributes.

 is_PRIOR  | NAME_without prior | characteristic
     O     |        O           | unhashable
     O     |        X           | probe attr
     X     |        O           | build attr
     X     |        X           | constant (can be probe or build attr)

EXECUTOR
To scan output temp file, call scan_next_scan() instead of qfile_scan_list_next(). (qexec_execute_connect_by() )

  • The code for the join tables is deleted and the same routine as the single table is used.

@shparkcubrid shparkcubrid merged commit 7224cd1 into CUBRID:develop Dec 21, 2020
@shparkcubrid shparkcubrid deleted the CBRD-23749 branch December 21, 2020 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants