Skip to content

[IOTDB-4356] De-duplication of PathPatternTree #7289

Merged
MarcosZyk merged 5 commits intoapache:masterfrom
Cpaulyz:IOTDB-4356
Sep 13, 2022
Merged

[IOTDB-4356] De-duplication of PathPatternTree #7289
MarcosZyk merged 5 commits intoapache:masterfrom
Cpaulyz:IOTDB-4356

Conversation

@Cpaulyz
Copy link
Contributor

@Cpaulyz Cpaulyz commented Sep 12, 2022

Description

Fix the bug related to duplicate paths in PathPatternTree

  1. When appendPathPattern, PathPatternTree should judge the inclusion relationship between new path and existed paths. The included path should not be stored. The added Pattern may not be a fullPath, so PathPatternTree used matchFullPath() incorrectly. This pr implements an algorithm to judge the partialPath inclusion relationship to replace matchFullPath().
  2. When getAllDevicePatterns, PathPatternTree should de-duplicate the result set.

Copy link
Member

@liuminghui233 liuminghui233 left a comment

Choose a reason for hiding this comment

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

Excellent algorithm!

@MarcosZyk MarcosZyk merged commit 641e2b9 into apache:master Sep 13, 2022
@Cpaulyz Cpaulyz deleted the IOTDB-4356 branch September 13, 2022 11:20
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