11#ifndef O2_FRAMEWORK_EXPRESSIONS_HELPERS_H_
12#define O2_FRAMEWORK_EXPRESSIONS_HELPERS_H_
16#include <fmt/format.h>
23 using datum_t = std::variant<std::monostate, size_t, LiteralNode::var_t, std::string>;
26 atype::type
type = atype::NA;
30 explicit constexpr DatumSpec(std::string binding,
size_t hash_, atype::type type_) :
datum{binding},
hash{hash_},
type{type_} {}
39 bool eqValue = this->datum == rhs.datum;
41 if (this->datum.index() == 3 && eqValue) {
42 eqHash = this->hash == rhs.hash;
44 bool eqType = this->type == rhs.type;
45 return eqValue && eqHash && eqType;
49std::ostream&
operator<<(std::ostream& os, DatumSpec
const& spec);
58 atype::type
type = atype::NA;
GLint GLint GLsizei GLint GLenum GLenum type
std::ostream & operator<<(std::ostream &os, DatumSpec const &spec)
ColumnOperationSpec(BasicOp op_, size_t index_=0)
ColumnOperationSpec()=default
DatumSpec & operator=(DatumSpec &&)=default
bool operator==(DatumSpec const &rhs) const
constexpr DatumSpec(std::string binding, size_t hash_, atype::type type_)
DatumSpec(DatumSpec &&)=default
std::variant< std::monostate, size_t, LiteralNode::var_t, std::string > datum_t
datum spec either contains an index, a value of a literal or a binding label
DatumSpec & operator=(DatumSpec const &)=default
DatumSpec(DatumSpec const &)=default
constexpr DatumSpec(size_t index, atype::type type_)
constexpr DatumSpec(LiteralNode::var_t literal, atype::type type_)
LiteralValue::stored_type var_t