Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
taehyounpark committed Apr 3, 2024
1 parent a566e1f commit 6829b28
Showing 1 changed file with 21 additions and 29 deletions.
50 changes: 21 additions & 29 deletions include/queryosity/todo_varied.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ class todo<Bld>::varied : public dataflow::node,
virtual std::set<std::string> get_variation_names() const override;

public:
template <typename... Args, typename V = Bld,
std::enable_if_t<queryosity::column::is_evaluatable_v<V>,
bool> = false>
template <
typename... Args, typename V = Bld,
std::enable_if_t<queryosity::column::is_evaluatable_v<V>, bool> = false>
auto evaluate(Args &&...args) ->
typename queryosity::lazy<column::evaluated_t<V>>::varied;

template <typename... Args, typename V = Bld,
std::enable_if_t<queryosity::selection::is_applicable_v<V>,
bool> = false>
template <
typename... Args, typename V = Bld,
std::enable_if_t<queryosity::selection::is_applicable_v<V>, bool> = false>
auto apply(Args &&...args) ->
typename queryosity::lazy<selection::applied_t<V>>::varied;

Expand All @@ -51,8 +51,7 @@ class todo<Bld>::varied : public dataflow::node,
* @return A new todo query node with input columns filled.
*/
template <typename... Nodes, typename V = Bld,
std::enable_if_t<queryosity::query::is_bookable_v<V>,
bool> = false>
std::enable_if_t<queryosity::query::is_bookable_v<V>, bool> = false>
auto fill(Nodes const &...columns) -> varied;

/**
Expand All @@ -61,8 +60,7 @@ class todo<Bld>::varied : public dataflow::node,
* @return Lazy query booked at selection.
*/
template <typename Node, typename V = Bld,
std::enable_if_t<queryosity::query::is_bookable_v<V>,
bool> = false>
std::enable_if_t<queryosity::query::is_bookable_v<V>, bool> = false>
auto at(Node const &selection) -> typename lazy<query::booked_t<V>>::varied;

/**
Expand All @@ -71,8 +69,7 @@ class todo<Bld>::varied : public dataflow::node,
* @return Delayed query containing booked lazy queries.
*/
template <typename... Nodes, typename V = Bld,
std::enable_if_t<queryosity::query::is_bookable_v<V>,
bool> = false>
std::enable_if_t<queryosity::query::is_bookable_v<V>, bool> = false>
auto at(Nodes const &...selections)
-> std::array<typename lazy<query::booked_t<V>>::varied,
sizeof...(Nodes)>;
Expand Down Expand Up @@ -147,13 +144,11 @@ queryosity::todo<Bld>::varied::get_variation_names() const {
}

template <typename Bld>
template <
typename... Args, typename V,
std::enable_if_t<queryosity::column::is_evaluatable_v<V>, bool>>
template <typename... Args, typename V,
std::enable_if_t<queryosity::column::is_evaluatable_v<V>, bool>>
auto queryosity::todo<Bld>::varied::evaluate(Args &&...args) ->
typename queryosity::lazy<column::evaluated_t<V>>::varied {
using varied_type =
typename queryosity::lazy<column::evaluated_t<V>>::varied;
using varied_type = typename queryosity::lazy<column::evaluated_t<V>>::varied;
auto syst = varied_type(
this->nominal().evaluate(std::forward<Args>(args).nominal()...));
for (auto const &var_name :
Expand All @@ -166,15 +161,14 @@ auto queryosity::todo<Bld>::varied::evaluate(Args &&...args) ->
}

template <typename Bld>
template <
typename... Args, typename V,
std::enable_if_t<queryosity::selection::is_applicable_v<V>, bool>>
template <typename... Args, typename V,
std::enable_if_t<queryosity::selection::is_applicable_v<V>, bool>>
auto queryosity::todo<Bld>::varied::apply(Args &&...args) ->
typename queryosity::lazy<selection::applied_t<V>>::varied {
using varied_type =
typename queryosity::lazy<selection::applied_t<V>>::varied;
auto syst = varied_type(
this->nominal().apply(std::forward<Args>(args).nominal()...));
auto syst =
varied_type(this->nominal().apply(std::forward<Args>(args).nominal()...));
for (auto const &var_name :
systematic::get_variation_names(*this, std::forward<Args>(args)...)) {
syst.set_variation(var_name,
Expand Down Expand Up @@ -206,8 +200,8 @@ auto queryosity::todo<Bld>::varied::at(Node const &selection) ->
auto syst = varied_type(this->nominal().at(selection.nominal()));
for (auto const &var_name :
systematic::get_variation_names(*this, selection)) {
syst.set_variation(var_name, this->variation(var_name).at(
selection.variation(var_name)));
syst.set_variation(
var_name, this->variation(var_name).at(selection.variation(var_name)));
}
return syst;
}
Expand All @@ -225,12 +219,10 @@ auto queryosity::todo<Bld>::varied::at(Nodes const &...selections)
auto _book_varied =
[var_names,
this](systematic::resolver<lazy<selection::node>> const &sel) {
auto syst =
varied_type(this->m_df->_at(this->nominal(), sel.nominal()));
auto syst = varied_type(this->nominal().at(sel.nominal()));
for (auto const &var_name : var_names) {
syst.set_variation(var_name,
this->m_df->_at(this->variation(var_name),
sel.variation(var_name)));
syst.set_variation(var_name, this->variation(var_name).book(
sel.variation(var_name)));
}
return syst;
};
Expand Down

0 comments on commit 6829b28

Please sign in to comment.