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

[Fix](inverted index) fix need read data optimize problem #28104

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

airborne12
Copy link
Member

Proposed changes

Issue Number: close #xxx

This fix addresses an issue encountered when querying an inverted index table with a query like: SELECT COUNT() FROM table WHERE index_column > 1 AND index_column < 2.
In such scenarios, if the predicate index_column > 1 inadvertently skips using the index, but index_column < 2 utilizes the index for querying, the index_column gets incorrectly marked as not needing data read. This behavior leads to incorrect query results. The fix ensures accurate marking of columns for data reads in these cases.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@airborne12
Copy link
Member Author

run buildall

Copy link
Contributor

github-actions bot commented Dec 7, 2023

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
Tpch sf100 test result on commit d69061dedb4adab39d97f8e020743fe706377912, data reload: false

run tpch-sf100 query with default conf and session variables
q1	4736	4518	4480	4480
q2	361	158	158	158
q3	1462	1206	1264	1206
q4	1116	924	942	924
q5	3190	3171	3163	3163
q6	246	130	131	130
q7	974	497	492	492
q8	2200	2226	2181	2181
q9	6656	6686	6626	6626
q10	3194	3262	3262	3262
q11	315	206	210	206
q12	374	215	214	214
q13	4542	3815	3780	3780
q14	245	220	219	219
q15	566	514	521	514
q16	452	386	405	386
q17	998	582	572	572
q18	7641	7150	6922	6922
q19	1501	1376	1468	1376
q20	587	326	335	326
q21	3154	2676	2760	2676
q22	358	291	293	291
Total cold run time: 44868 ms
Total hot run time: 40104 ms

run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1	4424	4367	4378	4367
q2	271	162	173	162
q3	3531	3524	3536	3524
q4	2383	2375	2382	2375
q5	5727	5724	5738	5724
q6	240	121	123	121
q7	2362	1863	1854	1854
q8	3512	3493	3513	3493
q9	9075	9012	9022	9012
q10	3903	3994	3985	3985
q11	503	389	374	374
q12	764	599	593	593
q13	4303	3581	3572	3572
q14	279	270	266	266
q15	574	521	507	507
q16	515	448	461	448
q17	1861	1866	1837	1837
q18	8688	8316	8335	8316
q19	1734	1777	1750	1750
q20	2253	1957	1940	1940
q21	6577	6156	6153	6153
q22	500	412	408	408
Total cold run time: 63979 ms
Total hot run time: 60781 ms

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 43.95 seconds
stream load tsv: 584 seconds loaded 74807831229 Bytes, about 122 MB/s
stream load json: 19 seconds loaded 2358488459 Bytes, about 118 MB/s
stream load orc: 66 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17194922485 Bytes

Copy link
Contributor

@zzzxl1993 zzzxl1993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@eldenmoon eldenmoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Dec 7, 2023
Copy link
Contributor

github-actions bot commented Dec 7, 2023

PR approved by at least one committer and no changes requested.

Copy link
Contributor

github-actions bot commented Dec 7, 2023

PR approved by anyone and no changes requested.

@eldenmoon eldenmoon merged commit 1dabd0a into apache:master Dec 7, 2023
@xiaokang xiaokang mentioned this pull request Dec 11, 2023
bobhan1 pushed a commit to bobhan1/doris that referenced this pull request Dec 12, 2023
XuJianxu pushed a commit to XuJianxu/doris that referenced this pull request Dec 14, 2023
eldenmoon pushed a commit to eldenmoon/incubator-doris that referenced this pull request Dec 18, 2023
eldenmoon added a commit that referenced this pull request Dec 18, 2023
* change version to 2.0.3-rc05-var06

* [hotfix](jdbc catalog) fix jdbcmysqlclient npe (#28022)

* [Fix](schema change) disable convert light schema change (#28205)

* [Fix](inverted index) fix compound directory flush buffer error (#28191)

* [Fix](inverted index) fix need read data optimize problem (#28104)

---------

Co-authored-by: zy-kkk <zhongyk10@gmail.com>
Co-authored-by: Luwei <814383175@qq.com>
Co-authored-by: airborne12 <airborne08@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.0.3-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants