Skip to content

Commit

Permalink
Introduce pmr_string (hyrise#1506)
Browse files Browse the repository at this point in the history
* bla

* blub

* pmr and stuff

* blub

* bla

* oups

* blub

* ja ja ja

* oups

* fix asan

* temp buffers are difficult

* format

* d'oh

* comment
  • Loading branch information
mrks authored Feb 27, 2019
1 parent ca2d139 commit e24c7a1
Show file tree
Hide file tree
Showing 122 changed files with 758 additions and 718 deletions.
12 changes: 6 additions & 6 deletions src/benchmark/operators/table_scan_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ BENCHMARK_F(MicroBenchmarkBasicFixture, BM_TableScan_Like)(benchmark::State& sta
const auto lineitem_wrapper = std::make_shared<TableWrapper>(lineitem_table);
lineitem_wrapper->execute();

const auto column_names_and_patterns = std::vector<std::pair<std::string, std::string>>({
{"l_comment", "%final%"},
{"l_comment", "%final%requests%"},
{"l_shipinstruct", "quickly%"},
{"l_comment", "%foxes"},
{"l_comment", "%quick_y__above%even%"},
const auto column_names_and_patterns = std::vector<std::pair<std::string, pmr_string>>({
{"l_comment", pmr_string{"%final%"}},
{"l_comment", pmr_string{"%final%requests%"}},
{"l_shipinstruct", pmr_string{"quickly%"}},
{"l_comment", pmr_string{"%foxes"}},
{"l_comment", pmr_string{"%quick_y__above%even%"}},
});

for (auto _ : state) {
Expand Down
128 changes: 64 additions & 64 deletions src/benchmarklib/tpcc/tpcc_table_generator.cpp

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions src/benchmarklib/tpch/tpch_table_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,28 @@ namespace {
using namespace opossum; // NOLINT

// clang-format off
const auto customer_column_types = boost::hana::tuple <int32_t, std::string, std::string, int32_t, std::string, float, std::string, std::string>(); // NOLINT
const auto customer_column_types = boost::hana::tuple <int32_t, pmr_string, pmr_string, int32_t, pmr_string, float, pmr_string, pmr_string>(); // NOLINT
const auto customer_column_names = boost::hana::make_tuple("c_custkey", "c_name", "c_address", "c_nationkey", "c_phone", "c_acctbal", "c_mktsegment", "c_comment"); // NOLINT

const auto order_column_types = boost::hana::tuple <int32_t, int32_t, std::string, float, std::string, std::string, std::string, int32_t, std::string>(); // NOLINT
const auto order_column_types = boost::hana::tuple <int32_t, int32_t, pmr_string, float, pmr_string, pmr_string, pmr_string, int32_t, pmr_string>(); // NOLINT
const auto order_column_names = boost::hana::make_tuple("o_orderkey", "o_custkey", "o_orderstatus", "o_totalprice", "o_orderdate", "o_orderpriority", "o_clerk", "o_shippriority", "o_comment"); // NOLINT

const auto lineitem_column_types = boost::hana::tuple <int32_t, int32_t, int32_t, int32_t, float, float, float, float, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string>(); // NOLINT
const auto lineitem_column_types = boost::hana::tuple <int32_t, int32_t, int32_t, int32_t, float, float, float, float, pmr_string, pmr_string, pmr_string, pmr_string, pmr_string, pmr_string, pmr_string, pmr_string>(); // NOLINT
const auto lineitem_column_names = boost::hana::make_tuple("l_orderkey", "l_partkey", "l_suppkey", "l_linenumber", "l_quantity", "l_extendedprice", "l_discount", "l_tax", "l_returnflag", "l_linestatus", "l_shipdate", "l_commitdate", "l_receiptdate", "l_shipinstruct", "l_shipmode", "l_comment"); // NOLINT

const auto part_column_types = boost::hana::tuple <int32_t, std::string, std::string, std::string, std::string, int32_t, std::string, float, std::string>(); // NOLINT
const auto part_column_types = boost::hana::tuple <int32_t, pmr_string, pmr_string, pmr_string, pmr_string, int32_t, pmr_string, float, pmr_string>(); // NOLINT
const auto part_column_names = boost::hana::make_tuple("p_partkey", "p_name", "p_mfgr", "p_brand", "p_type", "p_size", "p_container", "p_retailsize", "p_comment"); // NOLINT

const auto partsupp_column_types = boost::hana::tuple< int32_t, int32_t, int32_t, float, std::string>(); // NOLINT
const auto partsupp_column_types = boost::hana::tuple< int32_t, int32_t, int32_t, float, pmr_string>(); // NOLINT
const auto partsupp_column_names = boost::hana::make_tuple("ps_partkey", "ps_suppkey", "ps_availqty", "ps_supplycost", "ps_comment"); // NOLINT

const auto supplier_column_types = boost::hana::tuple< int32_t, std::string, std::string, int32_t, std::string, float, std::string>(); // NOLINT
const auto supplier_column_types = boost::hana::tuple< int32_t, pmr_string, pmr_string, int32_t, pmr_string, float, pmr_string>(); // NOLINT
const auto supplier_column_names = boost::hana::make_tuple("s_suppkey", "s_name", "s_address", "s_nationkey", "s_phone", "s_acctbal", "s_comment"); // NOLINT

const auto nation_column_types = boost::hana::tuple< int32_t, std::string, int32_t, std::string>(); // NOLINT
const auto nation_column_types = boost::hana::tuple< int32_t, pmr_string, int32_t, pmr_string>(); // NOLINT
const auto nation_column_names = boost::hana::make_tuple("n_nationkey", "n_name", "n_regionkey", "n_comment"); // NOLINT

const auto region_column_types = boost::hana::tuple< int32_t, std::string, std::string>(); // NOLINT
const auto region_column_types = boost::hana::tuple< int32_t, pmr_string, pmr_string>(); // NOLINT
const auto region_column_names = boost::hana::make_tuple("r_regionkey", "r_name", "r_comment"); // NOLINT

// clang-format on
Expand Down Expand Up @@ -264,7 +264,7 @@ std::unordered_map<std::string, BenchmarkTableInfo> TpchTableGenerator::generate
for (size_t order_idx = 0; order_idx < order_count; ++order_idx) {
const auto order = call_dbgen_mk<order_t>(order_idx + 1, mk_order, TpchTable::Orders, 0l, _scale_factor);

order_builder.append_row(order.okey, order.custkey, std::string(1, order.orderstatus),
order_builder.append_row(order.okey, order.custkey, pmr_string(1, order.orderstatus),
convert_money(order.totalprice), order.odate, order.opriority, order.clerk,
order.spriority, order.comment);

Expand All @@ -273,8 +273,8 @@ std::unordered_map<std::string, BenchmarkTableInfo> TpchTableGenerator::generate

lineitem_builder.append_row(lineitem.okey, lineitem.partkey, lineitem.suppkey, lineitem.lcnt, lineitem.quantity,
convert_money(lineitem.eprice), convert_money(lineitem.discount),
convert_money(lineitem.tax), std::string(1, lineitem.rflag[0]),
std::string(1, lineitem.lstatus[0]), lineitem.sdate, lineitem.cdate, lineitem.rdate,
convert_money(lineitem.tax), pmr_string(1, lineitem.rflag[0]),
pmr_string(1, lineitem.lstatus[0]), lineitem.sdate, lineitem.cdate, lineitem.rdate,
lineitem.shipinstruct, lineitem.shipmode, lineitem.comment);
}
}
Expand Down
50 changes: 25 additions & 25 deletions src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ set(
all_type_variant.cpp
all_type_variant.hpp
cache/abstract_cache_impl.hpp
cache/cache.hpp
cache/gdfs_cache.hpp
cache/gds_cache.hpp
cache/lru_cache.hpp
cache/lru_k_cache.hpp
cache/random_cache.hpp
cache/cache.hpp
concurrency/commit_context.cpp
concurrency/commit_context.hpp
concurrency/transaction_context.cpp
Expand Down Expand Up @@ -104,6 +104,8 @@ set(
logical_query_plan/alias_node.hpp
logical_query_plan/base_non_query_node.cpp
logical_query_plan/base_non_query_node.hpp
logical_query_plan/create_prepared_plan_node.cpp
logical_query_plan/create_prepared_plan_node.hpp
logical_query_plan/create_table_node.cpp
logical_query_plan/create_table_node.hpp
logical_query_plan/create_view_node.cpp
Expand Down Expand Up @@ -135,8 +137,6 @@ set(
logical_query_plan/mock_node.hpp
logical_query_plan/predicate_node.cpp
logical_query_plan/predicate_node.hpp
logical_query_plan/create_prepared_plan_node.cpp
logical_query_plan/create_prepared_plan_node.hpp
logical_query_plan/projection_node.cpp
logical_query_plan/projection_node.hpp
logical_query_plan/show_columns_node.cpp
Expand All @@ -153,6 +153,9 @@ set(
logical_query_plan/update_node.hpp
logical_query_plan/validate_node.cpp
logical_query_plan/validate_node.hpp
memory/boost_default_memory_resource.cpp
memory/numa_memory_resource.cpp
memory/numa_memory_resource.hpp
null_value.hpp
operators/abstract_join_operator.cpp
operators/abstract_join_operator.hpp
Expand Down Expand Up @@ -187,8 +190,8 @@ set(
operators/insert.hpp
operators/join_hash.cpp
operators/join_hash.hpp
operators/join_hash/join_hash_traits.hpp
operators/join_hash/join_hash_steps.hpp
operators/join_hash/join_hash_traits.hpp
operators/join_index.cpp
operators/join_index.hpp
operators/join_mpsm.cpp
Expand All @@ -203,6 +206,8 @@ set(
operators/join_sort_merge/radix_cluster_sort.hpp
operators/limit.cpp
operators/limit.hpp
operators/maintenance/create_prepared_plan.cpp
operators/maintenance/create_prepared_plan.hpp
operators/maintenance/create_table.cpp
operators/maintenance/create_table.hpp
operators/maintenance/create_view.cpp
Expand All @@ -211,8 +216,6 @@ set(
operators/maintenance/drop_table.hpp
operators/maintenance/drop_view.cpp
operators/maintenance/drop_view.hpp
operators/maintenance/create_prepared_plan.cpp
operators/maintenance/create_prepared_plan.hpp
operators/maintenance/show_columns.cpp
operators/maintenance/show_columns.hpp
operators/maintenance/show_tables.cpp
Expand Down Expand Up @@ -283,14 +286,14 @@ set(
optimizer/strategy/column_pruning_rule.hpp
optimizer/strategy/exists_reformulation_rule.cpp
optimizer/strategy/exists_reformulation_rule.hpp
optimizer/strategy/expression_reduction_rule.cpp
optimizer/strategy/expression_reduction_rule.hpp
optimizer/strategy/index_scan_rule.cpp
optimizer/strategy/index_scan_rule.hpp
optimizer/strategy/insert_limit_in_exists.cpp
optimizer/strategy/insert_limit_in_exists.hpp
optimizer/strategy/insert_limit_in_exists_rule.cpp
optimizer/strategy/insert_limit_in_exists_rule.hpp
optimizer/strategy/join_ordering_rule.cpp
optimizer/strategy/join_ordering_rule.hpp
optimizer/strategy/expression_reduction_rule.cpp
optimizer/strategy/expression_reduction_rule.hpp
optimizer/strategy/predicate_placement_rule.cpp
optimizer/strategy/predicate_placement_rule.hpp
optimizer/strategy/predicate_reordering_rule.cpp
Expand Down Expand Up @@ -334,7 +337,6 @@ set(
sql/create_sql_parser_error_message.hpp
sql/parameter_id_allocator.cpp
sql/parameter_id_allocator.hpp
sql/sql_plan_cache.hpp
sql/sql_identifier.cpp
sql/sql_identifier.hpp
sql/sql_identifier_resolver.cpp
Expand All @@ -347,13 +349,16 @@ set(
sql/sql_pipeline_builder.hpp
sql/sql_pipeline_statement.cpp
sql/sql_pipeline_statement.hpp
sql/sql_plan_cache.hpp
sql/sql_translator.cpp
sql/sql_translator.hpp
statistics/base_column_statistics.cpp
statistics/base_column_statistics.hpp
statistics/chunk_statistics/abstract_filter.hpp
statistics/chunk_statistics/chunk_statistics.cpp
statistics/chunk_statistics/chunk_statistics.hpp
statistics/chunk_statistics/counting_quotient_filter.cpp
statistics/chunk_statistics/counting_quotient_filter.hpp
statistics/chunk_statistics/histograms/abstract_histogram.cpp
statistics/chunk_statistics/histograms/abstract_histogram.hpp
statistics/chunk_statistics/histograms/equal_distinct_count_histogram.cpp
Expand All @@ -368,8 +373,6 @@ set(
statistics/chunk_statistics/range_filter.hpp
statistics/chunk_statistics/segment_statistics.cpp
statistics/chunk_statistics/segment_statistics.hpp
statistics/chunk_statistics/counting_quotient_filter.hpp
statistics/chunk_statistics/counting_quotient_filter.cpp
statistics/column_statistics.cpp
statistics/column_statistics.cpp
statistics/generate_column_statistics.cpp
Expand All @@ -381,12 +384,12 @@ set(
statistics/table_statistics.cpp
statistics/table_statistics.hpp
storage/abstract_segment_visitor.hpp
storage/base_segment_accessor.hpp
storage/base_dictionary_segment.hpp
storage/base_encoded_segment.cpp
storage/base_encoded_segment.hpp
storage/base_segment.cpp
storage/base_segment.hpp
storage/base_segment_accessor.hpp
storage/base_segment_encoder.hpp
storage/base_value_segment.hpp
storage/chunk.cpp
Expand Down Expand Up @@ -437,14 +440,14 @@ set(
storage/index/group_key/variable_length_key_store.hpp
storage/index/index_info.hpp
storage/index/segment_index_type.hpp
storage/prepared_plan.cpp
storage/prepared_plan.hpp
storage/lqp_view.cpp
storage/lqp_view.hpp
storage/materialize.hpp
storage/mvcc_data.cpp
storage/mvcc_data.hpp
storage/pos_list.hpp
storage/prepared_plan.cpp
storage/prepared_plan.hpp
storage/reference_segment.cpp
storage/reference_segment.hpp
storage/reference_segment/reference_segment_iterable.hpp
Expand Down Expand Up @@ -524,25 +527,22 @@ set(
utils/abstract_plugin.hpp
utils/aligned_size.hpp
utils/assert.hpp
utils/boost_default_memory_resource.cpp
utils/check_table_equal.cpp
utils/check_table_equal.hpp
utils/ignore_unused_variable.hpp
utils/copyable_atomic.hpp
utils/enum_constant.hpp
utils/filesystem.hpp
utils/format_bytes.cpp
utils/format_bytes.hpp
utils/format_duration.cpp
utils/format_duration.hpp
utils/ignore_unused_variable.hpp
utils/invalid_input_exception.hpp
utils/load_table.cpp
utils/load_table.hpp
utils/make_bimap.hpp
utils/null_streambuf.cpp
utils/null_streambuf.hpp
utils/make_bimap.hpp
utils/numa_memory_resource.cpp
utils/numa_memory_resource.hpp
utils/pausable_loop_thread.cpp
utils/pausable_loop_thread.hpp
utils/performance_warning.cpp
Expand All @@ -552,19 +552,19 @@ set(
utils/print_directed_acyclic_graph.hpp
utils/scoped_locking_ptr.hpp
utils/singleton.hpp
utils/string_utils.cpp
utils/string_utils.hpp
utils/sqlite_wrapper.cpp
utils/sqlite_wrapper.hpp
utils/string_utils.cpp
utils/string_utils.hpp
utils/template_type.hpp
utils/timer.cpp
utils/timer.hpp
utils/tracing/probes.hpp
visualization/abstract_visualizer.hpp
visualization/lqp_visualizer.cpp
visualization/lqp_visualizer.hpp
visualization/join_graph_visualizer.cpp
visualization/join_graph_visualizer.hpp
visualization/lqp_visualizer.cpp
visualization/lqp_visualizer.hpp
visualization/pqp_visualizer.cpp
visualization/pqp_visualizer.hpp
visualization/viz_record_layout.cpp
Expand Down
10 changes: 5 additions & 5 deletions src/lib/all_type_variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ namespace detail {

// clang-format off
#define DATA_TYPE_INFO \
((int32_t, Int, "int")) \
((int64_t, Long, "long")) \
((float, Float, "float")) \
((double, Double, "double")) \
((std::string, String, "string"))
((int32_t, Int, "int")) \
((int64_t, Long, "long")) \
((float, Float, "float")) \
((double, Double, "double")) \
((pmr_string, String, "string"))
// Type Enum Value String
// clang-format on

Expand Down
Loading

0 comments on commit e24c7a1

Please sign in to comment.