OmniSciDB  0264ff685a
QueryRewrite.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "QueryRewrite.h"
18 
19 #include <algorithm>
20 #include <memory>
21 #include <vector>
22 
23 #include "ExpressionRange.h"
24 #include "ExpressionRewrite.h"
25 #include "Logger/Logger.h"
26 #include "Parser/ParserNode.h"
27 
29  const RelAlgExecutionUnit& ra_exe_unit_in) const {
30  auto rewritten_exe_unit = rewriteConstrainedByIn(ra_exe_unit_in);
31  return rewriteOverlapsJoin(rewritten_exe_unit);
32 }
33 
35  const RelAlgExecutionUnit& ra_exe_unit_in) const {
37  return ra_exe_unit_in;
38  }
39  if (ra_exe_unit_in.join_quals.empty()) {
40  return ra_exe_unit_in;
41  }
42 
43  std::list<std::shared_ptr<Analyzer::Expr>> quals;
44  quals.insert(quals.end(), ra_exe_unit_in.quals.begin(), ra_exe_unit_in.quals.end());
45 
46  JoinQualsPerNestingLevel join_condition_per_nesting_level;
47  for (const auto& join_condition_in : ra_exe_unit_in.join_quals) {
48  JoinCondition join_condition{{}, join_condition_in.type};
49 
50  for (const auto& join_qual_expr_in : join_condition_in.quals) {
51  auto new_overlaps_quals = rewrite_overlaps_conjunction(join_qual_expr_in);
52  if (new_overlaps_quals) {
53  const auto& overlaps_quals = *new_overlaps_quals;
54 
55  // Add overlaps qual
56  join_condition.quals.insert(join_condition.quals.end(),
57  overlaps_quals.join_quals.begin(),
58  overlaps_quals.join_quals.end());
59 
60  // Add original quals
61  join_condition.quals.insert(join_condition.quals.end(),
62  overlaps_quals.quals.begin(),
63  overlaps_quals.quals.end());
64  } else {
65  join_condition.quals.push_back(join_qual_expr_in);
66  }
67  }
68  join_condition_per_nesting_level.push_back(join_condition);
69  }
70  return {ra_exe_unit_in.input_descs,
71  ra_exe_unit_in.input_col_descs,
72  ra_exe_unit_in.simple_quals,
73  quals,
74  join_condition_per_nesting_level,
75  ra_exe_unit_in.groupby_exprs,
76  ra_exe_unit_in.target_exprs,
77  ra_exe_unit_in.estimator,
78  ra_exe_unit_in.sort_info,
79  ra_exe_unit_in.scan_limit,
80  ra_exe_unit_in.query_hint,
81  ra_exe_unit_in.use_bump_allocator};
82 }
83 
85  const RelAlgExecutionUnit& ra_exe_unit_in) const {
86  if (ra_exe_unit_in.groupby_exprs.empty()) {
87  return ra_exe_unit_in;
88  }
89  if (ra_exe_unit_in.groupby_exprs.size() == 1 && !ra_exe_unit_in.groupby_exprs.front()) {
90  return ra_exe_unit_in;
91  }
92  if (!ra_exe_unit_in.simple_quals.empty()) {
93  return ra_exe_unit_in;
94  }
95  if (ra_exe_unit_in.quals.size() != 1) {
96  return ra_exe_unit_in;
97  }
98  auto in_vals =
99  std::dynamic_pointer_cast<Analyzer::InValues>(ra_exe_unit_in.quals.front());
100  if (!in_vals) {
101  in_vals = std::dynamic_pointer_cast<Analyzer::InValues>(
102  rewrite_expr(ra_exe_unit_in.quals.front().get()));
103  }
104  if (!in_vals || in_vals->get_value_list().empty()) {
105  return ra_exe_unit_in;
106  }
107  for (const auto& in_val : in_vals->get_value_list()) {
108  if (!std::dynamic_pointer_cast<Analyzer::Constant>(in_val)) {
109  break;
110  }
111  }
112  if (dynamic_cast<const Analyzer::CaseExpr*>(in_vals->get_arg())) {
113  return ra_exe_unit_in;
114  }
115  auto case_expr = generateCaseForDomainValues(in_vals.get());
116  return rewriteConstrainedByInImpl(ra_exe_unit_in, case_expr, in_vals.get());
117 }
118 
120  const RelAlgExecutionUnit& ra_exe_unit_in,
121  const std::shared_ptr<Analyzer::CaseExpr> case_expr,
122  const Analyzer::InValues* in_vals) const {
123  std::list<std::shared_ptr<Analyzer::Expr>> new_groupby_list;
124  std::vector<Analyzer::Expr*> new_target_exprs;
125  bool rewrite{false};
126  size_t groupby_idx{0};
127  auto it = ra_exe_unit_in.groupby_exprs.begin();
128  for (const auto& group_expr : ra_exe_unit_in.groupby_exprs) {
129  CHECK(group_expr);
130  ++groupby_idx;
131  if (*group_expr == *in_vals->get_arg()) {
132  const auto expr_range = getExpressionRange(it->get(), query_infos_, executor_);
133  if (expr_range.getType() != ExpressionRangeType::Integer) {
134  ++it;
135  continue;
136  }
137  const size_t range_sz = expr_range.getIntMax() - expr_range.getIntMin() + 1;
138  if (range_sz <= in_vals->get_value_list().size() * g_constrained_by_in_threshold) {
139  ++it;
140  continue;
141  }
142  new_groupby_list.push_back(case_expr);
143  for (size_t i = 0; i < ra_exe_unit_in.target_exprs.size(); ++i) {
144  const auto target = ra_exe_unit_in.target_exprs[i];
145  if (*target == *in_vals->get_arg()) {
146  auto var_case_expr = makeExpr<Analyzer::Var>(
147  case_expr->get_type_info(), Analyzer::Var::kGROUPBY, groupby_idx);
148  target_exprs_owned_.push_back(var_case_expr);
149  new_target_exprs.push_back(var_case_expr.get());
150  } else {
151  new_target_exprs.push_back(target);
152  }
153  }
154  rewrite = true;
155  } else {
156  new_groupby_list.push_back(group_expr);
157  }
158  ++it;
159  }
160  if (!rewrite) {
161  return ra_exe_unit_in;
162  }
163  return {ra_exe_unit_in.input_descs,
164  ra_exe_unit_in.input_col_descs,
165  ra_exe_unit_in.simple_quals,
166  ra_exe_unit_in.quals,
167  ra_exe_unit_in.join_quals,
168  new_groupby_list,
169  new_target_exprs,
170  nullptr,
171  ra_exe_unit_in.sort_info,
172  ra_exe_unit_in.scan_limit};
173 }
174 
175 std::shared_ptr<Analyzer::CaseExpr> QueryRewriter::generateCaseForDomainValues(
176  const Analyzer::InValues* in_vals) {
177  std::list<std::pair<std::shared_ptr<Analyzer::Expr>, std::shared_ptr<Analyzer::Expr>>>
178  case_expr_list;
179  auto in_val_arg = in_vals->get_arg()->deep_copy();
180  for (const auto& in_val : in_vals->get_value_list()) {
181  auto case_cond = makeExpr<Analyzer::BinOper>(
182  SQLTypeInfo(kBOOLEAN, true), false, kEQ, kONE, in_val_arg, in_val);
183  auto in_val_copy = in_val->deep_copy();
184  auto ti = in_val_copy->get_type_info();
185  if (ti.is_string() && ti.get_compression() == kENCODING_DICT) {
186  ti.set_comp_param(0);
187  }
188  in_val_copy->set_type_info(ti);
189  case_expr_list.emplace_back(case_cond, in_val_copy);
190  }
191  // TODO(alex): refine the expression range for case with empty else expression;
192  // for now, add a dummy else which should never be taken
193  auto else_expr = case_expr_list.front().second;
194  return makeExpr<Analyzer::CaseExpr>(
195  case_expr_list.front().second->get_type_info(), false, case_expr_list, else_expr);
196 }
197 
198 namespace {
199 
200 // TODO(adb): centralize and share (e..g with insert_one_dict_str)
201 bool check_string_id_overflow(const int32_t string_id, const SQLTypeInfo& ti) {
202  switch (ti.get_size()) {
203  case 1:
204  return string_id > max_valid_int_value<int8_t>();
205  case 2:
206  return string_id > max_valid_int_value<int16_t>();
207  case 4:
208  return string_id > max_valid_int_value<int32_t>();
209  default:
210  UNREACHABLE();
211  }
212  UNREACHABLE();
213  return false;
214 }
215 
216 } // namespace
217 
218 /* Rewrites an update query of the form `SELECT new_value, OFFSET_IN_FRAGMENT() FROM t
219  * WHERE <update_filter_condition>` to `SELECT CASE WHEN <update_filer_condition> THEN
220  * new_value ELSE existing value END FROM t`
221  */
223  const RelAlgExecutionUnit& ra_exe_unit_in,
224  std::shared_ptr<Analyzer::Expr> column_to_update) const {
225  CHECK_EQ(ra_exe_unit_in.target_exprs.size(), size_t(2));
226  CHECK(ra_exe_unit_in.groupby_exprs.size() == 1 &&
227  !ra_exe_unit_in.groupby_exprs.front());
228 
229  if (ra_exe_unit_in.join_quals.size() > 0) {
230  throw std::runtime_error("Update via join not yet supported for temporary tables.");
231  }
232 
233  auto new_column_value = ra_exe_unit_in.target_exprs.front()->deep_copy();
234  const auto& new_column_ti = new_column_value->get_type_info();
235  if (column_to_update->get_type_info().is_dict_encoded_string()) {
236  CHECK(new_column_ti.is_dict_encoded_string());
237  if (new_column_ti.get_comp_param() > 0 &&
238  new_column_ti.get_comp_param() !=
239  column_to_update->get_type_info().get_comp_param()) {
240  throw std::runtime_error(
241  "Updating a dictionary encoded string using another dictionary encoded string "
242  "column is not yet supported, unless both columns share dictionaries.");
243  }
244  if (auto uoper = dynamic_cast<Analyzer::UOper*>(new_column_value.get())) {
245  if (uoper->get_optype() == kCAST &&
246  dynamic_cast<const Analyzer::Constant*>(uoper->get_operand())) {
247  const auto original_constant_expr =
248  dynamic_cast<const Analyzer::Constant*>(uoper->get_operand());
249  CHECK(original_constant_expr);
250  CHECK(original_constant_expr->get_type_info().is_string());
251  // extract the string, insert it into the dict for the table we are updating,
252  // and place the dictionary ID in the oper
253  auto cat = executor_->getCatalog();
254  CHECK(cat);
255 
256  CHECK(column_to_update->get_type_info().is_dict_encoded_string());
257  const auto dict_id = column_to_update->get_type_info().get_comp_param();
258  std::map<int, StringDictionary*> string_dicts;
259  const auto dd = cat->getMetadataForDict(dict_id, /*load_dict=*/true);
260  CHECK(dd);
261  auto string_dict = dd->stringDict;
262  CHECK(string_dict);
263 
264  auto string_id =
265  string_dict->getOrAdd(*original_constant_expr->get_constval().stringval);
266  if (check_string_id_overflow(string_id, column_to_update->get_type_info())) {
267  throw std::runtime_error(
268  "Ran out of space in dictionary, cannot update column with dictionary "
269  "encoded string value. Dictionary ID: " +
270  std::to_string(dict_id));
271  }
272  if (string_id == inline_int_null_value<int32_t>()) {
273  string_id = inline_fixed_encoding_null_val(column_to_update->get_type_info());
274  }
275 
276  // Codegen expects a string value. The string will be
277  // resolved to its ID during Constant codegen. Copy the string from the
278  // original expr
279  Datum new_string_datum{.stringval = new std::string(
280  *original_constant_expr->get_constval().stringval)};
281 
282  new_column_value =
283  makeExpr<Analyzer::Constant>(column_to_update->get_type_info(),
284  original_constant_expr->get_is_null(),
285  new_string_datum);
286 
287  // Roll the string dict generation forward, as we have added a string
288  auto row_set_mem_owner = executor_->getRowSetMemoryOwner();
289  CHECK(row_set_mem_owner);
290  auto& str_dict_generations = row_set_mem_owner->getStringDictionaryGenerations();
291  if (str_dict_generations.getGeneration(dict_id) > -1) {
292  str_dict_generations.updateGeneration(dict_id,
293  string_dict->storageEntryCount());
294  } else {
295  // Simple update with no filters does not use a CASE, and therefore does not add
296  // a valid generation
297  str_dict_generations.setGeneration(dict_id, string_dict->storageEntryCount());
298  }
299  }
300  }
301  }
302 
303  auto input_col_descs = ra_exe_unit_in.input_col_descs;
304 
305  std::shared_ptr<Analyzer::Expr> filter;
306  std::vector<std::shared_ptr<Analyzer::Expr>> filter_exprs;
307  filter_exprs.insert(filter_exprs.end(),
308  ra_exe_unit_in.simple_quals.begin(),
309  ra_exe_unit_in.simple_quals.end());
310  filter_exprs.insert(
311  filter_exprs.end(), ra_exe_unit_in.quals.begin(), ra_exe_unit_in.quals.end());
312 
313  if (filter_exprs.size() > 0) {
314  std::list<std::pair<std::shared_ptr<Analyzer::Expr>, std::shared_ptr<Analyzer::Expr>>>
315  case_expr_list;
316  if (filter_exprs.size() == 1) {
317  filter = filter_exprs.front();
318  } else {
319  filter = std::accumulate(
320  std::next(filter_exprs.begin()),
321  filter_exprs.end(),
322  filter_exprs.front(),
323  [](const std::shared_ptr<Analyzer::Expr> a,
324  const std::shared_ptr<Analyzer::Expr> b) {
325  CHECK_EQ(a->get_type_info().get_type(), b->get_type_info().get_type());
326  return makeExpr<Analyzer::BinOper>(a->get_type_info().get_type(),
327  SQLOps::kAND,
329  a->deep_copy(),
330  b->deep_copy());
331  });
332  }
333  auto when_expr = filter; // only one filter, will be a BinOper if multiple filters
334  case_expr_list.emplace_back(std::make_pair(when_expr, new_column_value));
335  auto case_expr = Parser::CaseExpr::normalize(case_expr_list, column_to_update);
336 
337  auto col_to_update_var =
338  std::dynamic_pointer_cast<Analyzer::ColumnVar>(column_to_update);
339  CHECK(col_to_update_var);
340  auto col_to_update_desc =
341  std::make_shared<const InputColDescriptor>(col_to_update_var->get_column_id(),
342  col_to_update_var->get_table_id(),
343  col_to_update_var->get_rte_idx());
344  auto existing_col_desc_it = std::find_if(
345  input_col_descs.begin(),
346  input_col_descs.end(),
347  [&col_to_update_desc](const std::shared_ptr<const InputColDescriptor>& in) {
348  return *in == *col_to_update_desc;
349  });
350  if (existing_col_desc_it == input_col_descs.end()) {
351  input_col_descs.push_back(col_to_update_desc);
352  }
353  target_exprs_owned_.emplace_back(case_expr);
354  } else {
355  // no filters, simply project the update value
356  target_exprs_owned_.emplace_back(new_column_value);
357  }
358 
359  std::vector<Analyzer::Expr*> target_exprs;
360  CHECK_EQ(target_exprs_owned_.size(), size_t(1));
361  target_exprs.emplace_back(target_exprs_owned_.front().get());
362 
363  RelAlgExecutionUnit rewritten_exe_unit{ra_exe_unit_in.input_descs,
364  input_col_descs,
365  {},
366  {},
367  ra_exe_unit_in.join_quals,
368  ra_exe_unit_in.groupby_exprs,
369  target_exprs,
370  ra_exe_unit_in.estimator,
371  ra_exe_unit_in.sort_info,
372  ra_exe_unit_in.scan_limit,
373  ra_exe_unit_in.query_hint,
374  ra_exe_unit_in.use_bump_allocator,
375  ra_exe_unit_in.union_all,
376  ra_exe_unit_in.query_state};
377  return rewritten_exe_unit;
378 }
379 
380 /* Rewrites a delete query of the form `SELECT OFFSET_IN_FRAGMENT() FROM t
381  * WHERE <delete_filter_condition>` to `SELECT CASE WHEN <delete_filter_condition> THEN
382  * true ELSE existing value END FROM t`
383  */
385  const RelAlgExecutionUnit& ra_exe_unit_in,
386  std::shared_ptr<Analyzer::ColumnVar> delete_column) const {
387  CHECK_EQ(ra_exe_unit_in.target_exprs.size(), size_t(1));
388  CHECK(ra_exe_unit_in.groupby_exprs.size() == 1 &&
389  !ra_exe_unit_in.groupby_exprs.front());
390 
391  // TODO(adb): is this possible?
392  if (ra_exe_unit_in.join_quals.size() > 0) {
393  throw std::runtime_error("Delete via join not yet supported for temporary tables.");
394  }
395 
396  const auto true_datum = Datum{.boolval = true};
397  const auto deleted_constant =
398  makeExpr<Analyzer::Constant>(delete_column->get_type_info(), false, true_datum);
399 
400  auto input_col_descs = ra_exe_unit_in.input_col_descs;
401 
402  std::shared_ptr<Analyzer::Expr> filter;
403  std::vector<std::shared_ptr<Analyzer::Expr>> filter_exprs;
404  filter_exprs.insert(filter_exprs.end(),
405  ra_exe_unit_in.simple_quals.begin(),
406  ra_exe_unit_in.simple_quals.end());
407  filter_exprs.insert(
408  filter_exprs.end(), ra_exe_unit_in.quals.begin(), ra_exe_unit_in.quals.end());
409 
410  if (filter_exprs.size() > 0) {
411  std::list<std::pair<std::shared_ptr<Analyzer::Expr>, std::shared_ptr<Analyzer::Expr>>>
412  case_expr_list;
413  if (filter_exprs.size() == 1) {
414  filter = filter_exprs.front();
415  } else {
416  filter = std::accumulate(
417  std::next(filter_exprs.begin()),
418  filter_exprs.end(),
419  filter_exprs.front(),
420  [](const std::shared_ptr<Analyzer::Expr> a,
421  const std::shared_ptr<Analyzer::Expr> b) {
422  CHECK_EQ(a->get_type_info().get_type(), b->get_type_info().get_type());
423  return makeExpr<Analyzer::BinOper>(a->get_type_info().get_type(),
424  SQLOps::kAND,
426  a->deep_copy(),
427  b->deep_copy());
428  });
429  }
430  std::shared_ptr<Analyzer::Expr> column_to_update{nullptr};
431  auto when_expr = filter; // only one filter, will be a BinOper if multiple filters
432  case_expr_list.emplace_back(std::make_pair(when_expr, deleted_constant));
433  auto case_expr = Parser::CaseExpr::normalize(case_expr_list, delete_column);
434 
435  // the delete column should not be projected, but check anyway
436  auto delete_col_desc_it = std::find_if(
437  input_col_descs.begin(),
438  input_col_descs.end(),
439  [&delete_column](const std::shared_ptr<const InputColDescriptor>& in) {
440  return in->getColId() == delete_column->get_column_id();
441  });
442  CHECK(delete_col_desc_it == input_col_descs.end());
443  auto delete_col_desc =
444  std::make_shared<const InputColDescriptor>(delete_column->get_column_id(),
445  delete_column->get_table_id(),
446  delete_column->get_rte_idx());
447  input_col_descs.push_back(delete_col_desc);
448  target_exprs_owned_.emplace_back(case_expr);
449  } else {
450  // no filters, simply project the deleted=true column value for all rows
451  auto delete_col_desc =
452  std::make_shared<const InputColDescriptor>(delete_column->get_column_id(),
453  delete_column->get_table_id(),
454  delete_column->get_rte_idx());
455  input_col_descs.push_back(delete_col_desc);
456  target_exprs_owned_.emplace_back(deleted_constant);
457  }
458 
459  std::vector<Analyzer::Expr*> target_exprs;
460  CHECK_EQ(target_exprs_owned_.size(), size_t(1));
461  target_exprs.emplace_back(target_exprs_owned_.front().get());
462 
463  RelAlgExecutionUnit rewritten_exe_unit{ra_exe_unit_in.input_descs,
464  input_col_descs,
465  {},
466  {},
467  ra_exe_unit_in.join_quals,
468  ra_exe_unit_in.groupby_exprs,
469  target_exprs,
470  ra_exe_unit_in.estimator,
471  ra_exe_unit_in.sort_info,
472  ra_exe_unit_in.scan_limit,
473  ra_exe_unit_in.query_hint,
474  ra_exe_unit_in.use_bump_allocator,
475  ra_exe_unit_in.union_all,
476  ra_exe_unit_in.query_state};
477  return rewritten_exe_unit;
478 }
std::vector< Analyzer::Expr * > target_exprs
#define CHECK_EQ(x, y)
Definition: Logger.h:205
const Expr * get_arg() const
Definition: Analyzer.h:584
size_t g_constrained_by_in_threshold
Definition: Execute.cpp:98
RelAlgExecutionUnit rewriteConstrainedByIn(const RelAlgExecutionUnit &ra_exe_unit_in) const
RelAlgExecutionUnit rewriteColumnarUpdate(const RelAlgExecutionUnit &ra_exe_unit_in, std::shared_ptr< Analyzer::Expr > column_to_update) const
const std::optional< bool > union_all
bool boolval
Definition: sqltypes.h:202
RelAlgExecutionUnit rewriteConstrainedByInImpl(const RelAlgExecutionUnit &ra_exe_unit_in, const std::shared_ptr< Analyzer::CaseExpr >, const Analyzer::InValues *) const
std::vector< InputDescriptor > input_descs
#define UNREACHABLE()
Definition: Logger.h:241
Definition: sqldefs.h:49
Definition: sqldefs.h:30
HOST DEVICE int get_size() const
Definition: sqltypes.h:321
std::vector< JoinCondition > JoinQualsPerNestingLevel
const std::list< std::shared_ptr< Analyzer::Expr > > groupby_exprs
Analyzer::ExpressionPtr rewrite_expr(const Analyzer::Expr *expr)
RelAlgExecutionUnit rewrite(const RelAlgExecutionUnit &ra_exe_unit_in) const
int64_t getIntMax() const
std::string to_string(char const *&&v)
RelAlgExecutionUnit rewriteOverlapsJoin(const RelAlgExecutionUnit &ra_exe_unit_in) const
bool g_enable_overlaps_hashjoin
Definition: Execute.cpp:94
static std::shared_ptr< Analyzer::Expr > normalize(const std::list< std::pair< std::shared_ptr< Analyzer::Expr >, std::shared_ptr< Analyzer::Expr >>> &, const std::shared_ptr< Analyzer::Expr >)
Definition: ParserNode.cpp:926
std::string cat(Ts &&... args)
Classes representing a parse tree.
const SortInfo sort_info
const JoinQualsPerNestingLevel join_quals
RelAlgExecutionUnit rewriteColumnarDelete(const RelAlgExecutionUnit &ra_exe_unit_in, std::shared_ptr< Analyzer::ColumnVar > delete_column) const
Executor * executor_
Definition: QueryRewrite.h:51
Definition: sqldefs.h:37
boost::optional< OverlapsJoinConjunction > rewrite_overlaps_conjunction(const std::shared_ptr< Analyzer::Expr > expr)
ExpressionRange getExpressionRange(const Analyzer::BinOper *expr, const std::vector< InputTableInfo > &query_infos, const Executor *, boost::optional< std::list< std::shared_ptr< Analyzer::Expr >>> simple_quals)
const std::shared_ptr< Analyzer::Estimator > estimator
std::string * stringval
Definition: sqltypes.h:211
Definition: sqldefs.h:69
bool check_string_id_overflow(const int32_t string_id, const SQLTypeInfo &ti)
virtual std::shared_ptr< Analyzer::Expr > deep_copy() const =0
const std::vector< InputTableInfo > & query_infos_
Definition: QueryRewrite.h:50
std::list< std::shared_ptr< Analyzer::Expr > > quals
#define CHECK(condition)
Definition: Logger.h:197
int64_t inline_fixed_encoding_null_val(const SQL_TYPE_INFO &ti)
std::shared_ptr< const query_state::QueryState > query_state
std::list< std::shared_ptr< const InputColDescriptor > > input_col_descs
const std::list< std::shared_ptr< Analyzer::Expr > > & get_value_list() const
Definition: Analyzer.h:586
DEVICE auto accumulate(ARGS &&... args)
Definition: gpu_enabled.h:42
static std::shared_ptr< Analyzer::CaseExpr > generateCaseForDomainValues(const Analyzer::InValues *)
std::list< std::shared_ptr< Analyzer::Expr > > simple_quals
std::vector< std::shared_ptr< Analyzer::Expr > > target_exprs_owned_
Definition: QueryRewrite.h:52