OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Parser::CopyTableStmt Class Reference

#include <ParserNode.h>

+ Inheritance diagram for Parser::CopyTableStmt:
+ Collaboration diagram for Parser::CopyTableStmt:

Public Member Functions

 CopyTableStmt (std::string *t, std::string *f, std::list< NameValueAssign * > *o)
 
void execute (const Catalog_Namespace::SessionInfo &session) override
 
void execute (const Catalog_Namespace::SessionInfo &session, const std::function< std::unique_ptr< Importer_NS::Importer >(Catalog_Namespace::Catalog &, const TableDescriptor *, const std::string &, const Importer_NS::CopyParams &)> &importer_factory)
 
std::string & get_table () const
 
bool was_geo_copy_from () const
 
void get_geo_copy_from_payload (std::string &geo_copy_from_table, std::string &geo_copy_from_file_name, Importer_NS::CopyParams &geo_copy_from_copy_params, std::string &geo_copy_from_partitions)
 
- Public Member Functions inherited from Parser::DDLStmt
void setColumnDescriptor (ColumnDescriptor &cd, const ColumnDef *coldef)
 
- Public Member Functions inherited from Parser::Node
virtual ~Node ()
 

Public Attributes

std::unique_ptr< std::string > return_message
 

Private Attributes

std::unique_ptr< std::string > table
 
std::unique_ptr< std::string > file_pattern
 
std::list< std::unique_ptr
< NameValueAssign > > 
options
 
bool _was_geo_copy_from = false
 
std::string _geo_copy_from_file_name
 
Importer_NS::CopyParams _geo_copy_from_copy_params
 
std::string _geo_copy_from_partitions
 

Detailed Description

Definition at line 1371 of file ParserNode.h.

Constructor & Destructor Documentation

Parser::CopyTableStmt::CopyTableStmt ( std::string *  t,
std::string *  f,
std::list< NameValueAssign * > *  o 
)
inline

Definition at line 1373 of file ParserNode.h.

References options.

1374  : table(t), file_pattern(f) {
1375  if (o) {
1376  for (const auto e : *o) {
1377  options.emplace_back(e);
1378  }
1379  delete o;
1380  }
1381  }
std::list< std::unique_ptr< NameValueAssign > > options
Definition: ParserNode.h:1412
std::unique_ptr< std::string > table
Definition: ParserNode.h:1410
std::unique_ptr< std::string > file_pattern
Definition: ParserNode.h:1411

Member Function Documentation

void Parser::CopyTableStmt::execute ( const Catalog_Namespace::SessionInfo session)
overridevirtual

Implements Parser::DDLStmt.

Definition at line 3429 of file ParserNode.cpp.

Referenced by MapDHandler::execute_distributed_copy_statement(), and QueryRunner::QueryRunner::runImport().

3429  {
3430  auto importer_factory = [](Catalog_Namespace::Catalog& catalog,
3431  const TableDescriptor* td,
3432  const std::string& file_path,
3433  const Importer_NS::CopyParams& copy_params) {
3434  return boost::make_unique<Importer_NS::Importer>(catalog, td, file_path, copy_params);
3435  };
3436  return execute(session, importer_factory);
3437 }
class for a per-database catalog. also includes metadata for the current database and the current use...
Definition: Catalog.h:81
void execute(const Catalog_Namespace::SessionInfo &session) override
specifies the content in-memory of a row in the table metadata table

+ Here is the caller graph for this function:

void Parser::CopyTableStmt::execute ( const Catalog_Namespace::SessionInfo session,
const std::function< std::unique_ptr< Importer_NS::Importer >(Catalog_Namespace::Catalog &, const TableDescriptor *, const std::string &, const Importer_NS::CopyParams &)> &  importer_factory 
)

Definition at line 3439 of file ParserNode.cpp.

References Importer_NS::CopyParams::array_begin, Importer_NS::CopyParams::array_delim, Importer_NS::CopyParams::array_end, Parser::anonymous_namespace{ParserNode.cpp}::bool_from_string_literal(), Importer_NS::CopyParams::buffer_size, CHECK(), Importer_NS::DELIMITED, Importer_NS::CopyParams::delimiter, logger::ERROR, Importer_NS::CopyParams::escape, measure< TimeT >::execution(), Importer_NS::CopyParams::file_type, Importer_NS::CopyParams::geo_assign_render_groups, Importer_NS::CopyParams::geo_coords_comp_param, Importer_NS::CopyParams::geo_coords_encoding, Importer_NS::CopyParams::geo_coords_srid, Importer_NS::CopyParams::geo_coords_type, Importer_NS::CopyParams::geo_explode_collections, Importer_NS::CopyParams::geo_layer_name, Catalog_Namespace::SessionInfo::get_currentUser(), Parser::IntLiteral::get_intval(), Parser::StringLiteral::get_stringval(), Catalog_Namespace::SessionInfo::getCatalog(), Importer_NS::HAS_HEADER, Importer_NS::CopyParams::has_header, logger::INFO, AccessPrivileges::INSERT_INTO_TABLE, kENCODING_GEOINT, kENCODING_NONE, kGEOMETRY, Importer_NS::CopyParams::line_delim, DBObject::loadKey(), LOG, Importer_NS::CopyParams::lonlat, Importer_NS::CopyParams::max_reject, Importer_NS::NO_HEADER, Importer_NS::CopyParams::null_str, Importer_NS::CopyParams::plain_text, Importer_NS::POLYGON, Importer_NS::CopyParams::quote, Importer_NS::CopyParams::quoted, run_benchmark_import::rows_rejected, Importer_NS::CopyParams::s3_access_key, Importer_NS::CopyParams::s3_endpoint, Importer_NS::CopyParams::s3_region, Importer_NS::CopyParams::s3_secret_key, DBObject::setPrivileges(), TableDBObjectType, Importer_NS::CopyParams::threads, to_string(), and Catalog_Namespace::UserMetadata::userName.

3444  {
3445  size_t rows_completed = 0;
3446  size_t rows_rejected = 0;
3447  size_t total_time = 0;
3448  bool load_truncated = false;
3449 
3450  auto& catalog = session.getCatalog();
3451  const TableDescriptor* td = catalog.getMetadataForTable(*table);
3452 
3453  // if the table already exists, it's locked, so check access privileges
3454  if (td) {
3455  std::vector<DBObject> privObjects;
3456  DBObject dbObject(*table, TableDBObjectType);
3457  dbObject.loadKey(catalog);
3458  dbObject.setPrivileges(AccessPrivileges::INSERT_INTO_TABLE);
3459  privObjects.push_back(dbObject);
3460  if (!SysCatalog::instance().checkPrivileges(session.get_currentUser(), privObjects)) {
3461  throw std::runtime_error("Violation of access privileges: user " +
3462  session.get_currentUser().userName +
3463  " has no insert privileges for table " + *table + ".");
3464  }
3465  }
3466 
3467  // since we'll have not only posix file names but also s3/hdfs/... url
3468  // we do not expand wildcard or check file existence here.
3469  // from here on, file_path contains something which may be a url
3470  // or a wildcard of file names;
3471  std::string file_path = *file_pattern;
3472  Importer_NS::CopyParams copy_params;
3473  if (!options.empty()) {
3474  for (auto& p : options) {
3475  if (boost::iequals(*p->get_name(), "max_reject")) {
3476  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3477  if (int_literal == nullptr) {
3478  throw std::runtime_error("max_reject option must be an integer.");
3479  }
3480  copy_params.max_reject = int_literal->get_intval();
3481  } else if (boost::iequals(*p->get_name(), "buffer_size")) {
3482  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3483  if (int_literal == nullptr) {
3484  throw std::runtime_error("buffer_size option must be an integer.");
3485  }
3486  copy_params.buffer_size = std::max<size_t>(1 << 20, int_literal->get_intval());
3487  } else if (boost::iequals(*p->get_name(), "threads")) {
3488  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3489  if (int_literal == nullptr) {
3490  throw std::runtime_error("Threads option must be an integer.");
3491  }
3492  copy_params.threads = int_literal->get_intval();
3493  } else if (boost::iequals(*p->get_name(), "delimiter")) {
3494  const StringLiteral* str_literal =
3495  dynamic_cast<const StringLiteral*>(p->get_value());
3496  if (str_literal == nullptr) {
3497  throw std::runtime_error("Delimiter option must be a string.");
3498  } else if (str_literal->get_stringval()->length() != 1) {
3499  throw std::runtime_error("Delimiter must be a single character string.");
3500  }
3501  copy_params.delimiter = (*str_literal->get_stringval())[0];
3502  } else if (boost::iequals(*p->get_name(), "nulls")) {
3503  const StringLiteral* str_literal =
3504  dynamic_cast<const StringLiteral*>(p->get_value());
3505  if (str_literal == nullptr) {
3506  throw std::runtime_error("Nulls option must be a string.");
3507  }
3508  copy_params.null_str = *str_literal->get_stringval();
3509  } else if (boost::iequals(*p->get_name(), "header")) {
3510  const StringLiteral* str_literal =
3511  dynamic_cast<const StringLiteral*>(p->get_value());
3512  if (str_literal == nullptr) {
3513  throw std::runtime_error("Header option must be a boolean.");
3514  }
3515  copy_params.has_header = bool_from_string_literal(str_literal)
3518 #ifdef ENABLE_IMPORT_PARQUET
3519  } else if (boost::iequals(*p->get_name(), "parquet")) {
3520  const StringLiteral* str_literal =
3521  dynamic_cast<const StringLiteral*>(p->get_value());
3522  if (str_literal == nullptr) {
3523  throw std::runtime_error("Parquet option must be a boolean.");
3524  }
3525  if (bool_from_string_literal(str_literal)) {
3526  // not sure a parquet "table" type is proper, but to make code
3527  // look consistent in some places, let's set "table" type too
3528  copy_params.file_type = Importer_NS::FileType::PARQUET;
3529  }
3530 #endif // ENABLE_IMPORT_PARQUET
3531  } else if (boost::iequals(*p->get_name(), "s3_access_key")) {
3532  const StringLiteral* str_literal =
3533  dynamic_cast<const StringLiteral*>(p->get_value());
3534  if (str_literal == nullptr) {
3535  throw std::runtime_error("Option s3_access_key must be a string.");
3536  }
3537  copy_params.s3_access_key = *str_literal->get_stringval();
3538  } else if (boost::iequals(*p->get_name(), "s3_secret_key")) {
3539  const StringLiteral* str_literal =
3540  dynamic_cast<const StringLiteral*>(p->get_value());
3541  if (str_literal == nullptr) {
3542  throw std::runtime_error("Option s3_secret_key must be a string.");
3543  }
3544  copy_params.s3_secret_key = *str_literal->get_stringval();
3545  } else if (boost::iequals(*p->get_name(), "s3_region")) {
3546  const StringLiteral* str_literal =
3547  dynamic_cast<const StringLiteral*>(p->get_value());
3548  if (str_literal == nullptr) {
3549  throw std::runtime_error("Option s3_region must be a string.");
3550  }
3551  copy_params.s3_region = *str_literal->get_stringval();
3552  } else if (boost::iequals(*p->get_name(), "s3_endpoint")) {
3553  const StringLiteral* str_literal =
3554  dynamic_cast<const StringLiteral*>(p->get_value());
3555  if (str_literal == nullptr) {
3556  throw std::runtime_error("Option s3_endpoint must be a string.");
3557  }
3558  copy_params.s3_endpoint = *str_literal->get_stringval();
3559  } else if (boost::iequals(*p->get_name(), "quote")) {
3560  const StringLiteral* str_literal =
3561  dynamic_cast<const StringLiteral*>(p->get_value());
3562  if (str_literal == nullptr) {
3563  throw std::runtime_error("Quote option must be a string.");
3564  } else if (str_literal->get_stringval()->length() != 1) {
3565  throw std::runtime_error("Quote must be a single character string.");
3566  }
3567  copy_params.quote = (*str_literal->get_stringval())[0];
3568  } else if (boost::iequals(*p->get_name(), "escape")) {
3569  const StringLiteral* str_literal =
3570  dynamic_cast<const StringLiteral*>(p->get_value());
3571  if (str_literal == nullptr) {
3572  throw std::runtime_error("Escape option must be a string.");
3573  } else if (str_literal->get_stringval()->length() != 1) {
3574  throw std::runtime_error("Escape must be a single character string.");
3575  }
3576  copy_params.escape = (*str_literal->get_stringval())[0];
3577  } else if (boost::iequals(*p->get_name(), "line_delimiter")) {
3578  const StringLiteral* str_literal =
3579  dynamic_cast<const StringLiteral*>(p->get_value());
3580  if (str_literal == nullptr) {
3581  throw std::runtime_error("Line_delimiter option must be a string.");
3582  } else if (str_literal->get_stringval()->length() != 1) {
3583  throw std::runtime_error("Line_delimiter must be a single character string.");
3584  }
3585  copy_params.line_delim = (*str_literal->get_stringval())[0];
3586  } else if (boost::iequals(*p->get_name(), "quoted")) {
3587  const StringLiteral* str_literal =
3588  dynamic_cast<const StringLiteral*>(p->get_value());
3589  if (str_literal == nullptr) {
3590  throw std::runtime_error("Quoted option must be a boolean.");
3591  }
3592  copy_params.quoted = bool_from_string_literal(str_literal);
3593  } else if (boost::iequals(*p->get_name(), "plain_text")) {
3594  const StringLiteral* str_literal =
3595  dynamic_cast<const StringLiteral*>(p->get_value());
3596  if (str_literal == nullptr) {
3597  throw std::runtime_error("plain_text option must be a boolean.");
3598  }
3599  copy_params.plain_text = bool_from_string_literal(str_literal);
3600  } else if (boost::iequals(*p->get_name(), "array_marker")) {
3601  const StringLiteral* str_literal =
3602  dynamic_cast<const StringLiteral*>(p->get_value());
3603  if (str_literal == nullptr) {
3604  throw std::runtime_error("Array Marker option must be a string.");
3605  } else if (str_literal->get_stringval()->length() != 2) {
3606  throw std::runtime_error(
3607  "Array Marker option must be exactly two characters. Default is {}.");
3608  }
3609  copy_params.array_begin = (*str_literal->get_stringval())[0];
3610  copy_params.array_end = (*str_literal->get_stringval())[1];
3611  } else if (boost::iequals(*p->get_name(), "array_delimiter")) {
3612  const StringLiteral* str_literal =
3613  dynamic_cast<const StringLiteral*>(p->get_value());
3614  if (str_literal == nullptr) {
3615  throw std::runtime_error("Array Delimiter option must be a string.");
3616  } else if (str_literal->get_stringval()->length() != 1) {
3617  throw std::runtime_error("Array Delimiter must be a single character string.");
3618  }
3619  copy_params.array_delim = (*str_literal->get_stringval())[0];
3620  } else if (boost::iequals(*p->get_name(), "lonlat")) {
3621  const StringLiteral* str_literal =
3622  dynamic_cast<const StringLiteral*>(p->get_value());
3623  if (str_literal == nullptr) {
3624  throw std::runtime_error("Lonlat option must be a boolean.");
3625  }
3626  copy_params.lonlat = bool_from_string_literal(str_literal);
3627  } else if (boost::iequals(*p->get_name(), "geo")) {
3628  const StringLiteral* str_literal =
3629  dynamic_cast<const StringLiteral*>(p->get_value());
3630  if (str_literal == nullptr) {
3631  throw std::runtime_error("Geo option must be a boolean.");
3632  }
3633  copy_params.file_type = bool_from_string_literal(str_literal)
3636  } else if (boost::iequals(*p->get_name(), "geo_coords_type")) {
3637  const StringLiteral* str_literal =
3638  dynamic_cast<const StringLiteral*>(p->get_value());
3639  if (str_literal == nullptr) {
3640  throw std::runtime_error("'geo_coords_type' option must be a string");
3641  }
3642  const std::string* s = str_literal->get_stringval();
3643  if (boost::iequals(*s, "geography")) {
3644  throw std::runtime_error(
3645  "GEOGRAPHY coords type not yet supported. Please use GEOMETRY.");
3646  // copy_params.geo_coords_type = kGEOGRAPHY;
3647  } else if (boost::iequals(*s, "geometry")) {
3648  copy_params.geo_coords_type = kGEOMETRY;
3649  } else {
3650  throw std::runtime_error(
3651  "Invalid string for 'geo_coords_type' option (must be 'GEOGRAPHY' or "
3652  "'GEOMETRY'): " +
3653  *s);
3654  }
3655  } else if (boost::iequals(*p->get_name(), "geo_coords_encoding")) {
3656  const StringLiteral* str_literal =
3657  dynamic_cast<const StringLiteral*>(p->get_value());
3658  if (str_literal == nullptr) {
3659  throw std::runtime_error("'geo_coords_encoding' option must be a string");
3660  }
3661  const std::string* s = str_literal->get_stringval();
3662  if (boost::iequals(*s, "none")) {
3663  copy_params.geo_coords_encoding = kENCODING_NONE;
3664  copy_params.geo_coords_comp_param = 0;
3665  } else if (boost::iequals(*s, "compressed(32)")) {
3666  copy_params.geo_coords_encoding = kENCODING_GEOINT;
3667  copy_params.geo_coords_comp_param = 32;
3668  } else {
3669  throw std::runtime_error(
3670  "Invalid string for 'geo_coords_encoding' option (must be 'NONE' or "
3671  "'COMPRESSED(32)'): " +
3672  *s);
3673  }
3674  } else if (boost::iequals(*p->get_name(), "geo_coords_srid")) {
3675  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3676  if (int_literal == nullptr) {
3677  throw std::runtime_error("'geo_coords_srid' option must be an integer");
3678  }
3679  const int srid = int_literal->get_intval();
3680  if (srid == 4326 || srid == 3857 || srid == 900913) {
3681  copy_params.geo_coords_srid = srid;
3682  } else {
3683  throw std::runtime_error(
3684  "Invalid value for 'geo_coords_srid' option (must be 4326, 3857, or "
3685  "900913): " +
3686  std::to_string(srid));
3687  }
3688  } else if (boost::iequals(*p->get_name(), "geo_layer_name")) {
3689  const StringLiteral* str_literal =
3690  dynamic_cast<const StringLiteral*>(p->get_value());
3691  if (str_literal == nullptr) {
3692  throw std::runtime_error("'geo_layer_name' option must be a string");
3693  }
3694  const std::string* layer_name = str_literal->get_stringval();
3695  if (layer_name) {
3696  copy_params.geo_layer_name = *layer_name;
3697  } else {
3698  throw std::runtime_error("Invalid value for 'geo_layer_name' option");
3699  }
3700  } else if (boost::iequals(*p->get_name(), "partitions")) {
3701  if (copy_params.file_type == Importer_NS::FileType::POLYGON) {
3702  const auto partitions =
3703  static_cast<const StringLiteral*>(p->get_value())->get_stringval();
3704  CHECK(partitions);
3705  const auto partitions_uc = boost::to_upper_copy<std::string>(*partitions);
3706  if (partitions_uc != "REPLICATED") {
3707  throw std::runtime_error("PARTITIONS must be REPLICATED for geo COPY");
3708  }
3709  _geo_copy_from_partitions = partitions_uc;
3710  } else {
3711  throw std::runtime_error("PARTITIONS option not supported for non-geo COPY: " +
3712  *p->get_name());
3713  }
3714  } else if (boost::iequals(*p->get_name(), "geo_assign_render_groups")) {
3715  const StringLiteral* str_literal =
3716  dynamic_cast<const StringLiteral*>(p->get_value());
3717  if (str_literal == nullptr) {
3718  throw std::runtime_error("geo_assign_render_groups option must be a boolean.");
3719  }
3720  copy_params.geo_assign_render_groups = bool_from_string_literal(str_literal);
3721  } else if (boost::iequals(*p->get_name(), "geo_explode_collections")) {
3722  const StringLiteral* str_literal =
3723  dynamic_cast<const StringLiteral*>(p->get_value());
3724  if (str_literal == nullptr) {
3725  throw std::runtime_error("geo_explode_collections option must be a boolean.");
3726  }
3727  copy_params.geo_explode_collections = bool_from_string_literal(str_literal);
3728  } else {
3729  throw std::runtime_error("Invalid option for COPY: " + *p->get_name());
3730  }
3731  }
3732  }
3733 
3734  std::string tr;
3735  if (copy_params.file_type == Importer_NS::FileType::POLYGON) {
3736  // geo import
3737  // we do nothing here, except stash the parameters so we can
3738  // do the import when we unwind to the top of the handler
3739  _geo_copy_from_file_name = file_path;
3740  _geo_copy_from_copy_params = copy_params;
3741  _was_geo_copy_from = true;
3742 
3743  // the result string
3744  // @TODO simon.eves put something more useful in here
3745  // except we really can't because we haven't done the import yet!
3746  if (td) {
3747  tr = std::string("Appending geo to table '") + *table + std::string("'...");
3748  } else {
3749  tr = std::string("Creating table '") + *table +
3750  std::string("' and importing geo...");
3751  }
3752  } else {
3753  if (td) {
3754  // regular import
3755  auto importer = importer_factory(catalog, td, file_path, copy_params);
3756  auto ms = measure<>::execution([&]() {
3757  auto res = importer->import();
3758  rows_completed += res.rows_completed;
3759  rows_rejected += res.rows_rejected;
3760  load_truncated = res.load_truncated;
3761  });
3762  total_time += ms;
3763 
3764  // results
3765  if (load_truncated || rows_rejected > copy_params.max_reject) {
3766  LOG(ERROR) << "COPY exited early due to reject records count during multi file "
3767  "processing ";
3768  // if we have crossed the truncated load threshold
3769  load_truncated = true;
3770  }
3771  if (!load_truncated) {
3772  tr = std::string("Loaded: " + std::to_string(rows_completed) +
3773  " recs, Rejected: " + std::to_string(rows_rejected) +
3774  " recs in " + std::to_string((double)total_time / 1000.0) +
3775  " secs");
3776  } else {
3777  tr = std::string("Loader truncated due to reject count. Processed : " +
3778  std::to_string(rows_completed) + " recs, Rejected: " +
3779  std::to_string(rows_rejected) + " recs in " +
3780  std::to_string((double)total_time / 1000.0) + " secs");
3781  }
3782  } else {
3783  throw std::runtime_error("Table '" + *table + "' must exist before COPY FROM");
3784  }
3785  }
3786 
3787  return_message.reset(new std::string(tr));
3788  LOG(INFO) << tr;
3789 }
std::string null_str
Definition: CopyParams.h:47
static TimeT::rep execution(F func, Args &&...args)
Definition: sample.cpp:29
std::list< std::unique_ptr< NameValueAssign > > options
Definition: ParserNode.h:1412
#define LOG(tag)
Definition: Logger.h:185
std::unique_ptr< std::string > return_message
Definition: ParserNode.h:1389
static const AccessPrivileges INSERT_INTO_TABLE
Definition: DBObject.h:154
std::unique_ptr< std::string > table
Definition: ParserNode.h:1410
bool bool_from_string_literal(const Parser::StringLiteral *str_literal)
Definition: ParserNode.cpp:892
std::string to_string(char const *&&v)
EncodingType geo_coords_encoding
Definition: CopyParams.h:73
CHECK(cgen_state)
Importer_NS::CopyParams _geo_copy_from_copy_params
Definition: ParserNode.h:1416
std::string s3_access_key
Definition: CopyParams.h:62
std::string _geo_copy_from_partitions
Definition: ParserNode.h:1417
ImportHeaderRow has_header
Definition: CopyParams.h:48
std::string s3_endpoint
Definition: CopyParams.h:65
Catalog & getCatalog() const
Definition: SessionInfo.h:90
std::string s3_region
Definition: CopyParams.h:64
std::string geo_layer_name
Definition: CopyParams.h:78
std::unique_ptr< std::string > file_pattern
Definition: ParserNode.h:1411
specifies the content in-memory of a row in the table metadata table
std::string s3_secret_key
Definition: CopyParams.h:63
std::string _geo_copy_from_file_name
Definition: ParserNode.h:1415
const UserMetadata & get_currentUser() const
Definition: SessionInfo.h:93
int32_t geo_coords_comp_param
Definition: CopyParams.h:74

+ Here is the call graph for this function:

void Parser::CopyTableStmt::get_geo_copy_from_payload ( std::string &  geo_copy_from_table,
std::string &  geo_copy_from_file_name,
Importer_NS::CopyParams geo_copy_from_copy_params,
std::string &  geo_copy_from_partitions 
)
inline

Definition at line 1398 of file ParserNode.h.

References _geo_copy_from_copy_params, _geo_copy_from_file_name, _geo_copy_from_partitions, _was_geo_copy_from, and table.

1401  {
1402  geo_copy_from_table = *table;
1403  geo_copy_from_file_name = _geo_copy_from_file_name;
1404  geo_copy_from_copy_params = _geo_copy_from_copy_params;
1405  geo_copy_from_partitions = _geo_copy_from_partitions;
1406  _was_geo_copy_from = false;
1407  }
std::unique_ptr< std::string > table
Definition: ParserNode.h:1410
Importer_NS::CopyParams _geo_copy_from_copy_params
Definition: ParserNode.h:1416
std::string _geo_copy_from_partitions
Definition: ParserNode.h:1417
std::string _geo_copy_from_file_name
Definition: ParserNode.h:1415
std::string& Parser::CopyTableStmt::get_table ( ) const
inline

Definition at line 1391 of file ParserNode.h.

References CHECK(), and table.

1391  {
1392  CHECK(table);
1393  return *table;
1394  }
std::unique_ptr< std::string > table
Definition: ParserNode.h:1410
CHECK(cgen_state)

+ Here is the call graph for this function:

bool Parser::CopyTableStmt::was_geo_copy_from ( ) const
inline

Definition at line 1396 of file ParserNode.h.

References _was_geo_copy_from.

1396 { return _was_geo_copy_from; }

Member Data Documentation

Importer_NS::CopyParams Parser::CopyTableStmt::_geo_copy_from_copy_params
private

Definition at line 1416 of file ParserNode.h.

Referenced by get_geo_copy_from_payload().

std::string Parser::CopyTableStmt::_geo_copy_from_file_name
private

Definition at line 1415 of file ParserNode.h.

Referenced by get_geo_copy_from_payload().

std::string Parser::CopyTableStmt::_geo_copy_from_partitions
private

Definition at line 1417 of file ParserNode.h.

Referenced by get_geo_copy_from_payload().

bool Parser::CopyTableStmt::_was_geo_copy_from = false
private

Definition at line 1414 of file ParserNode.h.

Referenced by get_geo_copy_from_payload(), and was_geo_copy_from().

std::unique_ptr<std::string> Parser::CopyTableStmt::file_pattern
private

Definition at line 1411 of file ParserNode.h.

std::list<std::unique_ptr<NameValueAssign> > Parser::CopyTableStmt::options
private

Definition at line 1412 of file ParserNode.h.

Referenced by CopyTableStmt().

std::unique_ptr<std::string> Parser::CopyTableStmt::return_message

Definition at line 1389 of file ParserNode.h.

std::unique_ptr<std::string> Parser::CopyTableStmt::table
private

Definition at line 1410 of file ParserNode.h.

Referenced by get_geo_copy_from_payload(), and get_table().


The documentation for this class was generated from the following files: