Add TreeDeviceIdColumnValueExtractor for TreeDeviceId to extract ID Column value #343
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:root.db
whose DeviceId is{root, db}
, no id column in such caseroot.db.d1
whose DeviceId is{root.db, d1}
, only one id column in segment 1root.db.a.d1
whose DeviceId is{root.db.a, d1}
, id column start from segment 0ThreeLevelDBExtractor
used for DeviceId whose db level is 3, like
root.a.db
There exist two cases for three-level-db tree-style DeviceId:root.a.db
whose DeviceId is{root.a, db}
, no id column in such caseroot.a.db.d1
whose DeviceId is{root.a.db, d1}
, id column start from segment 1FourOrHigherLevelDBExtractor
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 fromdb_level - 2
: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)root.a.b.db.d1
whose DeviceId is{root.a.b, db, d1}
, id column starting from 2root.a.b.db.c.d1
whose DeviceId is{root.a.b, db, c, d1}
, id column starting from 3