Fix query push down and add subquery handling
This commit is contained in:
		@ -3084,6 +3084,23 @@ bool ObDMLStmt::has_link_table() const
 | 
			
		||||
  return bret;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ObDMLStmt::get_table_rel_ids(const TableItem &target,
 | 
			
		||||
                                 ObSqlBitSet<> &table_set) const
 | 
			
		||||
{
 | 
			
		||||
  int ret = OB_SUCCESS;
 | 
			
		||||
  if (target.is_joined_table()) {
 | 
			
		||||
    const JoinedTable &cur_table = static_cast<const JoinedTable &>(target);
 | 
			
		||||
    for (int64_t i = 0; OB_SUCC(ret) && i < cur_table.single_table_ids_.count(); ++i) {
 | 
			
		||||
      if (OB_FAIL(table_set.add_member(get_table_bit_index(cur_table.single_table_ids_.at(i))))) {
 | 
			
		||||
        LOG_WARN("failed to add member", K(ret), K(cur_table.single_table_ids_.at(i)));
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  } else if (OB_FAIL(table_set.add_member(get_table_bit_index(target.table_id_)))) {
 | 
			
		||||
    LOG_WARN("failed to add member", K(ret), K(target.table_id_));
 | 
			
		||||
  }
 | 
			
		||||
  return ret;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ObDMLStmt::get_relation_exprs(ObIArray<ObRawExpr*>& rel_array, int32_t ignore_scope /* = 0*/) const
 | 
			
		||||
{
 | 
			
		||||
  int ret = OB_SUCCESS;
 | 
			
		||||
 | 
			
		||||
@ -887,6 +887,7 @@ public:
 | 
			
		||||
  virtual int clear_sharable_expr_reference();
 | 
			
		||||
  virtual int get_from_subquery_stmts(common::ObIArray<ObSelectStmt*>& child_stmts) const;
 | 
			
		||||
  int is_referred_by_partitioning_expr(const ObRawExpr* expr, bool& is_referred);
 | 
			
		||||
  int get_table_rel_ids(const TableItem &target, ObSqlBitSet<> &table_set) const;
 | 
			
		||||
  int64_t get_table_size() const
 | 
			
		||||
  {
 | 
			
		||||
    return table_items_.count();
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user