Bugfixs patched from 3.1.x to 3.1_opensource_release
This commit is contained in:
@ -1989,6 +1989,7 @@ public:
|
||||
is_lob_column_(false),
|
||||
is_unpivot_mocked_column_(false),
|
||||
is_hidden_(false),
|
||||
from_alias_table_(false),
|
||||
real_expr_(nullptr)
|
||||
{
|
||||
set_expr_class(ObExpr::EXPR_COLUMN_REF);
|
||||
@ -2010,6 +2011,7 @@ public:
|
||||
is_lob_column_(false),
|
||||
is_unpivot_mocked_column_(false),
|
||||
is_hidden_(false),
|
||||
from_alias_table_(false),
|
||||
real_expr_(nullptr)
|
||||
{
|
||||
set_expr_class(ObExpr::EXPR_COLUMN_REF);
|
||||
@ -2031,6 +2033,7 @@ public:
|
||||
is_lob_column_(false),
|
||||
is_unpivot_mocked_column_(false),
|
||||
is_hidden_(false),
|
||||
from_alias_table_(false),
|
||||
real_expr_(nullptr)
|
||||
{
|
||||
set_expr_class(ObExpr::EXPR_COLUMN_REF);
|
||||
@ -2119,6 +2122,9 @@ public:
|
||||
virtual int do_visit(ObRawExprVisitor& visitor) override;
|
||||
|
||||
virtual uint64_t hash_internal(uint64_t seed) const;
|
||||
|
||||
bool is_from_alias_table() const { return from_alias_table_; }
|
||||
void set_from_alias_table(bool value) { from_alias_table_ = value; }
|
||||
inline bool is_generated_column() const
|
||||
{
|
||||
return share::schema::ObSchemaUtils::is_generated_column(column_flags_);
|
||||
@ -2226,6 +2232,7 @@ private:
|
||||
bool is_lob_column_; // TODO add lob column
|
||||
bool is_unpivot_mocked_column_; // used for unpivot
|
||||
bool is_hidden_; // used for print hidden column
|
||||
bool from_alias_table_;
|
||||
ObRawExpr* real_expr_; // for oracle virtual table that is mapping a real table
|
||||
};
|
||||
|
||||
|
||||
@ -280,6 +280,9 @@ int ObRawExprPrinter::print(ObColumnRefRawExpr* expr)
|
||||
is_oracle_mode ? "\"%.*s\".\"%.*s\"" : "`%.*s`.`%.*s`", LEN_AND_PTR(table_name), LEN_AND_PTR(col_name));
|
||||
} else if (OB_UNLIKELY(only_column_namespace_)) {
|
||||
DATA_PRINTF(is_oracle_mode ? "\"%.*s\"" : "`%.*s`", LEN_AND_PTR(col_name));
|
||||
} else if (expr->is_from_alias_table()) {
|
||||
DATA_PRINTF(is_oracle_mode ? "\"%.*s\".\"%.*s\"" : "`%.*s`.`%.*s`",
|
||||
LEN_AND_PTR(expr->get_table_name()), LEN_AND_PTR(col_name));
|
||||
} else {
|
||||
if (!expr->get_synonym_name().empty() && !expr->get_synonym_db_name().empty()) {
|
||||
ObString synonyn_db_name = expr->get_synonym_db_name();
|
||||
|
||||
Reference in New Issue
Block a user