895 throw std::runtime_error(
"invalid column name *.");
900 throw std::runtime_error(
"range variable or table name " + *
table_ +
906 throw std::runtime_error(
"Column name " + *
column_ +
" does not exist.");
914 if (cd !=
nullptr && !found) {
918 }
else if (cd !=
nullptr && found) {
919 throw std::runtime_error(
"Column name " + *
column_ +
" is ambiguous.");
923 if (cd ==
nullptr && allow_tlist_ref != TlistRefType::TLIST_NONE) {
928 std::shared_ptr<Analyzer::TargetEntry> tle;
930 if (*
column_ == p->get_resname() && !found) {
934 }
else if (*
column_ == p->get_resname() && found) {
935 throw std::runtime_error(
"Output alias " + *
column_ +
" is ambiguous.");
940 if (dynamic_cast<Analyzer::Var*>(tle->get_expr())) {
946 if (allow_tlist_ref == TlistRefType::TLIST_COPY) {
947 return tle->get_expr()->deep_copy();
949 return makeExpr<Analyzer::Var>(
955 throw std::runtime_error(
"Column name " + *
column_ +
" does not exist.");
958 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