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

feat(docs): add docs for the relational table layer #3313

Merged
merged 43 commits into from
Jun 22, 2022
Merged

Conversation

wcy-fdu
Copy link
Contributor

@wcy-fdu wcy-fdu commented Jun 18, 2022

What's changed and what's your intention?

Just click docs change to review this PR.
Todo

  • Draw some figures

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

close #3299

@wcy-fdu wcy-fdu marked this pull request as draft June 18, 2022 06:01
@wcy-fdu wcy-fdu marked this pull request as ready for review June 18, 2022 06:18
@codecov
Copy link

codecov bot commented Jun 18, 2022

Codecov Report

Merging #3313 (6020368) into main (7c44a15) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3313   +/-   ##
=======================================
  Coverage   73.71%   73.72%           
=======================================
  Files         760      760           
  Lines      104321   104321           
=======================================
+ Hits        76903    76907    +4     
+ Misses      27418    27414    -4     
Flag Coverage Δ
rust 73.72% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/storage/src/hummock/local_version_manager.rs 84.53% <0.00%> (+0.15%) ⬆️
src/frontend/src/expr/utils.rs 99.24% <0.00%> (+0.25%) ⬆️
src/meta/src/barrier/mod.rs 69.59% <0.00%> (+0.29%) ⬆️
src/meta/src/hummock/mock_hummock_meta_client.rs 41.50% <0.00%> (+0.94%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@wcy-fdu wcy-fdu requested review from hzxa21 and Sunt-ing June 20, 2022 02:40
@wcy-fdu wcy-fdu requested a review from skyzh June 20, 2022 02:44
@risingwavelabs risingwavelabs deleted a comment from Sunt-ing Jun 21, 2022
Copy link
Contributor

@skyzh skyzh left a comment

Choose a reason for hiding this comment

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

Generally LGTM

docs/state-store-overview.md Outdated Show resolved Hide resolved
docs/storing-state-using-relational-table.md Outdated Show resolved Hide resolved
docs/storing-state-using-relational-table.md Show resolved Hide resolved
docs/storing-state-using-relational-table.md Outdated Show resolved Hide resolved
@skyzh
Copy link
Contributor

skyzh commented Jun 21, 2022

I think we can also explain the table's properties in this section (storage pk, stream pk, distribution key, order key, etc.), and also the vnode part? I believe relational table will have a big upcoming refactor in the near future. Do you want to include the vnode-related things in this docs?

@wcy-fdu
Copy link
Contributor Author

wcy-fdu commented Jun 21, 2022

Is vnode part better put in consistence hash doc? @xx01cyx will write a doc to summarize consistence hash soon.

@xx01cyx
Copy link
Contributor

xx01cyx commented Jun 21, 2022

Is vnode part better put in consistence hash doc? @xx01cyx will write a doc to summarize consistence hash soon.

If this doc is to give the detailed encoding, just like

| mv     | table_id \| vnode \| sort key \| pk \| col_id| materialized value |

then maybe there should be a brief description on vnode in this doc. I'm sure we will have a more detailed description on how vnode works in our system in the doc for consistent hash.

@wcy-fdu
Copy link
Contributor Author

wcy-fdu commented Jun 22, 2022

After vnode is encoded in keyspace, will add vonde in this form and add link to corresponding doc.
image

Copy link
Contributor

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

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

LGTM

docs/storing-state-using-relational-table.md Outdated Show resolved Hide resolved
@wcy-fdu wcy-fdu merged commit 4e66ca3 into main Jun 22, 2022
@wcy-fdu wcy-fdu deleted the wcy_update_docs branch June 22, 2022 05:16
cnissnzg added a commit that referenced this pull request Jun 22, 2022
commit aac69d2
Author: William Wen <44139337+wenym1@users.noreply.github.com>
Date:   Wed Jun 22 17:23:31 2022 +0800

    fix(storage): fix ignoring delete record when getting from sst (#3405)

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit ebfbd0c
Author: Alex Chi <iskyzh@gmail.com>
Date:   Wed Jun 22 17:01:53 2022 +0800

    chore(storage): move read lock acquire out of lock (#3400)

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit c5b4fe2
Author: lmatz <lmatz823@gmail.com>
Date:   Wed Jun 22 01:49:23 2022 -0700

    fix(expr): trim (#3402)

commit 28cf5ff
Author: Wallace <bupt2013211450@gmail.com>
Date:   Wed Jun 22 16:29:03 2022 +0800

    feat(compaction): compress data with dynamic level (#3388)

    * do not compress data in high level

    Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>

commit 7602285
Author: Lee Zong Yu <65748142+marvenlee2486@users.noreply.github.com>
Date:   Wed Jun 22 15:58:31 2022 +0800

    fix(grafana): Edit update.sh (#3399)

    * Edit update.sh

    * Edit format error

    * Add payload to gitignore

    * Revert risedev.yml modification

    * Fix wrong gitignore

    * Fix wrong gitignore

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 4e66ca3
Author: congyi <58715567+wcy-fdu@users.noreply.github.com>
Date:   Wed Jun 22 13:16:48 2022 +0800

    feat(docs): add docs for the relational table layer (#3313)

    * add doc for relational layer

commit 7c44a15
Author: Bugen Zhao <i@bugenzhao.com>
Date:   Wed Jun 22 12:51:59 2022 +0800

    fix: build failure of cell based table with release profile (#3395)

commit 93c62a3
Author: Li0k <yuli@singularity-data.com>
Date:   Wed Jun 22 11:50:18 2022 +0800

    chore(frontend): fix handle_with_properties ctx of explain (#3394)

commit 233ee5d
Author: Li0k <yuli@singularity-data.com>
Date:   Wed Jun 22 11:32:05 2022 +0800

    feat(frontend): catalog add properties for ttl (#3382)

    * feat(frontend): catlog add properties for materialized_view and materialized_source to support ttl

    * fix(frontend): fix test_runner

    * chore(frontend): unify handle_with_properties logic for handler

    * chore(frontend): explain introduce handle_with_properties to replace WithProperties

    * chore(sqlparser): remove unused logic of WithProperties

commit 78861e3
Author: Bugen Zhao <i@bugenzhao.com>
Date:   Wed Jun 22 02:19:37 2022 +0800

    feat(storage): store all column descs in cell based table (#3344)

    * add pk indices

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * extract mapping

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * distinguish parital table

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * refactor proto

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * fix clippy

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * fix output schema

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * store column ids in serializer

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * refine docs

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * fix plan test

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * refine docs

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * write check

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * Apply suggestions from code review

    Co-authored-by: Yuanxin Cao <60498509+xx01cyx@users.noreply.github.com>

    * trigger ci

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    Co-authored-by: Yuanxin Cao <60498509+xx01cyx@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit bc74ff4
Author: Alex Chi <iskyzh@gmail.com>
Date:   Tue Jun 21 22:59:22 2022 +0800

    feat(streaming): use tokio channels and better coop scheduling (#3374)

    * feat(streaming): use tokio channels and better coop scheduling

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * more info when deploy

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * remove manual coop scheduling

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * fix

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

commit 4b33d95
Author: Huangjw <1223644280@qq.com>
Date:   Tue Jun 21 18:32:36 2022 +0800

    chore(ci): update ci image vesion and remove changelog.json (#3384)

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit ed1de15
Author: Alex Chi <iskyzh@gmail.com>
Date:   Tue Jun 21 18:19:02 2022 +0800

    feat(risedev): fix meta args and support healthcheck in docker (#3378)

    * feat(risedev): support healthcheck in docker

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * fix

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * fix

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * fix

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * pin version

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 5a7e115
Author: Alex Chi <iskyzh@gmail.com>
Date:   Tue Jun 21 18:05:56 2022 +0800

    chore(ci): manual CLA check (#3386)

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

commit 2688491
Author: ZENOTME <43447882+ZENOTME@users.noreply.github.com>
Date:   Tue Jun 21 18:03:02 2022 +0800

    feat(pgwire): support row limit in extended query mode (#3354)

    * * add row_end flag in PgResponse
    * add values interface in PgResponse

    * * add result_cache
    * add execute interface

    * fix complile error of row_end

    * * split process_query_msg into process_query_msg_simple and process_query_response

    execute flow:

    simple mode:                        extended query mode:
    process_query_msg_simple              portal.execute()
        |   (response)             (response)  |
    process_query_response ---------------------
        |
    process_query_with_results

    * fix clippy

    * add process at Execute

    * add PortalSuspended msg

    * add row_limit process at process_query_with_results

    * fix small problem and add some comment

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit dc8631e
Author: Tao Wu <wutao@singularity-data.com>
Date:   Tue Jun 21 17:35:36 2022 +0800

    test: sqlsmith supports generating unary func (#3370)

commit cb0d7c1
Author: Bowen <36908971+BowenXiao1999@users.noreply.github.com>
Date:   Tue Jun 21 17:16:10 2022 +0800

    refactor: deparallel hash agg apply batch + remove Arc Mutex (#3377)

    * refactor: deparallel hash agg apply batch

    * remove Arc Mutex

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot pushed a commit that referenced this pull request Jun 27, 2022
…3363)

* implement cascade && restrict by add relation map

* fmt

* implement cascade && restrict by add relation map

* fmt

* correct pre unit test error

* correct misc test error

* fix

* update proto && fix

* change grantor to granted by

* implement recursive privilege relations && fix

* Squashed commit of the following:

commit aac69d2
Author: William Wen <44139337+wenym1@users.noreply.github.com>
Date:   Wed Jun 22 17:23:31 2022 +0800

    fix(storage): fix ignoring delete record when getting from sst (#3405)

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit ebfbd0c
Author: Alex Chi <iskyzh@gmail.com>
Date:   Wed Jun 22 17:01:53 2022 +0800

    chore(storage): move read lock acquire out of lock (#3400)

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit c5b4fe2
Author: lmatz <lmatz823@gmail.com>
Date:   Wed Jun 22 01:49:23 2022 -0700

    fix(expr): trim (#3402)

commit 28cf5ff
Author: Wallace <bupt2013211450@gmail.com>
Date:   Wed Jun 22 16:29:03 2022 +0800

    feat(compaction): compress data with dynamic level (#3388)

    * do not compress data in high level

    Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>

commit 7602285
Author: Lee Zong Yu <65748142+marvenlee2486@users.noreply.github.com>
Date:   Wed Jun 22 15:58:31 2022 +0800

    fix(grafana): Edit update.sh (#3399)

    * Edit update.sh

    * Edit format error

    * Add payload to gitignore

    * Revert risedev.yml modification

    * Fix wrong gitignore

    * Fix wrong gitignore

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 4e66ca3
Author: congyi <58715567+wcy-fdu@users.noreply.github.com>
Date:   Wed Jun 22 13:16:48 2022 +0800

    feat(docs): add docs for the relational table layer (#3313)

    * add doc for relational layer

commit 7c44a15
Author: Bugen Zhao <i@bugenzhao.com>
Date:   Wed Jun 22 12:51:59 2022 +0800

    fix: build failure of cell based table with release profile (#3395)

commit 93c62a3
Author: Li0k <yuli@singularity-data.com>
Date:   Wed Jun 22 11:50:18 2022 +0800

    chore(frontend): fix handle_with_properties ctx of explain (#3394)

commit 233ee5d
Author: Li0k <yuli@singularity-data.com>
Date:   Wed Jun 22 11:32:05 2022 +0800

    feat(frontend): catalog add properties for ttl (#3382)

    * feat(frontend): catlog add properties for materialized_view and materialized_source to support ttl

    * fix(frontend): fix test_runner

    * chore(frontend): unify handle_with_properties logic for handler

    * chore(frontend): explain introduce handle_with_properties to replace WithProperties

    * chore(sqlparser): remove unused logic of WithProperties

commit 78861e3
Author: Bugen Zhao <i@bugenzhao.com>
Date:   Wed Jun 22 02:19:37 2022 +0800

    feat(storage): store all column descs in cell based table (#3344)

    * add pk indices

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * extract mapping

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * distinguish parital table

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * refactor proto

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * fix clippy

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * fix output schema

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * store column ids in serializer

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * refine docs

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * fix plan test

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * refine docs

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * write check

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    * Apply suggestions from code review

    Co-authored-by: Yuanxin Cao <60498509+xx01cyx@users.noreply.github.com>

    * trigger ci

    Signed-off-by: Bugen Zhao <i@bugenzhao.com>

    Co-authored-by: Yuanxin Cao <60498509+xx01cyx@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit bc74ff4
Author: Alex Chi <iskyzh@gmail.com>
Date:   Tue Jun 21 22:59:22 2022 +0800

    feat(streaming): use tokio channels and better coop scheduling (#3374)

    * feat(streaming): use tokio channels and better coop scheduling

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * more info when deploy

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * remove manual coop scheduling

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * fix

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

commit 4b33d95
Author: Huangjw <1223644280@qq.com>
Date:   Tue Jun 21 18:32:36 2022 +0800

    chore(ci): update ci image vesion and remove changelog.json (#3384)

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit ed1de15
Author: Alex Chi <iskyzh@gmail.com>
Date:   Tue Jun 21 18:19:02 2022 +0800

    feat(risedev): fix meta args and support healthcheck in docker (#3378)

    * feat(risedev): support healthcheck in docker

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * fix

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * fix

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * fix

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    * pin version

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 5a7e115
Author: Alex Chi <iskyzh@gmail.com>
Date:   Tue Jun 21 18:05:56 2022 +0800

    chore(ci): manual CLA check (#3386)

    Signed-off-by: Alex Chi <iskyzh@gmail.com>

commit 2688491
Author: ZENOTME <43447882+ZENOTME@users.noreply.github.com>
Date:   Tue Jun 21 18:03:02 2022 +0800

    feat(pgwire): support row limit in extended query mode (#3354)

    * * add row_end flag in PgResponse
    * add values interface in PgResponse

    * * add result_cache
    * add execute interface

    * fix complile error of row_end

    * * split process_query_msg into process_query_msg_simple and process_query_response

    execute flow:

    simple mode:                        extended query mode:
    process_query_msg_simple              portal.execute()
        |   (response)             (response)  |
    process_query_response ---------------------
        |
    process_query_with_results

    * fix clippy

    * add process at Execute

    * add PortalSuspended msg

    * add row_limit process at process_query_with_results

    * fix small problem and add some comment

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit dc8631e
Author: Tao Wu <wutao@singularity-data.com>
Date:   Tue Jun 21 17:35:36 2022 +0800

    test: sqlsmith supports generating unary func (#3370)

commit cb0d7c1
Author: Bowen <36908971+BowenXiao1999@users.noreply.github.com>
Date:   Tue Jun 21 17:16:10 2022 +0800

    refactor: deparallel hash agg apply batch + remove Arc Mutex (#3377)

    * refactor: deparallel hash agg apply batch

    * remove Arc Mutex

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* add unit test

* fmt

* correct pre test

* some fix

Co-authored-by: August <pin@singularity-data.com>
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.

relational_table: update docs of relational table
7 participants