[CP] [ctas]: ctas support parallel hint.

This commit is contained in:
Monk-Liu
2024-05-21 05:43:59 +00:00
committed by ob-robot
parent 8ad8629476
commit b25f2bcf3e
5 changed files with 55 additions and 45 deletions

View File

@ -109,8 +109,9 @@ int ObCreateTableExecutor::ObInsSQLPrinter::inner_print(char *buf, int64_t buf_l
LOG_WARN("null stmt", K(ret));
} else if (OB_FAIL(databuff_printf(buf, buf_len, pos1,
do_osg_
? "insert /*+GATHER_OPTIMIZER_STATISTICS*/ into %c%.*s%c.%c%.*s%c"
: "insert /*+NO_GATHER_OPTIMIZER_STATISTICS*/ into %c%.*s%c.%c%.*s%c",
? "insert /*+ ENABLE_PARALLEL_DML PARALLEL(%lu) GATHER_OPTIMIZER_STATISTICS*/ into %c%.*s%c.%c%.*s%c"
: "insert /*+ ENABLE_PARALLEL_DML PARALLEL(%lu) NO_GATHER_OPTIMIZER_STATISTICS*/ into %c%.*s%c.%c%.*s%c",
stmt_->get_parallelism(),
sep_char,
stmt_->get_database_name().length(),
stmt_->get_database_name().ptr(),