Skip to content

Optimize time and value in filter by TsFile statistics.#172

Merged
JackieTien97 merged 9 commits intoapache:developfrom
Sh-Zh-7:in_filter
Jul 18, 2024
Merged

Optimize time and value in filter by TsFile statistics.#172
JackieTien97 merged 9 commits intoapache:developfrom
Sh-Zh-7:in_filter

Conversation

@Sh-Zh-7
Copy link
Contributor

@Sh-Zh-7 Sh-Zh-7 commented Jul 9, 2024

As title.

Copy link
Contributor

@JackieTien97 JackieTien97 left a comment

Choose a reason for hiding this comment

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

Add UT For all you changed filters.

if (valuesMin == valuesMax) {
for (T val : candidates) {
if (valuesMin != val) {
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

wrong?

Any values in set equals to valuesMin, should return true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


@Override
protected boolean canSkip(Statistics<? extends Serializable> statistics) {
throw new NotImplementedException();
Copy link
Contributor

Choose a reason for hiding this comment

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

return false? why throw exception here?

Copy link
Contributor Author

@Sh-Zh-7 Sh-Zh-7 Jul 11, 2024

Choose a reason for hiding this comment

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

Would IoTDB push down NOT IN operator for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Anyway, return false won't be wrong. Fixed.


@Override
protected boolean allSatisfy(Statistics<? extends Serializable> statistics) {
throw new NotImplementedException();
Copy link
Contributor

Choose a reason for hiding this comment

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

return false? why throw exception here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ditto.

@Sh-Zh-7
Copy link
Contributor Author

Sh-Zh-7 commented Jul 11, 2024

PTAL~

T valuesMin = (T) statistics.get().getMinValue();
T valuesMax = (T) statistics.get().getMaxValue();
// All values are same
if (valuesMin == valuesMax) {
Copy link
Contributor

Choose a reason for hiding this comment

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

valuesMin.compareTo(valuesMax) == 0?

@JackieTien97 JackieTien97 merged commit 676117f into apache:develop Jul 18, 2024
@Sh-Zh-7 Sh-Zh-7 deleted the in_filter branch July 18, 2024 10:12
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.

2 participants