890 throw std::runtime_error(
"invalid column name *.");
895 throw std::runtime_error(
"range variable or table name " + *
table_ +
901 throw std::runtime_error(
"Column name " + *
column_ +
" does not exist.");
909 if (cd !=
nullptr && !found) {
913 }
else if (cd !=
nullptr && found) {
914 throw std::runtime_error(
"Column name " + *
column_ +
" is ambiguous.");
918 if (cd ==
nullptr && allow_tlist_ref != TlistRefType::TLIST_NONE) {
923 std::shared_ptr<Analyzer::TargetEntry> tle;
925 if (*
column_ == p->get_resname() && !found) {
929 }
else if (*
column_ == p->get_resname() && found) {
930 throw std::runtime_error(
"Output alias " + *
column_ +
" is ambiguous.");
935 if (dynamic_cast<Analyzer::Var*>(tle->get_expr())) {
941 if (allow_tlist_ref == TlistRefType::TLIST_COPY) {
942 return tle->get_expr()->deep_copy();
944 return makeExpr<Analyzer::Var>(
950 throw std::runtime_error(
"Column name " + *
column_ +
" does not exist.");
953 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