896 throw std::runtime_error(
"invalid column name *.");
901 throw std::runtime_error(
"range variable or table name " + *
table_ +
907 throw std::runtime_error(
"Column name " + *
column_ +
" does not exist.");
915 if (cd !=
nullptr && !found) {
919 }
else if (cd !=
nullptr && found) {
920 throw std::runtime_error(
"Column name " + *
column_ +
" is ambiguous.");
924 if (cd ==
nullptr && allow_tlist_ref != TlistRefType::TLIST_NONE) {
929 std::shared_ptr<Analyzer::TargetEntry> tle;
931 if (*
column_ == p->get_resname() && !found) {
935 }
else if (*
column_ == p->get_resname() && found) {
936 throw std::runtime_error(
"Output alias " + *
column_ +
" is ambiguous.");
941 if (dynamic_cast<Analyzer::Var*>(tle->get_expr())) {
947 if (allow_tlist_ref == TlistRefType::TLIST_COPY) {
948 return tle->get_expr()->deep_copy();
950 return makeExpr<Analyzer::Var>(
956 throw std::runtime_error(
"Column name " + *
column_ +
" does not exist.");
959 return makeExpr<Analyzer::ColumnVar>(
std::unique_ptr< std::string > table_
std::shared_ptr< Analyzer::Expr > deep_copy() const override
int32_t get_table_id() const
int get_rte_idx(const std::string &range_var_name) const
RangeTableEntry * get_rte(int rte_idx) const
WhichRow get_which_row() const
int getDatabaseId() const
specifies the content in-memory of a row in the column metadata table
const ColumnDescriptor * get_column_desc(const Catalog_Namespace::Catalog &catalog, const std::string &name)
std::unique_ptr< std::string > column_
const std::vector< std::shared_ptr< TargetEntry > > & get_targetlist() const
const std::vector< RangeTableEntry * > & get_rangetable() const