mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Namespaces | Data Structures | Concepts | Typedefs | Enumerations | Functions | Variables
m Namespace Reference

‍mutable namespace

More...

Namespaces

namespace  ai
 
namespace  ast
 
namespace  cnf
 
namespace  datagen
 Utilities to help generate data, e.g.
 
namespace  detail
 
namespace  gs
 
namespace  idx
 
namespace  interpreter
 
namespace  M_OPERATOR_LIST
 
namespace  memory
 
namespace  option_configs
 
namespace  options
 
namespace  pe
 

‍plan enumerator namespace


 
namespace  storage
 
namespace  term
 
namespace  version
 
namespace  wasm
 

Data Structures

struct  __virtual_crtp_helper
 A helper class to introduce a virtual method overload per type to a class hierarchy. More...
 
struct  AdjacencyMatrix
 An adjacency matrix for a given query graph. More...
 
struct  AggregationOperator
 
struct  allocator
 
class  ArgParser
 A parser for command line arguments. More...
 
struct  Attribute
 An attribute of a table. More...
 
struct  Backend
 Defines the interface of all execution Backends. More...
 
struct  backend_exception
 
struct  BaseTable
 A BaseTable is a DataSource that is materialized and stored persistently by the database system. More...
 
struct  Bitmap
 The bitmap type. More...
 
struct  Block
 A block of size N contains N tuples. More...
 
struct  Boolean
 The boolean type. More...
 
struct  calculate_filter_cost_tag
 
struct  calculate_grouping_cost_tag
 
struct  calculate_join_cost_tag
 
struct  CallbackOperator
 
struct  CardinalityEstimator
 
struct  CartesianProductEstimator
 DummyEstimator that always returns the size of the cartesian product of the given subproblems. More...
 
struct  Catalog
 The catalog contains all Databases and keeps track of all meta information of the database system. More...
 
struct  CharacterSequence
 The type of character strings, both fixed length and varying length. More...
 
struct  ClauseInfo
 Collects information of a cnf::Clause. More...
 
struct  ColumnStore
 This class implements a column store. More...
 
struct  common_type
 Computes the common type of. More...
 
struct  common_type< T, T >
 Specialization for equal types. More...
 
struct  common_type< T, U >
 If both. More...
 
struct  Concat
 
struct  Concat< std::variant< Args0... >, Args1... >
 
struct  ConcreteCondition2PPTEntryMap
 
struct  ConcretePhysicalPlanTable
 
struct  ConcretePhysicalPlanTableEntry
 
struct  ConcreteTable
 Basic implementation of Table. More...
 
struct  ConcreteTableFactory
 Basic implementation of TableFactory. More...
 
struct  ConcreteTableFactoryDecorator
 
struct  Condition
 
struct  Condition2PPTEntryMap
 Interface for a mapping between ConditionSets and physical plan table entries of type. More...
 
struct  conditional_one
 
struct  conditional_one< false, TrueType, FalseType >
 
struct  ConditionPropertyMap
 
struct  ConditionSet
 
struct  Consumer
 A Consumer is an Operator that can be evaluated on a sequence of tuples. More...
 
struct  CostFunction
 
struct  CostFunctionCout
 Implements the cassical, widely used cost function C_out from Sophie Cluet and Guido Moerkotte. More...
 
struct  CostFunctionCRTP
 
struct  CostModelFactory
 
struct  CreateDatabase
 
struct  CreateIndex
 
struct  CreateTable
 
struct  crtp
 A helper class to define CRTP class hierarchies. More...
 
struct  crtp_boolean
 A helper class to define CRTP class hierarchies with an additional boolean template parameter (this is often used for iterators taking a boolean template parameter to decide on constness). More...
 
struct  crtp_boolean_templated
 A helper class to define CRTP class hierarchies with an additional boolean template template parameter (this is often used for iterators taking a boolean template parameter to decide on constness). More...
 
struct  Database
 A Database is a set of Tables, Functions, and Statistics. More...
 
struct  DatabaseCommand
 The command pattern for operations in the DBMS. More...
 
struct  DatabaseInstruction
 A DatabaseInstruction represents an invokation of an instruction with (optional) arguments. More...
 
struct  DataModel
 A DataModel describes a data set. More...
 
struct  DataSource
 A DataSource in a QueryGraph. More...
 
struct  Date
 The date type. More...
 
struct  DateTime
 The date type. More...
 
struct  DDLCommand
 
struct  DeleteRecords
 Delete records from a Table of a Database. More...
 
struct  Diagnostic
 
struct  DisjunctiveFilterOperator
 
struct  DMLCommand
 Base class for all commands resulting from a data manipulation language (DML) statement. More...
 
struct  DotTool
 This class enables direct rendering of dot output (e.g. More...
 
struct  doubly_linked_list
 Implements a doubly-linked list with an overhead of just a single pointer per element. More...
 
struct  DropDatabase
 
struct  DropIndex
 
struct  DropTable
 
struct  DSVReader
 A reader for delimiter separated value (DSV) files. More...
 
struct  dyn_array
 Implements an array of dynamic but fixed size. More...
 
struct  EmptyCommand
 
struct  ErrorType
 This Type is assigned when parsing of a data type fails or when semantic analysis detects a type error. More...
 
struct  estimate_join_all_tag
 
struct  exception
 
struct  FilterOperator
 
struct  FnType
 The function type defines the type and count of the arguments and the type of the return value of a SQL function. More...
 
struct  frontend_exception
 
struct  Function
 Defines a function. More...
 
struct  get_nodes
 
struct  get_nodes< pattern_t< Op, Children... > >
 
struct  get_singleton_operator
 
struct  get_singleton_operator< Op >
 
struct  get_singleton_operator< pattern_t< Op, Wildcard > >
 
struct  get_singleton_operator< pattern_t< Op, Wildcard, Wildcard > >
 
struct  get_tm
 
struct  GospersHack
 Enumerate all subsets of size k based on superset of size n. More...
 
struct  GraphBuilder
 
struct  GroupingOperator
 
struct  has_producer_root
 
struct  has_producer_root< Op >
 
struct  has_producer_root< pattern_t< Op, Children... > >
 
struct  ImportDSV
 Import records from a delimiter separated values (DSV) file into a Table of a Database. More...
 
struct  InjectionCardinalityEstimator
 InjectionCardinalityEstimator that estimates cardinalities based on a table that contains sizes for the given subproblems Table is initialized in the constructor by using an external json-file If no entry is found, uses the DummyEstimator to return an estimate. More...
 
struct  InsertRecords
 Insert records into a Table of a Database. More...
 
struct  Interpreter
 Evaluates SQL operator trees on the database. More...
 
struct  invalid_argument
 Signals that an argument to a function of method was invalid. More...
 
struct  invalid_state
 Signals that an object was in an invalid state when a method was invoked. More...
 
struct  is_pattern
 
struct  is_pattern< pattern_t< Ts... > >
 
struct  is_singleton_pattern
 
struct  is_singleton_pattern< Op >
 
struct  is_singleton_pattern< pattern_t< Op, Wildcard > >
 
struct  is_singleton_pattern< pattern_t< Op, Wildcard, Wildcard > >
 
struct  is_streamable
 
struct  is_streamable< S, T, std::void_t< decltype(std::declval< S & >()<< std::declval< T >())> >
 
struct  Join
 A Join in a QueryGraph combines DataSources by a join condition. More...
 
struct  JoinOperator
 
struct  lazy_construct
 
struct  learn_spns
 Learn an SPN on every table in the database that is currently in use. More...
 
struct  LimitOperator
 
class  LinearModel
 A model for predicting the costs of a physical operator. More...
 
struct  list_allocator
 Implements a list allocator. More...
 
struct  logic_error
 Base class for exceptions signaling an error in the logic. More...
 
struct  malloc_allocator
 This allocator serves allocations using malloc/free. More...
 
struct  Match
 
struct  Match< wasm::Aggregation >
 
struct  Match< wasm::Callback< SIMDfied > >
 
struct  Match< wasm::Filter< Predicated > >
 
struct  Match< wasm::HashBasedGrouping >
 
struct  Match< wasm::HashBasedGroupJoin >
 
struct  Match< wasm::IndexScan< IndexMethod > >
 
struct  Match< wasm::LazyDisjunctiveFilter >
 
struct  Match< wasm::Limit >
 
struct  Match< wasm::NestedLoopsJoin< Predicated > >
 
struct  Match< wasm::NoOp >
 
struct  Match< wasm::NoOpSorting >
 
struct  Match< wasm::OrderedGrouping >
 
struct  Match< wasm::Print< SIMDfied > >
 
struct  Match< wasm::Projection >
 
struct  Match< wasm::Quicksort< CmpPredicated > >
 
struct  Match< wasm::Scan< SIMDfied > >
 
struct  Match< wasm::SimpleHashJoin< UniqueBuild, Predicated > >
 
struct  Match< wasm::SortMergeJoin< SortLeft, SortRight, Predicated, CmpPredicated > >
 
struct  MatchBase
 
struct  MinCutAGaT
 
struct  MultiVersioningTable
 A multi-versioning table is a Table with additional invisible timestamp attributes. More...
 
struct  NoneType
 A Type that represents the absence of any other type. More...
 
struct  NoOpOperator
 Drops the produced results and outputs only the number of result tuples produced. More...
 
struct  NoSIMD
 
struct  Numeric
 The numeric type represents integer and floating-point types of different precision and scale. More...
 
struct  Operator
 An Operator represents an operation in a query plan. More...
 
struct  OperatorData
 This interface allows for attaching arbitrary data to Operator instances. More...
 
struct  OperatorInformation
 This class provides additional information about an Operator, e.g. More...
 
struct  OptField
 
struct  OptField< false, T >
 
struct  Optimizer
 The optimizer interface. More...
 
struct  Options
 Singleton class representing options provided as command line argument to the binaries. More...
 
struct  out_of_range
 Signals that an index-based or key-based access was out of range. More...
 
struct  overloaded
 
struct  PairHash
 Computes the XOR-hash for a pair. More...
 
struct  param_pack_t
 Helper struct for parameter packs. More...
 
struct  PartialPlanGenerator
 A partial plan is a set of (potentially incomplete) pairwise disjoint plans. More...
 
struct  partition_predicated_naive
 Partitions the range begin to end (exclusive) into two partitions using pivot. More...
 
struct  pattern_matcher_base
 Abstract base class of all matchable patterns. More...
 
struct  pattern_matcher_impl
 
struct  pattern_matcher_recursive
 
struct  pattern_matcher_recursive< PhysOp, Idx, Op, PatternQueue... >
 
struct  pattern_matcher_recursive< PhysOp, Idx, pattern_t< Op, Children... >, PatternQueue... >
 
struct  pattern_t
 
struct  pattern_validator
 
struct  pattern_validator< Op >
 
struct  PaxStore
 This class implements a generic PAX store. More...
 
struct  PhysicalOperator
 
struct  PhysicalOptimizer
 The physical optimizer interface. More...
 
struct  PhysicalOptimizerImpl
 Concrete PhysicalOptimizer implementation using a concrete statically-typed. More...
 
struct  PhysicalPlanTable
 Interface for an entire physical plan table containing a ConditionSet-entry-mapping. More...
 
struct  PhysicalPlanTableEntry
 Interface for a single physical plan table entry. More...
 
struct  Pipeline
 Implements push-based evaluation of a pipeline in the plan. More...
 
struct  PlanTableBase
 
struct  PlanTableDecorator
 
struct  PlanTableEntry
 
struct  PlanTableEntryData
 This interface allows for attaching arbitrary data to PlanTableEntry instances. More...
 
struct  PlanTableLargeAndSparse
 This table represents all explored plans with their sub-plans, estimated size, cost, and further optional properties. More...
 
struct  PlanTableSmallOrDense
 This table represents all explored plans with their sub-plans, estimated size, cost, and further optional properties. More...
 
struct  PODPool
 The PODPool implements an implicitly garbage-collected set of pooled (or internalized) POD struct entities. More...
 
struct  Pool
 A pool implements an implicitly garbage-collected set of instances of a class hierarchy. More...
 
struct  Pooled
 A data type representing a pooled (or internalized) object. More...
 
struct  Position
 
struct  Predicated
 
struct  PrimitiveType
 PrimitiveTypes represent Types of values. More...
 
struct  PrintOperator
 Prints the produced Tuples to a std::ostream instance. More...
 
struct  Producer
 A Producer is an Operator that can be evaluated to a sequence of tuples. More...
 
struct  projecting_iterator
 
struct  projecting_iterator< It, ReturnType &(It), OwnsProjection >
 
struct  ProjectionOperator
 
struct  put_timepoint
 
struct  put_tm
 
struct  Query
 A Query in a QueryGraph is a DataSource that represents a nested query. More...
 
struct  QueryDatabase
 Run a query against the selected database. More...
 
struct  QueryGraph
 The query graph represents all data sources and joins in a graph structure. More...
 
struct  QueryGraph2SQL
 Translates a query graph in SQL. More...
 
struct  range
 
struct  read_lock
 
struct  Reader
 An interface for all readers. More...
 
struct  reader_writer_lock
 This is a helper class that helps managing reader and writer locks claimed from reader_writer_mutex. More...
 
class  reader_writer_mutex
 Implements a many-readers, single-writer locking concept. More...
 
struct  RefCountingHashMap
 
struct  RowStore
 This class implements a row store. More...
 
struct  runtime_error
 Signals a runtime error that mu*t*able is not responsible for and that mu*t*able was not able to recover from. More...
 
struct  ScanOperator
 
struct  Scheduler
 The Scheduler handles the execution of all incoming queries. More...
 
struct  Schema
 A Schema represents a sequence of identifiers, optionally with a prefix, and their associated types. More...
 
struct  SerialScheduler
 This class implements a Scheduler that executes all incoming DatabaseCommands serially. More...
 
struct  setup_t
 
struct  SIMD
 
struct  SmallBitset
 Implements a small and efficient set over integers in the range of 0 to 63 (including). More...
 
struct  some
 A helper type to wrap some template type parameter such that it can safely be used to declare a class field or local variable. More...
 
struct  some< void >
 
struct  sorted_vector
 A sorted list of elements. More...
 
struct  Sortedness
 
struct  SortingOperator
 
struct  Spn
 Tree structure for Sum Product Networks. More...
 
struct  SpnEstimator
 SpnEstimator that estimates cardinalities based on Sum-Product Networks. More...
 
struct  SpnWrapper
 A wrapper class for an Spn to be used in the context of databases. More...
 
struct  SQLCommand
 
struct  StackMachine
 A stack machine that evaluates an expression. More...
 
struct  StackMachineBuilder
 
struct  Store
 Defines a generic store interface. More...
 
struct  StoreWriter
 This class provides direct write access to the contents of a Store. More...
 
struct  StrClone
 
struct  StrEqual
 Compares two cstrings for equality. More...
 
struct  StrEqualWithNull
 Compares two cstrings for equality. More...
 
struct  StrHash
 Computes the FNV-1a 64-bit hash of a cstring. More...
 
struct  StringView
 
struct  SubproblemHash
 
struct  SubqueryInfo
 Collects info of a subquery, i.e. More...
 
struct  SubsetEnumerator
 This class efficiently enumerates all subsets of a given size. More...
 
struct  Table
 A table is a sorted set of attributes. More...
 
struct  TableDecorator
 Abstract Decorator class that concrete TableDecorator inherit from. More...
 
struct  TableFactory
 The table factory creates Tables with all enabled decorators. More...
 
struct  TableFactoryDecorator
 Abstract Decorator class that concrete TableFactoryDecorator inherit from. More...
 
struct  tag
 
struct  teardown_t
 
struct  Timer
 Collect timings of events. More...
 
struct  TrainedCostFunction
 
struct  Tuple
 
struct  Type
 This class represents types in the SQL type system. More...
 
struct  Unsatisfiable
 
struct  unsharable_shared_ptr
 This class extends std::shared_ptr to allow for unsharing an exclusively held object and thereby converting to a std::unique_ptr. More...
 
struct  UpdateRecords
 Modify records of a Table of a Database. More...
 
struct  upgrade_lock
 
struct  UseDatabase
 
struct  Value
 This class holds a SQL attribute value. More...
 
struct  view
 
struct  view< It, ReturnType &(It)>
 
struct  visit_skip_subtree
 Exception class which can be thrown to skip recursion of the subtree in pre-order visitors. More...
 
struct  visit_stop_recursion
 Exception class which can be thrown to stop entire recursion in visitors. More...
 
struct  WasmBackend
 A Backend to execute a plan on a specific WasmEngine. More...
 
struct  WasmEngine
 A WasmEngine provides an environment to compile and execute WebAssembly modules. More...
 
struct  WasmModule
 A WasmModule is a wrapper around a [Binaryen] (https://github.com/WebAssembly/binaryen) wasm::Module. More...
 
struct  WebSocketServer
 
struct  write_lock
 

Concepts

concept  logical_operator
 
concept  producer
 
concept  consumer
 
concept  is_pattern_v
 
concept  producer_root
 
concept  valid_pattern
 
concept  singleton_pattern
 
concept  is_allocator
 
concept  boolean
 Check whether.
 
concept  character
 Check whether.
 
concept  integral
 Check whether.
 
concept  signed_integral
 Check whether.
 
concept  unsigned_integral
 Check whether.
 
concept  arithmetic
 Check whether.
 
concept  pointer
 Check whether.
 
concept  primitive
 Check whether.
 
concept  pointer_to_primitive
 Check whether.
 
concept  decayable
 Check whether.
 
concept  same_signedness
 Check whether types.
 
concept  equally_floating
 Check whether types.
 
concept  have_common_type
 Check whether.
 
concept  is_unique_ptr
 Check whether.
 
concept  is_unsharable_shared_ptr
 Check whether.
 
concept  is_reference_wrapper
 Check whether.
 
concept  is_template_instantiable
 
concept  is_specialization
 Check whether.
 
concept  param_pack
 Check whether.
 
concept  typed_param_pack
 Check whether.
 
concept  size_param_pack
 Check whether.
 
concept  streamable
 Check whether.
 
concept  is_invocable
 Check whether.
 

Typedefs

using Subproblem = SmallBitset
 
using CostModel = LinearModel
 
template<typename Property >
using ConditionPropertyUnorderedMap = ConditionPropertyMap< Property, false >
 
template<typename Property >
using ConditionPropertyOrderedMap = ConditionPropertyMap< Property, true >
 
using PreOrderOperatorVisitor = ThePreOrderOperatorVisitor< false >
 
using ConstPreOrderOperatorVisitor = ThePreOrderOperatorVisitor< true >
 
using PostOrderOperatorVisitor = ThePostOrderOperatorVisitor< false >
 
using ConstPostOrderOperatorVisitor = ThePostOrderOperatorVisitor< true >
 
using Wildcard = Producer
 
template<std::size_t I, typename... Ts>
using ith_type_of = std::tuple_element_t< I, std::tuple< Ts... > >
 
template<typename T >
using get_nodes_t = typename get_nodes< T >::type
 
template<singleton_pattern T>
using get_singleton_operator_t = typename get_singleton_operator< T >::type
 
using pipeline_t = std::function< void(void)>
 
template<typename T , typename U >
using common_type_t = typename common_type< T, U >::type
 Convenience alias for common_type<T, U>::type.
 
template<std::size_t I, param_pack P>
using param_pack_element_t = std::tuple_element_t< I, detail::as_tuple_t< P > >
 Returns the.
 
template<typename T >
using virtual_crtp_helper = __virtual_crtp_helper< T, false >
 
template<typename T >
using const_virtual_crtp_helper = __virtual_crtp_helper< T, true >
 
template<typename T , typename Hash = std::hash<T>, typename KeyEqual = std::equal_to<T>, typename Copy = std::identity>
using ThreadSafePODPool = PODPool< T, Hash, KeyEqual, Copy, true >
 
template<typename T , typename Hash = std::hash<T>, typename KeyEqual = std::equal_to<T>>
using ThreadSafePool = Pool< T, Hash, KeyEqual, true >
 
using ThreadSafeStringPool = detail::_StringPool< true >
 
using ThreadSafePooledString = ThreadSafeStringPool::proxy_type
 
using ThreadSafePooledOptionalString = ThreadSafeStringPool::proxy_optional_type
 
using StringPool = detail::_StringPool< false >
 
using PooledString = StringPool::proxy_type
 
using PooledOptionalString = StringPool::proxy_optional_type
 
template<bool Cond, template< typename > typename TrueType, template< typename > typename FalseType, typename Arg >
using conditional_one_t = typename conditional_one< Cond, TrueType, FalseType >::template type< Arg >
 
using MatrixRXf = Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >
 

Enumerations

enum class  OperatorKind { X , M_OPERATOR_LIST =(X) }
 
enum  TokenType { TokenType_MAX = TK_EOF }
 
enum class  AllocationStrategy { Linear , Exponential }
 

Functions

 M_DECLARE_VISITOR (DatabaseCommandVisitor, DatabaseCommand, M_DATABASE_COMMAND_LIST) M_DECLARE_VISITOR(ConstDatabaseCommandVisitor
 
Schema operator+ (const Schema &left, const Schema &right)
 
Schema operator& (const Schema &left, const Schema &right)
 Computes the set intersection of two Schemas.
 
Schema operator| (const Schema &left, const Schema &right)
 
template<typename T >
bool type_check (const Attribute &attr)
 Checks that the type of the attr matches the template type T.
 
template<typename T >
bool M_EXPORT is_convertible (const Type *attr)
 
bool M_EXPORT is_comparable (const Type *first, const Type *second)
 Returns true iff both types have the same PrimitiveType, i.e.
 
template<typename T >
const PrimitiveType *M_EXPORT get_runtime_type ()
 Returns the internal runtime Type of mu*t*able for the compile-time type T.
 
const Numericarithmetic_join (const Numeric *lhs, const Numeric *rhs)
 
 M_DECLARE_VISITOR (TypeVisitor, Type, M_TYPE_LIST) M_DECLARE_VISITOR(ConstTypeVisitor
 
template<typename T >
bool is_convertible (const Type *ty)
 
template<typename T >
const PrimitiveTypeget_runtime_type ()
 Returns the internal runtime Type of mu*t*able for the compile-time type T.
 
 M_DECLARE_VISITOR (OperatorVisitor, Operator, M_OPERATOR_LIST) M_DECLARE_VISITOR(ConstOperatorVisitor
 
 M_MAKE_STL_VISITABLE (PreOrderOperatorVisitor, Operator, M_OPERATOR_LIST) M_MAKE_STL_VISITABLE(ConstPreOrderOperatorVisitor
 
const M_OPERATOR_LIST M_MAKE_STL_VISITABLE (PostOrderOperatorVisitor, Operator, M_OPERATOR_LIST) M_MAKE_STL_VISITABLE(ConstPostOrderOperatorVisitor
 
template<consumer Op, producer_root... Children>
requires (sizeof...(Children) != 0)
 and (sizeof...(Children)<=2) struct pattern_validator< pattern_t< Op
 
 M_DECLARE_VISITOR (PhysOptVisitor, PhysicalOptimizer, M_PHYS_OPT_LIST) M_DECLARE_VISITOR(ConstPhysOptVisitor
 
 M_PHYS_OPT_LIST (DECLARE) template< typename Actual
 A PhysicalOperator represents a physical operation in a query plan.
 
template<typename Actual >
void swap (PlanTableBase< Actual > &first, PlanTableBase< Actual > &second)
 
template<typename Actual >
M_LCOV_EXCL_START std::ostream & operator<< (std::ostream &out, const PlanTableBase< Actual > &PT)
 
char const * get_name (const TokenType tt)
 
M_LCOV_EXCL_START std::ostream & operator<< (std::ostream &os, const TokenType tt)
 
std::string to_string (const TokenType tt)
 
bool M_EXPORT init (void)
 Initializes the mu*t*able library.
 
std::unique_ptr< ast::Stmt > M_EXPORT statement_from_string (Diagnostic &diag, const std::string &str)
 Use lexer, parser, and semantic analysis to create a Stmt from str.
 
std::unique_ptr< ast::Instruction > M_EXPORT instruction_from_string (Diagnostic &diag, const std::string &str)
 Use lexer and parser to create an Instruction from str.
 
std::unique_ptr< DatabaseCommand > M_EXPORT command_from_string (Diagnostic &diag, const std::string &str)
 Create a DatabaseCommand from str.
 
void M_EXPORT execute_statement (Diagnostic &diag, const ast::Stmt &stmt, bool is_stdin=false)
 Optimizes and executes the given Stmt.
 
void M_EXPORT process_stream (std::istream &in, const char *filename, Diagnostic diag)
 Extracts and executes statements from given stream.
 
void M_EXPORT execute_instruction (Diagnostic &diag, const ast::Instruction &instruction)
 Executes the given Instruction.
 
std::unique_ptr< Consumer > M_EXPORT logical_plan_from_statement (Diagnostic &diag, const ast::SelectStmt &stmt, std::unique_ptr< Consumer > consumer)
 Optimizes the given SelectStmt.
 
std::unique_ptr< MatchBase > M_EXPORT physical_plan_from_logical_plan (Diagnostic &diag, const Consumer &logical_plan)
 Computes a physical plan from the given logical plan.
 
std::unique_ptr< MatchBase > M_EXPORT physical_plan_from_logical_plan (Diagnostic &diag, const Consumer &logical_plan, const Backend &backend)
 Computes a physical plan from the given logical_plan.
 
void M_EXPORT execute_physical_plan (Diagnostic &diag, const MatchBase &physical_plan)
 Executes the given physical plan.
 
void M_EXPORT execute_physical_plan (Diagnostic &diag, const MatchBase &physical_plan, const Backend &backend)
 Executes the given physical plan on backend.
 
void M_EXPORT execute_query (Diagnostic &diag, const ast::SelectStmt &stmt, std::unique_ptr< Consumer > consumer)
 Optimizes and executes the given SelectStmt.
 
void M_EXPORT execute_query (Diagnostic &diag, const ast::SelectStmt &stmt, std::unique_ptr< Consumer > consumer, const Backend &backend)
 Optimizes and executes the given SelectStmt on backend.
 
void M_EXPORT load_from_CSV (Diagnostic &diag, Table &table, const std::filesystem::path &path, std::size_t num_rows=std::numeric_limits< std::size_t >::max(), bool has_header=false, bool skip_header=false)
 Loads a CSV file into a Table.
 
void M_EXPORT execute_file (Diagnostic &diag, const std::filesystem::path &path)
 Execute the SQL file at path.
 
SmallBitset least_subset (SmallBitset S)
 Returns the least subset of a given set, i.e. the set represented by the lowest 1 bit.
 
SmallBitset next_subset (SmallBitset subset, SmallBitset set)
 Returns the next subset of a given subset and `set.
 
template<typename It , typename Fn >
 projecting_iterator (It, Fn &&) -> projecting_iterator< It, std::invoke_result_t< Fn &&, It >(It)>
 
template<typename It , typename Fn >
 view (range< It >, Fn &&) -> view< It, std::invoke_result_t< Fn &&, It >(It)>
 
template<typename It , typename Fn >
 view (It, It, Fn &&) -> view< It, std::invoke_result_t< Fn &&, It >(It)>
 
M_LCOV_EXCL_START std::ostream & operator<< (std::ostream &out, const ArgParser &AP)
 
template<typename T , typename U >
requires arithmetic<T>
and arithmetic< U > and same_signedness< T, Uand (not equally_floating< T, U >) struct common_type< T
 If both.
 
 T (x) { x & x } -> std::same_as<std::underlying_type_t<T>>
 
constexpr T operator| (T left, T right)
 
constexpr T operator& (T left, T right)
 
constexpr T operator- (T left, T right)
 
constexpr T operator~ (T t)
 
constexpr Toperator|= (T &left, T right)
 
constexpr Toperator&= (T &left, T right)
 
constexpr Toperator-= (T &left, T right)
 
bool streq (const char *first, const char *second)
 
bool strneq (const char *first, const char *second, std::size_t n)
 
std::string replace_all (std::string str, const std::string &from, const std::string &to)
 
uint64_t FNV1a (const char *c_str)
 
uint64_t FNV1a (const char *c_str, std::size_t len)
 
template<typename T >
requires unsigned_integral<T>
M_EXPORT constexpr bool is_pow_2 (T n)
 
template<typename T , typename... Us>
Tget_as (std::variant< Us... > &v)
 
template<typename T , typename... Us>
const Tget_as (const std::variant< Us... > &v)
 
std::string escape (char c)
 
std::string M_EXPORT escape (const std::string &str, char esc='\\', char quote='"')
 
std::string M_EXPORT unescape (const std::string &str, char esc='\\', char quote='"')
 
std::string quote (const std::string &str)
 
std::string unquote (const std::string &str, char quote='"')
 
std::string interpret (const std::string &str, char esc='\\', char quote='"')
 
std::string M_EXPORT html_escape (std::string str)
 Escapes special characters in a string to be printable in HTML documents.
 
std::regex pattern_to_regex (const char *pattern, const bool optimize=false, const char escape_char='\\')
 Transforms a SQL-style LIKE pattern into a std::regex.
 
bool M_EXPORT like (const std::string &str, const std::string &pattern, const char escape_char='\\')
 Compares a SQL-style LIKE pattern with the given std::string.
 
template<typename H , typename N >
bool M_EXPORT contains (const H &haystack, const N &needle)
 Checks whether haystack contains needle.
 
template<typename T , typename U >
bool M_EXPORT equal (const T &first, const U &second)
 Checks whether first and second are equal considering permutations.
 
template<typename Container , typename Set >
bool M_EXPORT subset (const Container &subset, const Set &set)
 Checks whether subset is a subset of set.
 
template<typename Container , typename Set >
bool M_EXPORT intersect (const Container &first, const Set &second)
 Checks whether first and second intersect.
 
template<integral T, unsigned_integral U>
T M_EXPORT powi (const T base, const U exp)
 Power function for integral types.
 
template<typename T >
void M_EXPORT setbit (T *bytes, bool value, uint32_t n)
 
template<typename T , typename... Args>
std::ostream &M_EXPORT operator<< (std::ostream &out, const std::variant< T, Args... > value)
 
template<class... Ts>
 overloaded (Ts...) -> overloaded< Ts... >
 
uint64_t murmur3_64 (uint64_t v)
 This function implements the 64-bit finalizer of Murmur3_x64 by Austin Appleby, available at https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp .
 
bool is_oct (int c)
 
bool is_dec (int c)
 
bool is_hex (int c)
 
bool is_lower (int c)
 
bool is_upper (int c)
 
bool is_alpha (int c)
 
bool is_alnum (int c)
 
std::filesystem::path get_home_path ()
 Returns path of the user's home directory.
 
bool isspace (const char *s, std::size_t len)
 Returns true iff the character sequence only consists of white spaces.
 
bool isspace (const char *s)
 
void M_EXPORT exec (const char *executable, std::initializer_list< const char * > args)
 
template<typename T , typename U >
auto M_EXPORT add_wo_overflow (T left, U right)
 
template<typename N0 , typename N1 >
auto M_EXPORT sum_wo_overflow (N0 n0, N1 n1)
 
template<typename N0 , typename N1 , typename... Numbers>
auto M_EXPORT sum_wo_overflow (N0 n0, N1 n1, Numbers... numbers)
 Returns the sum of the given parameters.
 
template<typename T , typename U >
auto M_EXPORT mul_wo_overflow (T left, U right)
 
template<typename N0 , typename N1 >
auto M_EXPORT prod_wo_overflow (N0 n0, N1 n1)
 
template<typename N0 , typename N1 , typename... Numbers>
auto M_EXPORT prod_wo_overflow (N0 n0, N1 n1, Numbers... numbers)
 Returns the product of the given parameters.
 
const char * strdupn (const char *str)
 A wrapper around strdup() that permits nullptr.
 
std::size_t M_EXPORT get_pagesize ()
 Returns the page size of the system.
 
std::size_t Is_Page_Aligned (std::size_t n)
 Returns true iff n is a integral multiple of the page size (in bytes).
 
std::size_t Ceil_To_Next_Page (std::size_t n)
 Returns the smallest integral multiple of the page size (in bytes) greater than or equals to n.
 
uint64_t sequence_number (double x)
 This function assigns an integral sequence number to each double that is not NaN, such that if y = std::nextafter(x, INF) then sequence_number(y) = sequence_number(x) + 1.
 
uint32_t sequence_number (float x)
 This function assigns an integral sequence number to each float that is not NaN, such that if y = std::nextafter(x, INF) then sequence_number(y) = sequence_number(x) + 1.
 
template<typename T >
constexpr bool M_EXPORT is_range_wide_enough (T a, T b, std::size_t n)
 Checks whether the range [a, b] contains at least n distinct values.
 
template<typename T >
std::enable_if_t< std::is_integral_v< T >, unsigned long long > M_EXPORT n_choose_k_approx (T n, T k)
 Approximates n! using the gamma function.
 
float fast_reciprocal_sqrtf (const float n)
 Fast reciprocal square root, that became famous in Quake 3.
 
float fast_reciprocal_sqrt (const float n)
 
double fast_reciprocal_sqrtd (const double n)
 Fast reciprocal square root, that became famous in Quake 3.
 
double fast_reciprocal_sqrt (const double n)
 
float fast_sqrtf (float n)
 
float fast_sqrt (float n)
 
double fast_sqrtd (double n)
 
double fast_sqrt (double n)
 
void _insist (const bool cond, const char *filename, const unsigned line, const char *condstr, const char *msg)
 
void _abort (const char *filename, const unsigned line, const char *msg)
 
template<typename T >
T_notnull (T *arg, const char *filename, const unsigned line, const char *argstr)
 
template<typename T >
std::unique_ptr< T_notnull (std::unique_ptr< T > arg, const char *filename, const unsigned line, const char *argstr)
 
template<typename T , typename... Args>
unsharable_shared_ptr< Tmake_unsharable_shared (Args &&... args)
 
template<typename Callable , typename Visitor , typename Base , typename... Hierarchy>
auto visit (Callable &&callable, Base &obj, m::tag< Callable > &&=m::tag< Callable >())
 Generic implementation to visit a class hierarchy, with similar syntax as std::visit.
 
 M_OPERATOR_LIST (DECLARE) void register_interpreter_operators(PhysicalOptimizer &phys_opt)
 
 M_WASM_OPERATOR_LIST_NON_TEMPLATED (DECLARE) namespace wasm
 
void register_wasm_operators (PhysicalOptimizer &phys_opt)
 Registers physical Wasm operators in phys_opt depending on the set CLI options.
 
template<typename T >
void execute_buffered (const Match< T > &M, const Schema &schema, const std::unique_ptr< const storage::DataLayoutFactory > &buffer_factory, std::size_t buffer_num_tuples, setup_t setup, pipeline_t pipeline, teardown_t teardown)
 
void set_all_null (uint8_t *column_ptr, std::size_t num_attrs, std::size_t begin, std::size_t end)
 Sets all attributes of the begin-th row (including) to the end-th row (excluding) of column at address column_ptr to NULL.
 
void set_all_not_null (uint8_t *column_ptr, std::size_t num_attrs, std::size_t begin, std::size_t end)
 Sets all attributes of the begin-th row (including) to the end-th row (excluding) of column at address column_ptr to NOT NULL.
 
void generate_primary_keys (void *column_ptr, const Type &type, std::size_t begin, std::size_t end)
 Generates primary keys of Type type for the begin-th row (including) to the end-th row (excluding) of column at address column_ptr.
 
template<typename T , typename Generator = std::mt19937_64>
std::enable_if_t< std::is_arithmetic_v< T >, void > M_EXPORT fill_uniform (T *column_ptr, std::vector< T > values, std::size_t begin, std::size_t end, Generator &&g=Generator())
 Fills column at address column_ptr from begin-th row (including) to end-th row (excluding) with data from values.
 
void generate_column_data (void *column_ptr, const Attribute &attr, std::size_t num_distinct_values, std::size_t begin, std::size_t end)
 Generates data for the column at address column_ptr from begin-th row (including) to end-th row (excluding) and writes it directly to memory.
 
void generate_correlated_column_data (void *left_ptr, void *right_ptr, const Attribute &attr, std::size_t num_distinct_values_left, std::size_t num_distinct_values_right, std::size_t count_left, std::size_t count_right, std::size_t num_distinct_values_matching)
 Generates data for two columns at addresses left_ptr and right_ptr correlated by num_distinct_values_matching and writes the data directly to memory.
 
template<typename It >
bool verify_partition (It begin, It mid, It end)
 Verifies that mid splits the range begin to end (exclusive) into two partitions.
 
template<typename Partitioning , typename It >
void qsort (It begin, It end, Partitioning p)
 
Eigen::VectorXd regression_linear_closed_form (const Eigen::MatrixXd &X, const Eigen::VectorXd &y)
 Use closed-form solution for linear regression.
 
MatrixRXf M_EXPORT kmeans_plus_plus (const Eigen::MatrixXf &data, unsigned k)
 Compute initial cluster centroids using k-means++ algorithm.
 
std::pair< std::vector< unsigned >, MatrixRXf > M_EXPORT kmeans_with_centroids (const Eigen::MatrixXf &data, unsigned k)
 Clusters the given data according to the k-means algorithm.
 
std::vector< unsigned > M_EXPORT kmeans (const Eigen::MatrixXf &data, unsigned k)
 Clusters the given data according to the k-means algorithm.
 
Eigen::MatrixXf create_CDF_matrix (const Eigen::MatrixXf &data)
 Creates a new matrix, mapping every cell of data to its position according to the cell's column's CDF.
 
float rdc (const Eigen::MatrixXf &X, const Eigen::MatrixXf &Y, unsigned k=5, float stddev=1.f/6.f)
 Compute the Randomized Dependence Coefficient of two random variables.
 
template<typename URBG = std::mt19937_64>
float rdc_precomputed_CDF (Eigen::MatrixXf &CDFs_of_X, Eigen::MatrixXf &CDFs_of_Y, unsigned k=5, float stddev=1.f/6.f, URBG &&g=URBG())
 Compute the RDC value without having to compute CDF matrices to avoid sorting the same data multiple times.
 
StringView operator+ (const StringView &left, const StringView &right)
 

Variables

const DatabaseCommand
 
const Type
 
const Operator
 
 Children
 
const PhysicalOptimizer
 
and arithmetic< U > and same_signedness< T, U > U
 
template<param_pack P>
constexpr std::size_t param_pack_size_v = std::tuple_size_v<detail::as_tuple_t<P>>
 Returns the size of a parameter pack type.
 
template<typename T >
requires (std::underlying_type_t<T> x)
 and
 

Detailed Description

‍mutable namespace

Typedef Documentation

◆ common_type_t

template<typename T , typename U >
using m::common_type_t = typedef typename common_type<T, U>::type

Convenience alias for common_type<T, U>::type.

Definition at line 96 of file concepts.hpp.

◆ conditional_one_t

template<bool Cond, template< typename > typename TrueType, template< typename > typename FalseType, typename Arg >
using m::conditional_one_t = typedef typename conditional_one<Cond, TrueType, FalseType>::template type<Arg>

Definition at line 18 of file type_traits.hpp.

◆ ConditionPropertyOrderedMap

template<typename Property >
using m::ConditionPropertyOrderedMap = typedef ConditionPropertyMap<Property, true>

Definition at line 100 of file Condition.hpp.

◆ ConditionPropertyUnorderedMap

template<typename Property >
using m::ConditionPropertyUnorderedMap = typedef ConditionPropertyMap<Property, false>

Definition at line 98 of file Condition.hpp.

◆ const_virtual_crtp_helper

template<typename T >
using m::const_virtual_crtp_helper = typedef __virtual_crtp_helper<T, true>

Definition at line 162 of file crtp.hpp.

◆ ConstPostOrderOperatorVisitor

using m::ConstPostOrderOperatorVisitor = typedef ThePostOrderOperatorVisitor<true>

Definition at line 611 of file Operator.hpp.

◆ ConstPreOrderOperatorVisitor

using m::ConstPreOrderOperatorVisitor = typedef ThePreOrderOperatorVisitor<true>

Definition at line 609 of file Operator.hpp.

◆ CostModel

using m::CostModel = typedef LinearModel

Definition at line 16 of file CostModel.hpp.

◆ get_nodes_t

template<typename T >
using m::get_nodes_t = typedef typename get_nodes<T>::type

Definition at line 115 of file PhysicalOptimizer.hpp.

◆ get_singleton_operator_t

template<singleton_pattern T>
using m::get_singleton_operator_t = typedef typename get_singleton_operator<T>::type

Definition at line 150 of file PhysicalOptimizer.hpp.

◆ ith_type_of

template<std::size_t I, typename... Ts>
using m::ith_type_of = typedef std::tuple_element_t<I, std::tuple<Ts...> >

Definition at line 100 of file PhysicalOptimizer.hpp.

◆ MatrixRXf

using m::MatrixRXf = typedef Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>

Definition at line 10 of file Kmeans.hpp.

◆ param_pack_element_t

template<std::size_t I, param_pack P>
using m::param_pack_element_t = typedef std::tuple_element_t<I, detail::as_tuple_t<P> >

Returns the.

Template Parameters
I-th element of a parameter pack type
P.

Definition at line 181 of file concepts.hpp.

◆ pipeline_t

using m::pipeline_t = typedef std::function<void(void)>

Definition at line 157 of file PhysicalOptimizer.hpp.

◆ PooledOptionalString

Definition at line 469 of file Pool.hpp.

◆ PooledString

Definition at line 468 of file Pool.hpp.

◆ PostOrderOperatorVisitor

using m::PostOrderOperatorVisitor = typedef ThePostOrderOperatorVisitor<false>

Definition at line 610 of file Operator.hpp.

◆ PreOrderOperatorVisitor

using m::PreOrderOperatorVisitor = typedef ThePreOrderOperatorVisitor<false>

Definition at line 608 of file Operator.hpp.

◆ StringPool

using m::StringPool = typedef detail::_StringPool<false>

Definition at line 467 of file Pool.hpp.

◆ Subproblem

Definition at line 32 of file CardinalityEstimator.hpp.

◆ ThreadSafePODPool

template<typename T , typename Hash = std::hash<T>, typename KeyEqual = std::equal_to<T>, typename Copy = std::identity>
using m::ThreadSafePODPool = typedef PODPool<T, Hash, KeyEqual, Copy, true>

Definition at line 432 of file Pool.hpp.

◆ ThreadSafePool

template<typename T , typename Hash = std::hash<T>, typename KeyEqual = std::equal_to<T>>
using m::ThreadSafePool = typedef Pool<T, Hash, KeyEqual, true>

Definition at line 434 of file Pool.hpp.

◆ ThreadSafePooledOptionalString

Definition at line 465 of file Pool.hpp.

◆ ThreadSafePooledString

Definition at line 464 of file Pool.hpp.

◆ ThreadSafeStringPool

Definition at line 463 of file Pool.hpp.

◆ virtual_crtp_helper

template<typename T >
using m::virtual_crtp_helper = typedef __virtual_crtp_helper<T, false>

Definition at line 159 of file crtp.hpp.

◆ Wildcard

using m::Wildcard = typedef Producer

Definition at line 40 of file PhysicalOptimizer.hpp.

Enumeration Type Documentation

◆ AllocationStrategy

enum class m::AllocationStrategy
strong
Enumerator
Linear 
Exponential 

Definition at line 29 of file list_allocator.hpp.

◆ OperatorKind

enum class m::OperatorKind
strong
Enumerator
M_OPERATOR_LIST 

Definition at line 619 of file Operator.hpp.

◆ TokenType

Enumerator
TokenType_MAX 

Definition at line 9 of file TokenType.hpp.

Function Documentation

◆ _abort()

void m::_abort ( const char *  filename,
const unsigned  line,
const char *  msg 
)
inline

Definition at line 139 of file macro.hpp.

◆ _insist()

void m::_insist ( const bool  cond,
const char *  filename,
const unsigned  line,
const char *  condstr,
const char *  msg 
)
inline

Definition at line 106 of file macro.hpp.

◆ _notnull() [1/2]

template<typename T >
std::unique_ptr< T > m::_notnull ( std::unique_ptr< T arg,
const char *  filename,
const unsigned  line,
const char *  argstr 
)

Definition at line 173 of file macro.hpp.

◆ _notnull() [2/2]

template<typename T >
T * m::_notnull ( T arg,
const char *  filename,
const unsigned  line,
const char *  argstr 
)

Definition at line 162 of file macro.hpp.

References T().

◆ add_wo_overflow()

template<typename T , typename U >
auto M_EXPORT m::add_wo_overflow ( T  left,
U  right 
)

Definition at line 633 of file fn.hpp.

◆ and() [1/2]

template<typename T , typename U >
requires arithmetic<T>
and arithmetic< U > and same_signedness< T, U > m::and ( not equally_floating< T, U >   )

If both.

Template Parameters
Tand
Uare arithmetic types of same signedness and different floating point-ness, the common type is the floating-point type.

◆ and() [2/2]

template<consumer Op, producer_root... Children>
requires (sizeof...(Children) != 0)
m::and ( sizeof...(Children)<=  2)

◆ arithmetic_join()

M_LCOV_EXCL_STOP const Numeric * m::arithmetic_join ( const Numeric lhs,
const Numeric rhs 
)

‍factor to convert count of decimal digits to binary digits

Definition at line 24 of file Type.cpp.

References m::PrimitiveType::category, m::Type::Get_Decimal(), m::Type::Get_Double(), m::Type::Get_Float(), m::Type::Get_Integer(), M_insist, m::Numeric::precision, and m::Numeric::scale.

Referenced by m::StackMachineBuilder::operator()().

◆ Ceil_To_Next_Page()

std::size_t m::Ceil_To_Next_Page ( std::size_t  n)
inline

Returns the smallest integral multiple of the page size (in bytes) greater than or equals to n.

Definition at line 703 of file fn.hpp.

Referenced by m::memory::AddressSpace::AddressSpace(), m::memory::LinearAllocator::allocate(), m::wasm::detail::create_env(), and m::WasmEngine::WasmContext::map_table().

◆ command_from_string()

std::unique_ptr< DatabaseCommand > m::command_from_string ( Diagnostic diag,
const std::string &  str 
)

◆ contains()

template<typename H , typename N >
bool M_EXPORT m::contains ( const H &  haystack,
const N &  needle 
)

◆ create_CDF_matrix()

Eigen::MatrixXf m::create_CDF_matrix ( const Eigen::MatrixXf &  data)

Creates a new matrix, mapping every cell of data to its position according to the cell's column's CDF.

Referenced by rdc().

◆ equal()

template<typename T , typename U >
bool M_EXPORT m::equal ( const T first,
const U second 
)

Checks whether first and second are equal considering permutations.

Definition at line 391 of file fn.hpp.

References contains().

Referenced by emplace_back(), and emplace_back_unique().

◆ escape() [1/2]

std::string m::escape ( char  c)
inline

Definition at line 292 of file fn.hpp.

◆ escape() [2/2]

std::string m::escape ( const std::string &  str,
char  esc = '\\',
char  quote = '"' 
)

Definition at line 15 of file fn.cpp.

References quote().

◆ exec()

void m::exec ( const char *  executable,
std::initializer_list< const char * >  args 
)

Definition at line 123 of file fn.cpp.

References args, and M_unreachable.

Referenced by m::DotTool::show().

◆ execute_buffered()

template<typename T >
void m::execute_buffered ( const Match< T > &  M,
const Schema schema,
const std::unique_ptr< const storage::DataLayoutFactory > &  buffer_factory,
std::size_t  buffer_num_tuples,
setup_t  setup,
pipeline_t  pipeline,
teardown_t  teardown 
)

◆ execute_file()

void m::execute_file ( Diagnostic diag,
const std::filesystem::path &  path 
)

Execute the SQL file at path.

Parameters
diagthe diagnostic object
paththe path to the SQL file

Definition at line 410 of file mutable.cpp.

References m::Diagnostic::clear(), execute_instruction(), execute_statement(), m::Catalog::Get(), m::Diagnostic::num_errors(), m::ast::Parser::parse(), and m::ast::Parser::token().

Referenced by main().

◆ execute_instruction()

void m::execute_instruction ( Diagnostic diag,
const ast::Instruction instruction 
)

◆ execute_physical_plan() [1/2]

void m::execute_physical_plan ( Diagnostic diag,
const MatchBase physical_plan 
)

Executes the given physical plan.

The Backend is automatically created.

Definition at line 354 of file mutable.cpp.

References execute_physical_plan(), m::Catalog::Get(), and M_TIME_EXPR.

Referenced by execute_physical_plan(), and execute_query().

◆ execute_physical_plan() [2/2]

void m::execute_physical_plan ( Diagnostic diag,
const MatchBase physical_plan,
const Backend backend 
)

Executes the given physical plan on backend.

Definition at line 363 of file mutable.cpp.

References m::Backend::execute(), m::Catalog::Get(), M_TIME_EXPR, and m::Catalog::timer().

◆ execute_query() [1/2]

void m::execute_query ( Diagnostic diag,
const ast::SelectStmt stmt,
std::unique_ptr< Consumer consumer 
)

Optimizes and executes the given SelectStmt.

Result tuples are passed to the given consumer. The Backend is automatically created.

Definition at line 368 of file mutable.cpp.

References execute_query(), m::Catalog::Get(), and M_TIME_EXPR.

Referenced by m::idx::ArrayIndex< Key >::bulkload(), execute_query(), m::SpnWrapper::learn_spn_table(), and time_select_query_execution().

◆ execute_query() [2/2]

void m::execute_query ( Diagnostic diag,
const ast::SelectStmt stmt,
std::unique_ptr< Consumer consumer,
const Backend backend 
)

Optimizes and executes the given SelectStmt on backend.

Result tuples are passed to the given consumer.

Definition at line 377 of file mutable.cpp.

References execute_physical_plan(), logical_plan_from_statement(), and physical_plan_from_logical_plan().

◆ execute_statement()

void m::execute_statement ( Diagnostic diag,
const ast::Stmt stmt,
bool  is_stdin = false 
)

◆ fast_reciprocal_sqrt() [1/2]

double m::fast_reciprocal_sqrt ( const double  n)
inline

Definition at line 793 of file fn.hpp.

◆ fast_reciprocal_sqrt() [2/2]

float m::fast_reciprocal_sqrt ( const float  n)
inline

Definition at line 783 of file fn.hpp.

◆ fast_reciprocal_sqrtd()

double m::fast_reciprocal_sqrtd ( const double  n)
inline

Fast reciprocal square root, that became famous in Quake 3.

The magic number is for doubles is from https://cs.uwaterloo.ca/~m32rober/rsqrt.pdf

Definition at line 787 of file fn.hpp.

◆ fast_reciprocal_sqrtf()

float m::fast_reciprocal_sqrtf ( const float  n)
inline

Fast reciprocal square root, that became famous in Quake 3.

Definition at line 777 of file fn.hpp.

◆ fast_sqrt() [1/2]

double m::fast_sqrt ( double  n)
inline

Definition at line 805 of file fn.hpp.

◆ fast_sqrt() [2/2]

float m::fast_sqrt ( float  n)
inline

Definition at line 799 of file fn.hpp.

◆ fast_sqrtd()

double m::fast_sqrtd ( double  n)
inline

Definition at line 801 of file fn.hpp.

◆ fast_sqrtf()

float m::fast_sqrtf ( float  n)
inline

Definition at line 795 of file fn.hpp.

◆ fill_uniform()

template<typename T , typename Generator = std::mt19937_64>
std::enable_if_t< std::is_arithmetic_v< T >, void > M_EXPORT m::fill_uniform ( T column_ptr,
std::vector< T values,
std::size_t  begin,
std::size_t  end,
Generator &&  g = Generator() 
)

Fills column at address column_ptr from begin-th row (including) to end-th row (excluding) with data from values.

Initially, shuffles values with g as URBG. Then, uses each value of values exactly once. After all elements of values were used exactly once, shuffles values again with g as URBG and repeats.

Definition at line 30 of file store_manip.hpp.

References M_insist.

Referenced by generate_training_suite_filter(), generate_training_suite_group_by(), and generate_training_suite_join().

◆ FNV1a() [1/2]

uint64_t m::FNV1a ( const char *  c_str)
inline

Definition at line 46 of file fn.hpp.

Referenced by m::StrHash::operator()().

◆ FNV1a() [2/2]

uint64_t m::FNV1a ( const char *  c_str,
std::size_t  len 
)
inline

Definition at line 58 of file fn.hpp.

References and.

◆ generate_column_data()

void m::generate_column_data ( void *  column_ptr,
const Attribute attr,
std::size_t  num_distinct_values,
std::size_t  begin,
std::size_t  end 
)

Generates data for the column at address column_ptr from begin-th row (including) to end-th row (excluding) and writes it directly to memory.

The rows must have been allocated before calling this function.

Definition at line 240 of file store_manip.cpp.

References CASE, generate_primary_keys(), M_insist, M_unreachable, m::Attribute::name, streq(), and m::Attribute::type.

◆ generate_correlated_column_data()

void m::generate_correlated_column_data ( void *  left_ptr,
void *  right_ptr,
const Attribute attr,
std::size_t  num_distinct_values_left,
std::size_t  num_distinct_values_right,
std::size_t  count_left,
std::size_t  count_right,
std::size_t  num_distinct_values_matching 
)

Generates data for two columns at addresses left_ptr and right_ptr correlated by num_distinct_values_matching and writes the data directly to memory.

The rows must have been allocated before calling this function.

Definition at line 280 of file store_manip.cpp.

References CASE, M_unreachable, m::Attribute::name, streq(), and m::Attribute::type.

◆ generate_primary_keys()

void m::generate_primary_keys ( void *  column_ptr,
const Type type,
std::size_t  begin,
std::size_t  end 
)

Generates primary keys of Type type for the begin-th row (including) to the end-th row (excluding) of column at address column_ptr.

Definition at line 216 of file store_manip.cpp.

References m::Type::is_integral(), M_insist, and M_unreachable.

Referenced by generate_column_data(), generate_training_suite_filter(), generate_training_suite_group_by(), and generate_training_suite_join().

◆ get_as() [1/2]

template<typename T , typename... Us>
const T & m::get_as ( const std::variant< Us... > &  v)

Definition at line 287 of file fn.hpp.

References M_notnull, and T().

◆ get_as() [2/2]

template<typename T , typename... Us>
T & m::get_as ( std::variant< Us... > &  v)

Definition at line 281 of file fn.hpp.

References M_notnull, and T().

◆ get_home_path()

std::filesystem::path m::get_home_path ( )
inline

Returns path of the user's home directory.

Definition at line 597 of file fn.hpp.

Referenced by main().

◆ get_name()

char const * m::get_name ( const TokenType  tt)
inline

Definition at line 17 of file TokenType.hpp.

◆ get_pagesize()

std::size_t m::get_pagesize ( )

Returns the page size of the system.

Definition at line 142 of file fn.cpp.

Referenced by m::list_allocator::aligned_mmap(), m::WasmEngine::WasmContext::install_guard_page(), and m::list_allocator::list_allocator().

◆ get_runtime_type() [1/2]

template<typename T >
const PrimitiveType *M_EXPORT m::get_runtime_type ( )

Returns the internal runtime Type of mu*t*able for the compile-time type T.

Definition at line 559 of file Type.hpp.

References m::Type::Get_Double(), m::Type::Get_Float(), m::Type::Get_Integer(), and T().

◆ get_runtime_type() [2/2]

template<typename T >
const PrimitiveType * m::get_runtime_type ( )

Returns the internal runtime Type of mu*t*able for the compile-time type T.

Definition at line 559 of file Type.hpp.

References m::Type::Get_Double(), m::Type::Get_Float(), m::Type::Get_Integer(), and T().

◆ html_escape()

std::string m::html_escape ( std::string  str)

Escapes special characters in a string to be printable in HTML documents.

Primarily used for DOT.

Definition at line 60 of file fn.cpp.

References replace_all().

Referenced by m::Operator::dot(), and m::QueryGraph::dot_recursive().

◆ init()

bool m::init ( void  )

Initializes the mu*t*able library.

Must be called before the library may be used.

Returns
true on initialization success, false otherwise

Definition at line 23 of file mutable.cpp.

References m::version::get(), and streq().

Referenced by m::wasm::Module::emit_global(), m::wasm::Variable< T, Kind, CanBeNull, L >::init(), and m::wasm::USING_N().

◆ instruction_from_string()

std::unique_ptr< Instruction > m::instruction_from_string ( Diagnostic diag,
const std::string &  str 
)

Use lexer and parser to create an Instruction from str.

Definition at line 97 of file mutable.cpp.

References m::Catalog::Get(), m::Catalog::get_pool(), M_insist, M_TIME_EXPR, m::Diagnostic::num_errors(), m::ast::Parser::parse_Instruction(), and m::Catalog::timer().

◆ interpret()

std::string m::interpret ( const std::string &  str,
char  esc = '\\',
char  quote = '"' 
)
inline

◆ intersect()

template<typename Container , typename Set >
bool M_EXPORT m::intersect ( const Container &  first,
const Set &  second 
)

Checks whether first and second intersect.

Definition at line 417 of file fn.hpp.

◆ is_alnum()

bool m::is_alnum ( int  c)
inline

Definition at line 594 of file fn.hpp.

Referenced by context_len(), and m::ast::Lexer::read_keyword_or_identifier().

◆ is_alpha()

bool m::is_alpha ( int  c)
inline

Definition at line 593 of file fn.hpp.

Referenced by m::ast::Lexer::next().

◆ is_comparable()

bool m::is_comparable ( const Type first,
const Type second 
)
inline

◆ is_convertible() [1/2]

template<typename T >
bool M_EXPORT m::is_convertible ( const Type attr)

Definition at line 531 of file Type.hpp.

◆ is_convertible() [2/2]

template<typename T >
bool m::is_convertible ( const Type ty)

Definition at line 531 of file Type.hpp.

◆ is_dec()

bool m::is_dec ( int  c)
inline

◆ is_hex()

bool m::is_hex ( int  c)
inline

Definition at line 590 of file fn.hpp.

Referenced by m::ast::Lexer::read_number().

◆ is_lower()

bool m::is_lower ( int  c)
inline

Definition at line 591 of file fn.hpp.

◆ is_oct()

bool m::is_oct ( int  c)
inline

Definition at line 588 of file fn.hpp.

Referenced by m::ast::Lexer::read_number().

◆ Is_Page_Aligned()

std::size_t m::Is_Page_Aligned ( std::size_t  n)
inline

Returns true iff n is a integral multiple of the page size (in bytes).

Definition at line 700 of file fn.hpp.

Referenced by m::memory::LinearAllocator::allocate(), m::wasm::detail::create_env(), m::WasmEngine::WasmContext::install_guard_page(), m::memory::Memory::map(), and m::WasmEngine::WasmContext::map_table().

◆ is_pow_2()

template<typename T >
requires unsigned_integral<T>
M_EXPORT constexpr bool m::is_pow_2 ( T  n)
constexpr

◆ is_range_wide_enough()

template<typename T >
constexpr bool M_EXPORT m::is_range_wide_enough ( T  a,
T  b,
std::size_t  n 
)
constexpr

Checks whether the range [a, b] contains at least n distinct values.

Definition at line 735 of file fn.hpp.

◆ is_upper()

bool m::is_upper ( int  c)
inline

Definition at line 592 of file fn.hpp.

◆ isspace() [1/2]

bool m::isspace ( const char *  s)
inline

Definition at line 627 of file fn.hpp.

◆ isspace() [2/2]

bool m::isspace ( const char *  s,
std::size_t  len 
)
inline

Returns true iff the character sequence only consists of white spaces.

Definition at line 622 of file fn.hpp.

Referenced by main().

◆ kmeans()

std::vector< unsigned > M_EXPORT m::kmeans ( const Eigen::MatrixXf &  data,
unsigned  k 
)
inline

Clusters the given data according to the k-means algorithm.

The k clusters are represented by k unique integers (usually from the range [0, k)). The k-means algorithm assigns an integer label to each data point, identifying to which cluster the data point is assigned. See https://en.wikipedia.org/wiki/K-means_clustering.

Parameters
datathe data to cluster, as Eigen::Matrix; rows are data points, columns are attributes of data points
kthe number of clusters to form (more like an upper bound, as clusters may be empty)
Returns
a std::vector<unsigned> assigning a label to each data point

Definition at line 43 of file Kmeans.hpp.

References kmeans_with_centroids().

◆ kmeans_plus_plus()

MatrixRXf M_EXPORT m::kmeans_plus_plus ( const Eigen::MatrixXf &  data,
unsigned  k 
)

Compute initial cluster centroids using k-means++ algorithm.

See https://en.wikipedia.org/wiki/K-means%2B%2B.

Parameters
datathe data to cluster, as Eigen::Matrix; rows are data points, columns are attributes of data points
kthe number of initial centroids to compute
Returns
a MatrixRXf of k data points (rows) chosen as the k initial centroids for k-means

◆ kmeans_with_centroids()

std::pair< std::vector< unsigned >, MatrixRXf > M_EXPORT m::kmeans_with_centroids ( const Eigen::MatrixXf &  data,
unsigned  k 
)

Clusters the given data according to the k-means algorithm.

The k clusters are represented by k unique integers (usually from the range [0, k)). The k-means algorithm assigns an integer label to each data point, identifying to which cluster the data point is assigned. See https://en.wikipedia.org/wiki/K-means_clustering.

Parameters
datathe data to cluster, as Eigen::Matrix; rows are data points, columns are attributes of data points
kthe number of clusters to form (more like an upper bound, as clusters may be empty)
Returns
a std::pair of a std::vector<unsigned> assigning a label to each data point and an Eigen::Matrix of k rows with the centroids of the formed clusters

Referenced by m::Spn::create_sum(), and kmeans().

◆ least_subset()

SmallBitset m::least_subset ( SmallBitset  S)
inline

Returns the least subset of a given set, i.e. the set represented by the lowest 1 bit.

Definition at line 267 of file ADT.hpp.

Referenced by m::AdjacencyMatrix::for_each_CSG_undirected(), PEall::operator()(), DPsizeSub::operator()(), DPsub::operator()(), DPsubOpt::operator()(), and TDbasic::PlanGen().

◆ like()

bool m::like ( const std::string &  str,
const std::string &  pattern,
const char  escape_char = '\\' 
)

Compares a SQL-style LIKE pattern with the given std::string.

Definition at line 68 of file fn.cpp.

References and, and M_insist.

Referenced by m::wasm::like(), and m::StackMachine::operator()().

◆ load_from_CSV()

void m::load_from_CSV ( Diagnostic diag,
Table table,
const std::filesystem::path &  path,
std::size_t  num_rows = std::numeric_limits<std::size_t>::max(),
bool  has_header = false,
bool  skip_header = false 
)

Loads a CSV file into a Table.

Parameters
diagthe diagnostic object
tablethe table to load the data into
paththe path to the CSV file
num_rowsthe number of rows to load from the CSV file
has_headerwhether the CSV file contains a header
skip_headerwhether to ignore the header

Definition at line 385 of file mutable.cpp.

References m::Diagnostic::clear(), m::DSVReader::Config::CSV(), m::Diagnostic::e(), m::Diagnostic::err(), and m::Diagnostic::num_errors().

◆ logical_plan_from_statement()

std::unique_ptr< Consumer > m::logical_plan_from_statement ( Diagnostic diag,
const ast::SelectStmt stmt,
std::unique_ptr< Consumer consumer 
)

Optimizes the given SelectStmt.

Result tuples are passed to the given consumer. Returns the logical plan.

Definition at line 322 of file mutable.cpp.

References m::QueryGraph::Build(), m::Catalog::cost_function(), m::Catalog::Get(), M_TIME_EXPR, m::Catalog::plan_enumerator(), and m::Catalog::timer().

Referenced by execute_query().

◆ M_DECLARE_VISITOR() [1/4]

m::M_DECLARE_VISITOR ( DatabaseCommandVisitor  ,
DatabaseCommand  ,
M_DATABASE_COMMAND_LIST   
)

◆ M_DECLARE_VISITOR() [2/4]

m::M_DECLARE_VISITOR ( OperatorVisitor  ,
Operator  ,
M_OPERATOR_LIST   
)

◆ M_DECLARE_VISITOR() [3/4]

m::M_DECLARE_VISITOR ( PhysOptVisitor  ,
PhysicalOptimizer  ,
M_PHYS_OPT_LIST   
)

◆ M_DECLARE_VISITOR() [4/4]

m::M_DECLARE_VISITOR ( TypeVisitor  ,
Type  ,
M_TYPE_LIST   
)

◆ M_MAKE_STL_VISITABLE() [1/2]

const M_OPERATOR_LIST m::M_MAKE_STL_VISITABLE ( PostOrderOperatorVisitor  ,
Operator  ,
M_OPERATOR_LIST   
)

◆ M_MAKE_STL_VISITABLE() [2/2]

m::M_MAKE_STL_VISITABLE ( PreOrderOperatorVisitor  ,
Operator  ,
M_OPERATOR_LIST   
)

◆ M_OPERATOR_LIST()

m::M_OPERATOR_LIST ( DECLARE  ) &

References M_OPERATOR_LIST.

◆ M_PHYS_OPT_LIST()

m::M_PHYS_OPT_LIST ( DECLARE  )

A PhysicalOperator represents a physical operation in a query plan.

A single PhysicalOperator may combine multiple logical Operators according to the specified

Template Parameters
Pattern.

◆ M_WASM_OPERATOR_LIST_NON_TEMPLATED()

m::M_WASM_OPERATOR_LIST_NON_TEMPLATED ( DECLARE  )

Definition at line 329 of file WasmOperator.hpp.

◆ make_unsharable_shared()

template<typename T , typename... Args>
unsharable_shared_ptr< T > m::make_unsharable_shared ( Args &&...  args)

Definition at line 96 of file unsharable_shared_ptr.hpp.

References args, and T().

◆ mul_wo_overflow()

template<typename T , typename U >
auto M_EXPORT m::mul_wo_overflow ( T  left,
U  right 
)

Definition at line 664 of file fn.hpp.

◆ murmur3_64()

uint64_t m::murmur3_64 ( uint64_t  v)
inline

This function implements the 64-bit finalizer of Murmur3_x64 by Austin Appleby, available at https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp .

We use the optimized constants found by David Stafford, in particular the values for Mix01, as reported at http://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html .

Parameters
vthe value to mix
Returns
the mixed bits

Definition at line 466 of file fn.hpp.

Referenced by m::ConditionPropertyMap< Property, Ordered >::IdentifierHash::operator()(), and m::SubproblemHash::operator()().

◆ n_choose_k_approx()

template<typename T >
std::enable_if_t< std::is_integral_v< T >, unsigned long long > M_EXPORT m::n_choose_k_approx ( T  n,
T  k 
)

◆ next_subset()

SmallBitset m::next_subset ( SmallBitset  subset,
SmallBitset  set 
)
inline

Returns the next subset of a given subset and `set.

Definition at line 270 of file ADT.hpp.

References subset().

Referenced by m::AdjacencyMatrix::for_each_CSG_undirected(), PEall::operator()(), DPsizeSub::operator()(), DPsub::operator()(), DPsubOpt::operator()(), and TDbasic::PlanGen().

◆ operator&() [1/2]

Schema m::operator& ( const Schema left,
const Schema right 
)
inline

Computes the set intersection of two Schemas.

Merges the constraints of left and right.

Definition at line 258 of file Schema.hpp.

References m::Schema::end(), and m::Schema::find().

◆ operator&() [2/2]

constexpr T m::operator& ( T  left,
T  right 
)
constexpr

Definition at line 28 of file enum_ops.hpp.

References T(), and U.

◆ operator&=()

constexpr T & m::operator&= ( T left,
T  right 
)
constexpr

Definition at line 68 of file enum_ops.hpp.

References T().

◆ operator+() [1/2]

Schema m::operator+ ( const Schema left,
const Schema right 
)
inline

Definition at line 250 of file Schema.hpp.

Referenced by m::wasm::operator+().

◆ operator+() [2/2]

StringView m::operator+ ( const StringView left,
const StringView right 
)
inline

Definition at line 78 of file StringView.hpp.

◆ operator-()

constexpr T m::operator- ( T  left,
T  right 
)
constexpr

Definition at line 41 of file enum_ops.hpp.

References T(), and U.

Referenced by m::wasm::operator-().

◆ operator-=()

constexpr T & m::operator-= ( T left,
T  right 
)
constexpr

Definition at line 75 of file enum_ops.hpp.

References T().

◆ operator<<() [1/4]

M_LCOV_EXCL_START std::ostream & m::operator<< ( std::ostream &  os,
const TokenType  tt 
)
inline

Definition at line 49 of file TokenType.hpp.

◆ operator<<() [2/4]

M_LCOV_EXCL_START std::ostream & m::operator<< ( std::ostream &  out,
const ArgParser AP 
)
inline

Definition at line 147 of file ArgParser.hpp.

References m::ArgParser::print_args().

◆ operator<<() [3/4]

template<typename Actual >
M_LCOV_EXCL_START std::ostream & m::operator<< ( std::ostream &  out,
const PlanTableBase< Actual > &  PT 
)

◆ operator<<() [4/4]

template<typename T , typename... Args>
std::ostream &M_EXPORT m::operator<< ( std::ostream &  out,
const std::variant< T, Args... >  value 
)

Definition at line 448 of file fn.hpp.

◆ operator|() [1/2]

Schema m::operator| ( const Schema left,
const Schema right 
)
inline

Definition at line 272 of file Schema.hpp.

◆ operator|() [2/2]

constexpr T m::operator| ( T  left,
T  right 
)
constexpr

Definition at line 16 of file enum_ops.hpp.

References T(), and U.

◆ operator|=()

constexpr T & m::operator|= ( T left,
T  right 
)
constexpr

Definition at line 61 of file enum_ops.hpp.

References T().

◆ operator~()

constexpr T m::operator~ ( T  t)
constexpr

Definition at line 53 of file enum_ops.hpp.

References T(), and U.

◆ overloaded()

template<class... Ts>
m::overloaded ( Ts...  ) -> overloaded< Ts... >

◆ pattern_to_regex()

std::regex m::pattern_to_regex ( const char *  pattern,
const bool  optimize = false,
const char  escape_char = '\\' 
)
inline

Transforms a SQL-style LIKE pattern into a std::regex.

Definition at line 328 of file fn.hpp.

Referenced by m::StackMachineBuilder::operator()().

◆ physical_plan_from_logical_plan() [1/2]

std::unique_ptr< MatchBase > m::physical_plan_from_logical_plan ( Diagnostic diag,
const Consumer logical_plan 
)

Computes a physical plan from the given logical plan.

The Backend is automatically created.

Definition at line 336 of file mutable.cpp.

References m::Catalog::Get(), M_TIME_EXPR, and physical_plan_from_logical_plan().

Referenced by execute_query(), and physical_plan_from_logical_plan().

◆ physical_plan_from_logical_plan() [2/2]

std::unique_ptr< MatchBase > m::physical_plan_from_logical_plan ( Diagnostic diag,
const Consumer logical_plan,
const Backend backend 
)

◆ powi()

template<integral T, unsigned_integral U>
T M_EXPORT m::powi ( const T  base,
const U  exp 
)

◆ process_stream()

void m::process_stream ( std::istream &  in,
const char *  filename,
Diagnostic  diag 
)

◆ prod_wo_overflow() [1/2]

template<typename N0 , typename N1 >
auto M_EXPORT m::prod_wo_overflow ( N0  n0,
N1  n1 
)

Definition at line 680 of file fn.hpp.

◆ prod_wo_overflow() [2/2]

template<typename N0 , typename N1 , typename... Numbers>
auto M_EXPORT m::prod_wo_overflow ( N0  n0,
N1  n1,
Numbers...  numbers 
)

Returns the product of the given parameters.

In case the multiplication overflows, the maximal numeric value for the common type is returned.

Definition at line 688 of file fn.hpp.

◆ projecting_iterator()

template<typename It , typename Fn >
m::projecting_iterator ( It  ,
Fn &&   
) -> projecting_iterator< It, std::invoke_result_t< Fn &&, It >(It)>

◆ qsort()

template<typename Partitioning , typename It >
void m::qsort ( It  begin,
It  end,
Partitioning  p 
)

Definition at line 63 of file algorithms.hpp.

References M_insist, qsort(), swap(), and verify_partition().

Referenced by qsort().

◆ quote()

std::string m::quote ( const std::string &  str)
inline

Definition at line 306 of file fn.hpp.

Referenced by m::DSVReader::discard_cell(), escape(), interpret(), unescape(), and unquote().

◆ rdc()

float m::rdc ( const Eigen::MatrixXf &  X,
const Eigen::MatrixXf &  Y,
unsigned  k = 5,
float  stddev = 1.f/6.f 
)

Compute the Randomized Dependence Coefficient of two random variables.

The Randomized Dependence Coefficient is a measure of non-linear dependence between random variables of arbitrary dimension based on the Hirschfeld-Gebelein-Renyi Maximum Correlation Coefficient. See https://papers.nips.cc/paper/2013/file/aab3238922bcc25a6f606eb525ffdc56-Paper.pdf.

Parameters
Xthe first random variable as Eigen::Matrix; rows are observations of variables, columns are variables
Ythe second random variable as Eigen::Matrix; rows are observations of variables, columns are variables
knumber of random non-linear projections
stddevstandard deviation of the normal distribution for random linear projections
Returns
value in the range of [0,1] showing the dependence of two random variables (0 = independent, 1 = dependent)

Definition at line 78 of file RDC.cpp.

References create_CDF_matrix(), M_insist, rdc_precomputed_CDF(), and X.

◆ rdc_precomputed_CDF()

template<typename URBG = std::mt19937_64>
float m::rdc_precomputed_CDF ( Eigen::MatrixXf &  CDFs_of_X,
Eigen::MatrixXf &  CDFs_of_Y,
unsigned  k = 5,
float  stddev = 1.f/6.f,
URBG &&  g = URBG() 
)

Compute the RDC value without having to compute CDF matrices to avoid sorting the same data multiple times.

Referenced by rdc().

◆ register_wasm_operators()

void m::register_wasm_operators ( PhysicalOptimizer phys_opt)

Registers physical Wasm operators in phys_opt depending on the set CLI options.

Definition at line 542 of file WasmOperator.cpp.

References m::PhysicalOptimizer::register_operator().

Referenced by m::WasmBackend::register_operators().

◆ regression_linear_closed_form()

Eigen::VectorXd m::regression_linear_closed_form ( const Eigen::MatrixXd &  X,
const Eigen::VectorXd &  y 
)

Use closed-form solution for linear regression.

Parameters
Xthe feature matrix
ythe target vector
Returns
a vector of coefficients that represent the linear model

Definition at line 14 of file eigen_meta.hpp.

References X.

Referenced by m::LinearModel::LinearModel().

◆ replace_all()

std::string m::replace_all ( std::string  str,
const std::string &  from,
const std::string &  to 
)
inline

◆ sequence_number() [1/2]

uint64_t m::sequence_number ( double  x)
inline

This function assigns an integral sequence number to each double that is not NaN, such that if y = std::nextafter(x, INF) then sequence_number(y) = sequence_number(x) + 1.

Taken from https://stackoverflow.com/a/47184081/3029188

Definition at line 708 of file fn.hpp.

◆ sequence_number() [2/2]

uint32_t m::sequence_number ( float  x)
inline

This function assigns an integral sequence number to each float that is not NaN, such that if y = std::nextafter(x, INF) then sequence_number(y) = sequence_number(x) + 1.

Inspired by https://stackoverflow.com/a/47184081/3029188 and adapted to float.

Definition at line 722 of file fn.hpp.

◆ set_all_not_null()

void m::set_all_not_null ( uint8_t *  column_ptr,
std::size_t  num_attrs,
std::size_t  begin,
std::size_t  end 
)

Sets all attributes of the begin-th row (including) to the end-th row (excluding) of column at address column_ptr to NOT NULL.

Definition at line 190 of file store_manip.cpp.

References M_insist.

Referenced by generate_training_suite_filter(), generate_training_suite_group_by(), and generate_training_suite_join().

◆ set_all_null()

void m::set_all_null ( uint8_t *  column_ptr,
std::size_t  num_attrs,
std::size_t  begin,
std::size_t  end 
)

Sets all attributes of the begin-th row (including) to the end-th row (excluding) of column at address column_ptr to NULL.

Definition at line 165 of file store_manip.cpp.

References M_insist.

◆ setbit()

template<typename T >
void M_EXPORT m::setbit ( T bytes,
bool  value,
uint32_t  n 
)

◆ statement_from_string()

std::unique_ptr< Stmt > m::statement_from_string ( Diagnostic diag,
const std::string &  str 
)

◆ strdupn()

const char * m::strdupn ( const char *  str)
inline

A wrapper around strdup() that permits nullptr.

Definition at line 694 of file fn.hpp.

◆ streq()

bool m::streq ( const char *  first,
const char *  second 
)
inline

◆ strneq()

bool m::strneq ( const char *  first,
const char *  second,
std::size_t  n 
)
inline

Definition at line 30 of file fn.hpp.

References M_notnull.

Referenced by hook_completion(), hook_hint(), and m::ArgParser::parse_args().

◆ subset()

template<typename Container , typename Set >
bool M_EXPORT m::subset ( const Container &  subset,
const Set &  set 
)

Checks whether subset is a subset of set.

Definition at line 406 of file fn.hpp.

References subset().

Referenced by next_subset(), and subset().

◆ sum_wo_overflow() [1/2]

template<typename N0 , typename N1 >
auto M_EXPORT m::sum_wo_overflow ( N0  n0,
N1  n1 
)

Definition at line 649 of file fn.hpp.

◆ sum_wo_overflow() [2/2]

template<typename N0 , typename N1 , typename... Numbers>
auto M_EXPORT m::sum_wo_overflow ( N0  n0,
N1  n1,
Numbers...  numbers 
)

Returns the sum of the given parameters.

In case the addition overflows, the maximal numeric value for the common type is returned.

Definition at line 657 of file fn.hpp.

◆ swap()

template<typename Actual >
void m::swap ( PlanTableBase< Actual > &  first,
PlanTableBase< Actual > &  second 
)

◆ T()

m::T ( ) { x & x } -> std::same_as<std::underlying_type_t<T>>

References T().

Referenced by MockInterface::_load(), _notnull(), MockInterface::_store(), m::wasm::Environment::add_predicate(), m::wasm::all_true(), m::allocator< Actual >::allocate(), m::wasm::and(), m::wasm::any_true(), m::Value::as(), m::memory::Memory::as(), m::memory::AddressSpace::as(), m::DatabaseCommand::ast(), m::wasm::BINARY(), m::wasm::bitmask(), m::wasm::broadcast(), m::wasm::can_be_null(), m::wasm::compare(), m::wasm::ExprCompiler::compile(), m::wasm::Environment::compile(), m::wasm::compile_data_layout_point_access(), m::wasm::convert(), m::allocator< Actual >::deallocate(), m::unsharable_shared_ptr< T >::default_deleter(), m::wasm::discard(), m::wasm::Module::emit_import(), m::wasm::Module::emit_select(), m::wasm::Module::emit_shuffle_lanes(), m::wasm::ChainedHashTable< IsGlobal >::entry(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::entry(), m::wasm::ChainedHashTable< IsGlobal >::equal_key(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::equal_key(), m::wasm::Aggregation::execute(), m::wasm::HashBasedGrouping::execute(), m::wasm::HashBasedGroupJoin::execute(), m::wasm::OrderedGrouping::execute(), m::wasm::Projection::execute(), m::wasm::SimpleHashJoin< UniqueBuild, Predicated >::execute(), m::InsertRecords::execute(), execute_statement(), m::wasm::Expr< T, L >::Expr(), m::wasm::Environment::extract(), m::wasm::Environment::extract_addr(), m::wasm::Environment::extract_predicate(), m::wasm::extract_unsafe(), m::wasm::Allocator::free(), generate_training_suite_filter(), generate_training_suite_group_by(), generate_training_suite_join(), m::wasm::ExprCompiler::get(), m::PODPool< const char *, StrHash, StrEqual, StrClone, false >::Get(), m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::Get(), m::wasm::Environment::get(), m::wasm::Environment::get_addr(), get_as(), m::wasm::Environment::get_predicate(), get_runtime_type(), m::wasm::ChainedHashTable< IsGlobal >::insert_key(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::insert_key(), m::wasm::is_null(), is_pow_2(), m::SpnWrapper::learn_spn_table(), m::wasm::make_literal(), make_unsharable_shared(), m::wasm::Allocator::malloc(), m::MinCutAGaT::min_cut_advanced_generate_and_test(), m::wasm::murmur3_64a_hash(), m::wasm::not_null(), m::wasm::Expr< T, L >::Null(), m::OptField< StaticConfig::PerformCostBasedPruning, double >::operator const double &(), m::Pooled< T, Pool, CanBeNone >::operator const T &(), m::Pooled< T, Pool, CanBeNone >::operator const T *(), m::OptField< StaticConfig::PerformCostBasedPruning, double >::operator double &(), m::wasm::HashTable::operator T(), m::Value::operator T*(), m::wasm::operator!=(), operator&(), operator&=(), m::wasm::detail::wasm_type_helper< T, 1 >::operator()(), m::wasm::ExprCompiler::operator()(), m::partition_predicated_naive::operator()(), m::__virtual_crtp_helper< Tag, Const >::returns< ReturnType >::crtp_args< CRTPArgs >::args< Args >::derived_type_helper< true, Actual, T >::operator()(), m::__virtual_crtp_helper< Tag, Const >::returns< ReturnType >::crtp_args< CRTPArgs >::args< Args >::derived_type_helper< false, Actual, T >::operator()(), m::wasm::buffer_swap_proxy_t< IsGlobal >::operator()(), m::OptField< Condition, T >::operator*(), m::Pooled< T, Pool, CanBeNone >::operator*(), m::wasm::operator-(), operator-(), operator-=(), m::OptField< Condition, T >::operator->(), m::Pooled< T, Pool, CanBeNone >::operator->(), m::wasm::operator<(), m::wasm::operator<<(), m::wasm::operator<=(), m::OptField< Condition, T >::operator=(), m::pe::hs::search_states::SubproblemTableBottomUp::operator==(), m::wasm::operator==(), m::wasm::operator>(), m::wasm::operator>=(), operator|(), operator|=(), operator~(), powi(), m::wasm::Allocator::pre_malloc(), m::wasm::PrimitiveExpr(), m::wasm::Allocator::raw_malloc(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::rehash(), m::wasm::reinterpret(), m::wasm::replace(), m::wasm::ReturnL(), setbit(), m::wasm::signum(), m::wasm::sizeof(), m::wasm::Expr< T, L >::swizzle_bytes(), m::wasm::swizzle_lanes(), T(), m::wasm::HashTable::the_entry< IsConst >::the_entry(), type_check(), m::wasm::USING_N(), m::wasm::ChainedHashTable< IsGlobal >::value_entry(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::value_entry(), and verify_partition().

◆ to_string()

std::string m::to_string ( const TokenType  tt)
inline

◆ type_check()

template<typename T >
bool m::type_check ( const Attribute attr)

Checks that the type of the attr matches the template type T.

Throws std::logic_error on error.

Definition at line 337 of file Schema.hpp.

References and, T(), and m::Attribute::type.

◆ unescape()

std::string m::unescape ( const std::string &  str,
char  esc = '\\',
char  quote = '"' 
)

Definition at line 35 of file fn.cpp.

References quote().

Referenced by execute_statement(), and interpret().

◆ unquote()

std::string m::unquote ( const std::string &  str,
char  quote = '"' 
)
inline

Definition at line 308 of file fn.hpp.

References quote().

Referenced by interpret().

◆ verify_partition()

template<typename It >
bool m::verify_partition ( It  begin,
It  mid,
It  end 
)

Verifies that mid splits the range begin to end (exclusive) into two partitions.

Returns
true iff mid splits the range begin to end (exclusive) into two partitions.

Definition at line 19 of file algorithms.hpp.

References M_insist, and T().

Referenced by qsort().

◆ view() [1/2]

template<typename It , typename Fn >
m::view ( It  ,
It  ,
Fn &&   
) -> view< It, std::invoke_result_t< Fn &&, It >(It)>

◆ view() [2/2]

template<typename It , typename Fn >
m::view ( range< It >  ,
Fn &&   
) -> view< It, std::invoke_result_t< Fn &&, It >(It)>

◆ visit()

template<typename Callable , typename Visitor , typename Base , typename... Hierarchy>
auto m::visit ( Callable &&  callable,
Base &  obj,
m::tag< Callable > &&  = m::tag<Callable>() 
)

Generic implementation to visit a class hierarchy, with similar syntax as std::visit.

This generic implementation is meant to be instantiated once for each class hierarchy that should be m::visit()-able. The class hierarchy must provide a

Template Parameters
Visitorimplementing our m::Visitor base class.

The unnamed third parameter is used for tag dispatching to select a particular visitor to apply. This is very useful if, for example, you have a compositor pattern implementing a tree structure of objects and you want to provide pre-order and post-order visitors. These iterators inherit from Visitor base and implement the pre- or post-order traversal. You can then call to m::visit() and provide m::tag<MyPreOrderVisitor> to select the desired traversal order.

For an example of how to implement and use the tag dispatch, see Expr::get_required() and ConstPreOrderExprVisitor.

‍compute the result type as the common type of the return types of all visitor applications

Definition at line 138 of file Visitor.hpp.

Referenced by m::wasm::and(), m::idx::ArrayIndex< Key >::bulkload(), m::ClauseInfo::ClauseInfo(), m::wasm::compile_data_layout_point_access(), m::ast::Sema::compose_of(), m::Optimizer::compute_projections_required_for_order_by(), m::Operator::dot(), m::wasm::ChainedHashTable< IsGlobal >::entry(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::entry(), m::wasm::ChainedHashTable< IsGlobal >::equal_key(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::equal_key(), m::wasm::Aggregation::execute(), m::wasm::OrderedGrouping::execute(), m::wasm::Projection::execute(), execute_statement(), get_aggregates(), m::ast::Expr::get_required(), index_scan_resolve_attribute_type(), m::wasm::ChainedHashTable< IsGlobal >::insert_key(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::insert_key(), m::ast::Sema::is_composable_of(), is_composable_of(), m::wasm::ExprCompiler::operator()(), WeighExpr::operator()(), m::wasm::Projection::pre_condition(), m::Value::print(), m::wasm::detail::read_result_set(), m::PhysicalOptimizer::register_operator(), m::wasm::ChainedHashTable< IsGlobal >::value_entry(), and m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::value_entry().

Variable Documentation

◆ and

template<typename T >
requires (std::underlying_type_t<T> x)
m::and
Initial value:
{
{ x | x } -> std::same_as<std::underlying_type_t<T>>

Definition at line 11 of file enum_ops.hpp.

Referenced by m::list_allocator::allocate(), m::wasm::and(), m::detail::reader_writer_mutex_internal::can_acquire_read_lock(), m::detail::reader_writer_mutex_internal::can_acquire_write_lock(), m::detail::reader_writer_mutex_internal::can_upgrade_lock(), compile_cnf(), compile_data_layout(), m::ast::Sema::compose_of(), compute_aggregate_info(), m::Optimizer::compute_projections_required_for_order_by(), m::Optimizer::construct_join_order(), m::sorted_vector< T, Compare >::contains(), m::Spn::create_sum(), m::memory::LinearAllocator::deallocate(), decompose_equi_predicate(), m::Operator::dot(), m::QueryGraph::dot_recursive(), m::Catalog::drop_database(), m::QueryGraph::dump(), emplace_back(), emplace_back_unique(), m::Spn::ContinuousLeaf::evaluate(), extract_index_scan_bounds(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::find(), m::ConditionPropertyMap< Property, Ordered >::find(), FNV1a(), m::wasm::fnv_1a(), generate_training_suite_join(), m::list_allocator::insert_chunk_sorted(), m::Timer::Measurement::is_active(), is_comparable(), m::ast::Sema::is_composable_of(), is_composable_of(), m::Type::is_double(), m::Timer::Measurement::is_finished(), m::Type::is_float(), m::Attribute::is_unique(), is_valid_bound(), like(), load_plugins(), m::idx::RecursiveModelIndex< Key >::lower_bound_exponential_search(), main(), m::storage::PAXLayoutFactory::make(), m::ast::Lexer::next(), m::TrainedCostFunction::operator()(), m::pe::hs::expansions::BottomUpComplete::operator()(), m::pe::hs::heuristics::avg_sel< PlanTable, State, BottomUp >::operator()(), CNFGenerator::operator()(), LinearizedDP::operator()(), m::DSVReader::operator()(), m::StackMachine::operator()(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::the_iterator< C >::operator++(), m::ast::Designator::operator==(), m::ast::UnaryExpr::operator==(), m::ast::BinaryExpr::operator==(), m::doubly_linked_list< T, Allocator >::the_iterator< C >::operator==(), m::Position::operator==(), m::pe::hs::search_states::SubproblemTableBottomUp::the_iterator< IsConst >::operator==(), m::Optimizer::optimize_filter(), m::Optimizer::optimize_plan(), m::Optimizer::optimize_source_plans(), m::ast::Parser::parse_CreateIndexStmt(), TDbasic::PlanGen(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::pop(), m::LinearModel::predict_target(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::print_counters(), m::GraphBuilder::process_selection(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::push(), m::SerialScheduler::CommandQueue::push(), m::ai::StateManager< State, Expand, Heurisitc, HasRegularQueue, HasBeamQueue, Config, Context >::queues_empty(), m::ast::Lexer::read_instruction(), m::ast::Lexer::read_string_literal(), m::wasm::ReturnL(), m::SerialScheduler::schedule_thread(), m::ConcreteTable::schema(), m::ai::genericAStar< State, Expand, Heuristic, StaticConfig, Context >::search(), m::QueryGraph2SQL::translate(), type_check(), m::reader_writer_mutex::unlock_read(), m::reader_writer_mutex::unlock_write(), m::idx::RecursiveModelIndex< Key >::upper_bound_exponential_search(), write_result_set(), and m::wasm::Block::~Block().

◆ Children

m::Children
Initial value:
{
static constexpr bool value = (pattern_validator<Children>::value and ...)
and(sizeof(T)==4) U64x1 reinterpret_to_U64(m
Definition: WasmAlgo.cpp:266

Definition at line 86 of file PhysicalOptimizer.hpp.

Referenced by m::pattern_matcher_recursive< PhysOp, Idx, pattern_t< Op, Children... >, PatternQueue... >::matches().

◆ DatabaseCommand

Definition at line 333 of file DatabaseCommand.hpp.

◆ Operator

const M_OPERATOR_LIST const m::Operator

Definition at line 575 of file Operator.hpp.

◆ param_pack_size_v

template<param_pack P>
constexpr std::size_t m::param_pack_size_v = std::tuple_size_v<detail::as_tuple_t<P>>
constexpr

Returns the size of a parameter pack type.

Template Parameters
P.

Definition at line 177 of file concepts.hpp.

◆ PhysicalOptimizer

Definition at line 392 of file PhysicalOptimizer.hpp.

◆ Type

const m::Type

Definition at line 498 of file Type.hpp.

◆ U

and arithmetic< U > and same_signedness< T, U > m::U