-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
267 additions
and
75 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
benchmark/queries/ldbc-sf100/filter/zonemap-node-null.benchmark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-NAME zonemap-node-null | ||
-QUERY MATCH (c:Comment) WHERE c.length IS NULL RETURN *; | ||
---- 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#include "column_predicate.h" | ||
#include "common/enums/expression_type.h" | ||
|
||
namespace kuzu { | ||
namespace storage { | ||
|
||
class ColumnNullPredicate : public ColumnPredicate { | ||
public: | ||
explicit ColumnNullPredicate(std::string columnName, common::ExpressionType type) | ||
: ColumnPredicate{std::move(columnName), type} { | ||
KU_ASSERT( | ||
type == common::ExpressionType::IS_NULL || type == common::ExpressionType::IS_NOT_NULL); | ||
} | ||
|
||
common::ZoneMapCheckResult checkZoneMap(const MergedColumnChunkStats& stats) const override; | ||
|
||
std::unique_ptr<ColumnPredicate> copy() const override { | ||
return std::make_unique<ColumnNullPredicate>(columnName, expressionType); | ||
} | ||
}; | ||
|
||
} // namespace storage | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
add_library(kuzu_storage_predicate | ||
OBJECT | ||
null_predicate.cpp | ||
column_predicate.cpp | ||
constant_predicate.cpp) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "storage/predicate/null_predicate.h" | ||
|
||
#include "storage/store/column_chunk_stats.h" | ||
|
||
namespace kuzu::storage { | ||
common::ZoneMapCheckResult ColumnNullPredicate::checkZoneMap( | ||
const MergedColumnChunkStats& mergedStats) const { | ||
const bool statToCheck = (expressionType == common::ExpressionType::IS_NULL) ? | ||
mergedStats.guaranteedNoNulls : | ||
mergedStats.guaranteedAllNulls; | ||
return statToCheck ? common::ZoneMapCheckResult::SKIP_SCAN : | ||
common::ZoneMapCheckResult::ALWAYS_SCAN; | ||
} | ||
|
||
} // namespace kuzu::storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.