Refine filtering external files by pattern option
This commit is contained in:
@ -14,6 +14,8 @@
|
||||
#define _OB_EXTERNAL_TABLE_UTILS_H_
|
||||
|
||||
#include "lib/container/ob_iarray.h"
|
||||
#include "lib/string/ob_string.h"
|
||||
#include "lib/allocator/page_arena.h"
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
@ -30,10 +32,24 @@ class ObDASTabletLoc;
|
||||
class ObExecContext;
|
||||
class ObExternalTableAccessService;
|
||||
class ObQueryRange;
|
||||
class ObExprRegexContext;
|
||||
class ObExprRegexpSessionVariables;
|
||||
}
|
||||
|
||||
namespace share
|
||||
{
|
||||
|
||||
struct ObExternalPathFilter {
|
||||
ObExternalPathFilter(sql::ObExprRegexContext ®ex_ctx, common::ObIAllocator &allocator)
|
||||
: regex_ctx_(regex_ctx), allocator_(allocator) {}
|
||||
int init(const common::ObString &pattern, const sql::ObExprRegexpSessionVariables ®exp_vars);
|
||||
bool is_inited();
|
||||
int is_filtered(const common::ObString &path, bool &is_filtered);
|
||||
sql::ObExprRegexContext ®ex_ctx_;
|
||||
common::ObIAllocator &allocator_;
|
||||
common::ObArenaAllocator temp_allocator_;
|
||||
};
|
||||
|
||||
class ObExternalTableUtils {
|
||||
public:
|
||||
enum ExternalTableRangeColumn {
|
||||
@ -78,9 +94,6 @@ class ObExternalTableUtils {
|
||||
common::ObIArray<common::ObNewRange *> &new_range,
|
||||
bool is_file_on_disk);
|
||||
|
||||
static int filter_external_table_files(const common::ObString &pattern,
|
||||
sql::ObExecContext &exec_ctx,
|
||||
common::ObIArray<common::ObString> &file_urls);
|
||||
static int calc_assigned_files_to_sqcs(
|
||||
const common::ObIArray<ObExternalFileInfo> &files,
|
||||
common::ObIArray<int64_t> &assigned_idx,
|
||||
|
||||
Reference in New Issue
Block a user