Skip to content

Commit

Permalink
[DYOD] UCC Discovery Plugin (#2485)
Browse files Browse the repository at this point in the history
The Unique Column Combination Discovery Plugin reads the LQP cache, determines candidate columns that can be used by optimization rules, and validates whether these candidate columns are unique.
  • Loading branch information
LukasBudach committed Nov 10, 2022
1 parent 8ed2f8e commit b1b143d
Show file tree
Hide file tree
Showing 11 changed files with 810 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -5,7 +5,7 @@ build/*
build-*/*
*.make
Makefile*
coverage
coverage*
.vscode
benchmark.json
*.sublime-*
Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -159,6 +159,7 @@ Contact: firstname.lastname@hpi.de
## Contributors
- Yannick Bäumer
- Lawrence Benson
- Lukas Budach
- Timo Djürken
- Alexander Dubrawski
- Fabian Dumke
Expand All @@ -185,6 +186,7 @@ Contact: firstname.lastname@hpi.de
- Marvin Keller
- Mirko Krause
- Eva Krebs
- Henok Lachmann
- Sven Lehmann
- Till Lehmann
- Tom Lichtenstein
Expand Down
6 changes: 6 additions & 0 deletions resources/test_data/tbl/uniqueness_test_A.tbl
@@ -0,0 +1,6 @@
A_a|b|c|
int|int|string|
4|10|this
1|3|is
13|2|unique
6|10|column
6 changes: 6 additions & 0 deletions resources/test_data/tbl/uniqueness_test_B.tbl
@@ -0,0 +1,6 @@
B_a|d
int|string|
4|not
5|unique
10|unique
2|column
2 changes: 1 addition & 1 deletion src/lib/storage/pos_lists/entire_chunk_pos_list.hpp
Expand Up @@ -21,7 +21,7 @@ class EntireChunkPosList : public AbstractPosList {

// Implemented in hpp for performance reasons (to allow inlining)
RowID operator[](const size_t index) const final {
return RowID{_common_chunk_id, static_cast<ChunkOffset>(index)};
return RowID{_common_chunk_id, ChunkOffset{static_cast<ChunkOffset::base_type>(index)}};
}

bool empty() const final;
Expand Down
1 change: 1 addition & 0 deletions src/plugins/CMakeLists.txt
Expand Up @@ -35,6 +35,7 @@ add_plugin(NAME hyriseMvccDeletePlugin SRCS mvcc_delete_plugin.cpp mvcc_delete_p
add_plugin(NAME hyriseSecondTestPlugin SRCS second_test_plugin.cpp second_test_plugin.hpp DEPS sqlparser)
add_plugin(NAME hyriseTestPlugin SRCS test_plugin.cpp test_plugin.hpp DEPS sqlparser)
add_plugin(NAME hyriseTestNonInstantiablePlugin SRCS non_instantiable_plugin.cpp)
add_plugin(NAME hyriseUccDiscoveryPlugin SRCS ucc_discovery_plugin.cpp ucc_discovery_plugin.hpp DEPS sqlparser magic_enum compact_vector)

# We define TEST_PLUGIN_DIR to always load plugins from the correct directory for testing purposes
add_definitions(-DTEST_PLUGIN_DIR="${CMAKE_BINARY_DIR}/lib/")

0 comments on commit b1b143d

Please sign in to comment.