27 if (!do_not_fetch_column || dynamic_cast<const Analyzer::Var*>(do_not_fetch_column)) {
30 const auto& column_key = do_not_fetch_column->
getColumnKey();
31 if (column_key.table_id > 0) {
33 if (cd->isVirtualCol) {
41 const std::list<std::shared_ptr<const InputColDescriptor>>& global_col_ids) {
42 for (
const auto& col_id : global_col_ids) {
53 const bool fetch_column) {
66 global_col_key.table_id,
69 std::optional<int> col_id{std::nullopt};
79 if (kv.first.getColumnKey() == global_col_key) {
85 if (col_id && *col_id >= 0) {
91 CHECK(
false) <<
"Expected to find " << global_col_key;
96 std::shared_ptr<Analyzer::Expr> expr) {
99 std::vector<std::shared_ptr<Analyzer::Expr>> expr_vec{expr};
102 it->second.emplace_back(expr);
125 bool unmark_lazy_fetch) {
126 if (unmark_lazy_fetch) {
153 const std::vector<TargetExprCodegen>& target_exprs_to_codegen)
const {
154 return std::any_of(target_exprs_to_codegen.begin(),
155 target_exprs_to_codegen.end(),
157 return target_expr.target_info.sql_type.usesFlatBuffer();
162 const std::vector<TargetExprCodegen>& target_exprs_to_codegen) {
164 for (
const auto& expr : target_exprs_to_codegen) {
165 if (needs_lazy_fetch && !expr.target_info.sql_type.usesFlatBuffer()) {
166 if (
auto col_var = dynamic_cast<const Analyzer::ColumnVar*>(expr.target_expr)) {
bool contains(const T &container, const U &element)
std::unordered_map< size_t, std::vector< std::shared_ptr< Analyzer::Expr > > > left_join_non_hashtable_quals_
std::unordered_map< InputColDescriptor, size_t > global_to_local_col_ids_
void addColumnToFetch(const shared::ColumnKey &column_key, bool unmark_lazy_fetch=false)
std::unordered_set< shared::ColumnKey > columns_to_not_fetch_
void addNonHashtableQualForLeftJoin(size_t idx, std::shared_ptr< Analyzer::Expr > expr)
bool hasExpressionNeedsLazyFetch(const std::vector< TargetExprCodegen > &target_exprs_to_codegen) const
void addColumnToNotFetch(const shared::ColumnKey &column_key)
bool isColumnToFetch(const shared::ColumnKey &column_key) const
int getLocalColumnId(const Analyzer::ColumnVar *col_var, const bool fetch_column)
bool isLazyFetchColumn(const Analyzer::Expr *target_expr) const
const ColumnDescriptor * get_column_descriptor(const shared::ColumnKey &column_key)
void allocateLocalColumnIds(const std::list< std::shared_ptr< const InputColDescriptor >> &global_col_ids)
const std::unordered_set< shared::ColumnKey > & getColumnsToFetch() const
const shared::ColumnKey & getColumnKey() const
bool isColumnToNotFetch(const shared::ColumnKey &column_key) const
const std::unordered_set< shared::ColumnKey > & getColumnsToNotFetch() const
bool any_of(std::vector< Analyzer::Expr * > const &target_exprs)
std::unordered_set< shared::ColumnKey > columns_to_fetch_
void registerNonLazyFetchExpression(const std::vector< TargetExprCodegen > &target_exprs_to_codegen)
int32_t get_rte_idx() const