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

Add TreeDeviceIdColumnValueExtractor for TreeDeviceId to extract ID Column value #343

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

JackieTien97
Copy link
Contributor

For the reason that dbName in IoTDB should be at least two, so we add three implementation classes in this pr:

TwoLevelDBExtractor

used for DeviceId whose db level is 2, like root.db. There exist three cases for two-level-db tree-style DeviceId:

  1. database is also DeviceId, like root.db whose DeviceId is {root, db}, no id column in such case
  2. device has only one level excluding the db level, like root.db.d1 whose DeviceId is {root.db, d1}, only one id column in segment 1
  3. device has more than one level excluding the db level, like root.db.a.d1 whose DeviceId is {root.db.a, d1}, id column start from segment 0

ThreeLevelDBExtractor

used for DeviceId whose db level is 3, like root.a.db There exist two cases for three-level-db tree-style DeviceId:

  1. database is also DeviceId, like root.a.db whose DeviceId is {root.a, db}, no id column in such case
  2. device has more than zero level excluding the db level, like root.a.db.d1 whose DeviceId is {root.a.db, d1}, id column start from segment 1

FourOrHigherLevelDBExtractor

used for DeviceId whose db level is 4 or higher, like root.a.b.db There only exist one case for four-or-higher-level-db tree-style DeviceId, first segment will be the first three level of db, so id column index starting from db_level - 2:

  1. like root.a.b.db whose DeviceId is {root.a.b, db}, no id column in such case, also call say that id column starting from 2(not existing)
  2. like root.a.b.db.d1 whose DeviceId is {root.a.b, db, d1}, id column starting from 2
  3. like root.a.b.db.c.d1 whose DeviceId is {root.a.b, db, c, d1}, id column starting from 3

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.51%. Comparing base (a5b5fcf) to head (4346622).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #343      +/-   ##
===========================================
+ Coverage    64.48%   64.51%   +0.02%     
===========================================
  Files          535      538       +3     
  Lines        31764    31788      +24     
  Branches      4219     4225       +6     
===========================================
+ Hits         20482    20507      +25     
+ Misses       10785    10784       -1     
  Partials       497      497              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JackieTien97 JackieTien97 merged commit c128f9a into develop Dec 20, 2024
14 checks passed
@JackieTien97 JackieTien97 deleted the ty/TreeIdColumnValue branch December 20, 2024 09:18
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.

3 participants