Disabled INSERT thru 'process hive statement'
It return an error on HDP platform. Once the issue is fixed,
it will be enabled.
Also, merged remote branch 'origin/master' into ansharma_hiveddl_br
Conflicts:
core/sql/executor/JavaObjectInterface.cpp
core/sql/executor/JavaObjectInterface.h
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/05bd8821
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/05bd8821
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/05bd8821
Branch: refs/heads/master
Commit: 05bd8821b5c85529be578bcf6b53acaf2dca3634
Parents: 6f490da fc939b9
Author: Anoop Sharma <[email protected]>
Authored: Mon Jun 4 23:48:11 2018 +0000
Committer: Anoop Sharma <[email protected]>
Committed: Mon Jun 4 23:48:11 2018 +0000
----------------------------------------------------------------------
core/sql/executor/JavaObjectInterface.cpp | 44 ++++++--
core/sql/executor/JavaObjectInterface.h | 7 +-
core/sql/exp/ExpPCodeClauseGen.cpp | 4 +
core/sql/exp/exp_clause.cpp | 3 +
core/sql/exp/exp_clause_derived.h | 14 ++-
core/sql/generator/GenExpGenerator.cpp | 2 +
core/sql/generator/GenExpGenerator.h | 9 +-
core/sql/generator/GenItemExpr.cpp | 2 +
core/sql/generator/Generator.h | 2 +-
core/sql/optimizer/RelExeUtil.cpp | 5 +-
core/sql/regress/executor/EXPECTED063 | 24 ++---
core/sql/regress/executor/TEST063 | 2 +-
core/sql/regress/hive/EXPECTED005 | 108 ++++++++++---------
core/sql/regress/hive/TEST005 | 6 +-
core/sql/regress/hive/TEST009_b.hive.sql | 8 +-
core/sql/regress/seabase/EXPECTED031 | 35 +++---
core/sql/regress/seabase/TEST031 | 5 +-
.../src/asciidoc/_chapters/sql_statements.adoc | 66 +++++++-----
18 files changed, 215 insertions(+), 131 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/05bd8821/core/sql/executor/JavaObjectInterface.cpp
----------------------------------------------------------------------
diff --cc core/sql/executor/JavaObjectInterface.cpp
index 700c3c1,7a29b24..336e555
--- a/core/sql/executor/JavaObjectInterface.cpp
+++ b/core/sql/executor/JavaObjectInterface.cpp
@@@ -565,11 -575,11 +575,12 @@@ void JavaObjectInterface::logError(std:
QRLogger::log(cat, LL_ERROR, "Java exception in file %s, line %d.", file,
line);
}
- NABoolean JavaObjectInterface::getExceptionDetails(const char *fileName, int
lineNo,
- const char *methodName,
- NABoolean noDetails)
+ NABoolean JavaObjectInterface::getExceptionDetails(const char *fileName, int
lineNo,
- const char *methodName)
++ const char *methodName,
++ NABoolean noDetails)
{
JNIEnv *jenv = jenv_;
+ NABoolean killProcess = FALSE;
CliGlobals *cliGlobals = GetCliGlobals();
NAString error_msg;
if (gThrowableClass == NULL)
@@@ -586,7 -596,8 +597,10 @@@
setSqlJniErrorStr(error_msg);
return FALSE;
}
- appendExceptionMessages(a_exception, error_msg, noDetails);
- if (appendExceptionMessages(a_exception, error_msg))
- killProcess = TRUE;
++
++ if (appendExceptionMessages(a_exception, error_msg, noDetails))
++ killProcess = TRUE;
++
setSqlJniErrorStr(error_msg);
logError(CAT_SQL_EXE, fileName, lineNo);
logError(CAT_SQL_EXE, methodName, error_msg);
@@@ -594,10 -610,11 +613,13 @@@
return TRUE;
}
- void JavaObjectInterface::appendExceptionMessages(jthrowable a_exception,
- NAString &error_msg,
- NABoolean noDetails)
-NABoolean JavaObjectInterface::appendExceptionMessages(jthrowable
a_exception, NAString &error_msg)
++NABoolean JavaObjectInterface::appendExceptionMessages(jthrowable
a_exception,
++ NAString &error_msg,
++ NABoolean noDetails)
{
+ NABoolean killProcess = FALSE;
+ if (jenv_->IsInstanceOf(a_exception, gOOMErrorClass) == JNI_TRUE)
+ killProcess = TRUE;
jstring msg_obj =
(jstring) jenv_->CallObjectMethod(a_exception,
gThrowableToStringMethodID);
@@@ -619,11 -636,7 +641,11 @@@
a_exception,
gGetStackTraceMethodID);
if (frames == NULL)
- return;
+ return killProcess;
+
+ if (noDetails)
- return;
++ return killProcess;
+
jsize frames_length = jenv_->GetArrayLength(frames);
jsize i = 0;
@@@ -645,9 -658,11 +667,11 @@@
jthrowable j_cause = (jthrowable)jenv_->CallObjectMethod(a_exception,
gGetCauseMethodID);
if (j_cause != NULL) {
error_msg += " Caused by \n";
- appendExceptionMessages(j_cause, error_msg, noDetails);
- if (appendExceptionMessages(j_cause, error_msg))
- killProcess = TRUE;
++ if (appendExceptionMessages(j_cause, error_msg, noDetails))
++ killProcess = TRUE;
}
jenv_->DeleteLocalRef(a_exception);
+ return killProcess;
}
JOI_RetCode JavaObjectInterface::initJNIEnv()
http://git-wip-us.apache.org/repos/asf/trafodion/blob/05bd8821/core/sql/executor/JavaObjectInterface.h
----------------------------------------------------------------------
diff --cc core/sql/executor/JavaObjectInterface.h
index 9c04082,78d1720..f5efb21
--- a/core/sql/executor/JavaObjectInterface.h
+++ b/core/sql/executor/JavaObjectInterface.h
@@@ -148,12 -148,9 +148,12 @@@ public
return isInitialized_;
}
static NABoolean getExceptionDetails(const char *fileName, int lineNo,
- const char *methodName);
+ const char *methodName,
+ NABoolean noDetails = FALSE);
- static void appendExceptionMessages(jthrowable a_exception,
- NAString &error_msg,
- NABoolean noDetails = FALSE);
- static NABoolean appendExceptionMessages(jthrowable a_exception, NAString
&error_msg);
++ static NABoolean appendExceptionMessages(jthrowable a_exception,
++ NAString &error_msg,
++ NABoolean noDetails = FALSE);
NAHeap *getHeap() { return heap_; }
protected:
http://git-wip-us.apache.org/repos/asf/trafodion/blob/05bd8821/core/sql/optimizer/RelExeUtil.cpp
----------------------------------------------------------------------
diff --cc core/sql/optimizer/RelExeUtil.cpp
index 1158d4e,5d143a2..7b96463
--- a/core/sql/optimizer/RelExeUtil.cpp
+++ b/core/sql/optimizer/RelExeUtil.cpp
@@@ -924,14 -923,23 +924,17 @@@ RelExpr * ExeUtilHiveQuery::bindNode(Bi
bindWA->setErrStatus();
return NULL;
}
+
- // currently supported hive queries must start with:
- // create, drop, alter, truncate
- // Check for it.
-
- // first strip leading spaces.
++ // insert query returns an error from HiveClient.executeQuery on HDP
platform.
++ // Until that issue is fixed, disallow insert from 'process hive statement'.
hiveQuery_ = hiveQuery_.strip(NAString::leading, ' ');
- if (NOT ((hiveQuery_.index("CREATE", 0, NAString::ignoreCase) == 0) ||
- (hiveQuery_.index("DROP", 0, NAString::ignoreCase) == 0) ||
- (hiveQuery_.index("ALTER", 0, NAString::ignoreCase) == 0) ||
- // (hiveQuery_.index("INSERT", 0, NAString::ignoreCase)
== 0) ||
- (hiveQuery_.index("TRUNCATE", 0, NAString::ignoreCase) == 0)))
+ if (NOT ((hiveQuery_.index("CREATE ", 0, NAString::ignoreCase) == 0) ||
+ (hiveQuery_.index("DROP ", 0, NAString::ignoreCase) == 0) ||
+ (hiveQuery_.index("ALTER ", 0, NAString::ignoreCase) == 0) ||
- (hiveQuery_.index("INSERT ", 0, NAString::ignoreCase) == 0) ||
++ // (hiveQuery_.index("INSERT ", 0, NAString::ignoreCase)
== 0) ||
+ (hiveQuery_.index("TRUNCATE ", 0, NAString::ignoreCase) == 0)))
{
- // error case
- *CmpCommon::diags() << DgSqlCode(-3242) << DgString0("Only CREATE,
DROP, ALTER or TRUNCATE hive DDL statements can be specified.");
-
+ *CmpCommon::diags() << DgSqlCode(-3242) << DgString0("Specified
operation cannot be executed directly by Hive.");
bindWA->setErrStatus();
return NULL;
}
http://git-wip-us.apache.org/repos/asf/trafodion/blob/05bd8821/core/sql/regress/hive/EXPECTED005
----------------------------------------------------------------------
diff --cc core/sql/regress/hive/EXPECTED005
index a0e32d9,6521790..298547b
--- a/core/sql/regress/hive/EXPECTED005
+++ b/core/sql/regress/hive/EXPECTED005
@@@ -72,7 -72,7 +72,7 @@@
*** WARNING[8597] Statement was automatically retried 1 time(s). Delay before
each retry was 0 seconds. See next entry for the error that caused this retry.
- *** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528120446084,
failedModTS = 1528120587673, failedLoc =
hdfs://localhost:36000/user/trafodion/hive/exttables/customer_ddl
-*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1521763081810,
failedModTS = 1521763182817, failedLoc =
hdfs://localhost:24200/user/trafodion/hive/exttables/customer_ddl
++*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528150079000,
failedModTS = 1528150239571, failedLoc =
hdfs://localhost:36000/user/trafodion/hive/exttables/customer_ddl
C_PREFERRED_CUST_FLAG (EXPR)
------------------------- --------------------
@@@ -108,7 -108,7 +108,7 @@@
*** WARNING[8597] Statement was automatically retried 1 time(s). Delay before
each retry was 0 seconds. See next entry for the error that caused this retry.
- *** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528120446084,
failedModTS = 1528120587673, failedLoc =
hdfs://localhost:36000/user/trafodion/hive/exttables/customer_ddl
-*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1521763081810,
failedModTS = 1521763182817, failedLoc =
hdfs://localhost:24200/user/trafodion/hive/exttables/customer_ddl
++*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528150079000,
failedModTS = 1528150239571, failedLoc =
hdfs://localhost:36000/user/trafodion/hive/exttables/customer_ddl
C_PREFERRED_CUST_FLAG (EXPR)
------------------------- --------------------
@@@ -177,7 -177,7 +177,7 @@@
*** WARNING[8597] Statement was automatically retried 1 time(s). Delay before
each retry was 0 seconds. See next entry for the error that caused this retry.
- *** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528120591381,
failedModTS = 1528120599768, failedLoc =
hdfs://localhost:36000/user/hive/warehouse/newtable
-*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1521763188079,
failedModTS = 1521763198786, failedLoc =
hdfs://localhost:24200/user/hive/warehouse/newtable
++*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528150242355,
failedModTS = 1528150250981, failedLoc =
hdfs://localhost:36000/user/hive/warehouse/newtable
A
-------------------------
@@@ -227,7 -227,7 +227,7 @@@ xy
*** WARNING[8597] Statement was automatically retried 1 time(s). Delay before
each retry was 0 seconds. See next entry for the error that caused this retry.
- *** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528120587673,
failedModTS = 1528120619405, failedLoc =
hdfs://localhost:36000/user/trafodion/hive/exttables/customer_ddl
-*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1521763182817,
failedModTS = 1521763227396, failedLoc =
hdfs://localhost:24200/user/trafodion/hive/exttables/customer_ddl
++*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528150239571,
failedModTS = 1528150270615, failedLoc =
hdfs://localhost:36000/user/trafodion/hive/exttables/customer_ddl
C_PREFERRED_CUST_FLAG (EXPR)
------------------------- --------------------
@@@ -242,7 -242,7 +242,7 @@@
*** WARNING[8597] Statement was automatically retried 1 time(s). Delay before
each retry was 0 seconds. See next entry for the error that caused this retry.
- *** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528120587673,
failedModTS = 1528120619405, failedLoc =
hdfs://localhost:36000/user/trafodion/hive/exttables/customer_ddl
-*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1521763182817,
failedModTS = 1521763227396, failedLoc =
hdfs://localhost:24200/user/trafodion/hive/exttables/customer_ddl
++*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528150239571,
failedModTS = 1528150270615, failedLoc =
hdfs://localhost:36000/user/trafodion/hive/exttables/customer_ddl
C_PREFERRED_CUST_FLAG (EXPR)
------------------------- --------------------
@@@ -298,7 -298,7 +298,7 @@@
*** WARNING[8597] Statement was automatically retried 1 time(s). Delay before
each retry was 0 seconds. See next entry for the error that caused this retry.
- *** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528120616839,
failedModTS = 1528120628168, failedLoc =
hdfs://localhost:36000/user/hive/warehouse/newtable
-*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1521763223181,
failedModTS = 1521763236557, failedLoc =
hdfs://localhost:24200/user/hive/warehouse/newtable
++*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528150267991,
failedModTS = 1528150279764, failedLoc =
hdfs://localhost:36000/user/hive/warehouse/newtable
A B
----------- -------------------------
@@@ -617,18 -617,18 +617,18 @@@ C1 C2 C
--- 1 row(s) selected.
>>load with continue on error into trafodion.seabase.traf_tbl_bad select *
from tbl_bad;
Task: LOAD Status: Started Object:
TRAFODION.SEABASE.TRAF_TBL_BAD
- Task: CLEANUP Status: Started Time: 2018-06-04 13:58:23.141041
- Task: CLEANUP Status: Ended Time: 2018-06-04 13:58:23.156785
- Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.016
- Task: LOADING DATA Status: Started Time: 2018-06-04 13:58:23.156828
-Task: CLEANUP Status: Started Time: 2018-03-23 00:02:16.72820
-Task: CLEANUP Status: Ended Time: 2018-03-23 00:02:16.87954
-Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.015
-Task: LOADING DATA Status: Started Time: 2018-03-23 00:02:16.88001
++Task: CLEANUP Status: Started Time: 2018-06-04 22:12:37.338586
++Task: CLEANUP Status: Ended Time: 2018-06-04 22:12:37.349263
++Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.011
++Task: LOADING DATA Status: Started Time: 2018-06-04 22:12:37.349352
Rows Processed: 8
Error Rows: 5
- Task: LOADING DATA Status: Ended Time: 2018-06-04 13:58:23.329872
- Task: LOADING DATA Status: Ended Elapsed Time: 00:00:00.173
- Task: COMPLETION Status: Started Time: 2018-06-04 13:58:23.329912
-Task: LOADING DATA Status: Ended Time: 2018-03-23 00:02:16.505744
-Task: LOADING DATA Status: Ended Elapsed Time: 00:00:00.418
-Task: COMPLETION Status: Started Time: 2018-03-23 00:02:16.505804
++Task: LOADING DATA Status: Ended Time: 2018-06-04 22:12:37.525012
++Task: LOADING DATA Status: Ended Elapsed Time: 00:00:00.176
++Task: COMPLETION Status: Started Time: 2018-06-04 22:12:37.525050
Rows Loaded: 3
- Task: COMPLETION Status: Ended Time: 2018-06-04 13:58:23.718479
- Task: COMPLETION Status: Ended Elapsed Time: 00:00:00.389
-Task: COMPLETION Status: Ended Time: 2018-03-23 00:02:17.132726
-Task: COMPLETION Status: Ended Elapsed Time: 00:00:00.627
++Task: COMPLETION Status: Ended Time: 2018-06-04 22:12:37.888170
++Task: COMPLETION Status: Ended Elapsed Time: 00:00:00.363
--- 3 row(s) loaded.
>>select count(*) from trafodion.seabase.traf_tbl_bad;
@@@ -644,19 -644,19 +644,19 @@@
--- 3 row(s) deleted.
>>load with log error rows into trafodion.seabase.traf_tbl_bad select * from
tbl_bad;
Task: LOAD Status: Started Object:
TRAFODION.SEABASE.TRAF_TBL_BAD
- Task: CLEANUP Status: Started Time: 2018-06-04 13:58:24.769397
- Task: CLEANUP Status: Ended Time: 2018-06-04 13:58:24.778567
- Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.009
- Logging Location:
/user/trafodion/bulkload/logs/ERR_TRAFODION.SEABASE.TRAF_TBL_BAD_20180604_135824
- Task: LOADING DATA Status: Started Time: 2018-06-04 13:58:24.778637
-Task: CLEANUP Status: Started Time: 2018-03-23 00:02:18.222742
-Task: CLEANUP Status: Ended Time: 2018-03-23 00:02:18.238737
-Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.016
- Logging Location:
/user/trafodion/bulkload/logs/ERR_TRAFODION.SEABASE.TRAF_TBL_BAD_20180323_000218
-Task: LOADING DATA Status: Started Time: 2018-03-23 00:02:18.238844
++Task: CLEANUP Status: Started Time: 2018-06-04 22:12:38.932654
++Task: CLEANUP Status: Ended Time: 2018-06-04 22:12:38.947277
++Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.015
++ Logging Location:
/user/trafodion/bulkload/logs/ERR_TRAFODION.SEABASE.TRAF_TBL_BAD_20180604_221238
++Task: LOADING DATA Status: Started Time: 2018-06-04 22:12:38.947419
Rows Processed: 8
Error Rows: 5
- Task: LOADING DATA Status: Ended Time: 2018-06-04 13:58:24.985221
- Task: LOADING DATA Status: Ended Elapsed Time: 00:00:00.207
- Task: COMPLETION Status: Started Time: 2018-06-04 13:58:24.985272
-Task: LOADING DATA Status: Ended Time: 2018-03-23 00:02:18.652144
-Task: LOADING DATA Status: Ended Elapsed Time: 00:00:00.413
-Task: COMPLETION Status: Started Time: 2018-03-23 00:02:18.652182
++Task: LOADING DATA Status: Ended Time: 2018-06-04 22:12:39.164857
++Task: LOADING DATA Status: Ended Elapsed Time: 00:00:00.217
++Task: COMPLETION Status: Started Time: 2018-06-04 22:12:39.164924
Rows Loaded: 3
- Task: COMPLETION Status: Ended Time: 2018-06-04 13:58:25.579791
- Task: COMPLETION Status: Ended Elapsed Time: 00:00:00.595
-Task: COMPLETION Status: Ended Time: 2018-03-23 00:02:19.268334
-Task: COMPLETION Status: Ended Elapsed Time: 00:00:00.616
++Task: COMPLETION Status: Ended Time: 2018-06-04 22:12:39.538579
++Task: COMPLETION Status: Ended Elapsed Time: 00:00:00.374
--- 3 row(s) loaded.
>>select count(*) from trafodion.seabase.traf_tbl_bad;
@@@ -669,19 -669,19 +669,19 @@@
--- 1 row(s) selected.
>>load with log error rows to '/user/trafodion/bulkload/logs/TEST005' into
trafodion.seabase.traf_tbl_bad select * from tbl_bad;
Task: LOAD Status: Started Object:
TRAFODION.SEABASE.TRAF_TBL_BAD
- Task: CLEANUP Status: Started Time: 2018-06-04 13:58:26.571248
- Task: CLEANUP Status: Ended Time: 2018-06-04 13:58:26.592217
- Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.021
- Logging Location:
/user/trafodion/bulkload/logs/TEST005/ERR_TRAFODION.SEABASE.TRAF_TBL_BAD_20180604_135826
- Task: LOADING DATA Status: Started Time: 2018-06-04 13:58:26.592275
-Task: CLEANUP Status: Started Time: 2018-03-23 00:02:20.268608
-Task: CLEANUP Status: Ended Time: 2018-03-23 00:02:20.278195
-Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.010
- Logging Location:
/user/trafodion/bulkload/logs/TEST005/ERR_TRAFODION.SEABASE.TRAF_TBL_BAD_20180323_000220
-Task: LOADING DATA Status: Started Time: 2018-03-23 00:02:20.278249
++Task: CLEANUP Status: Started Time: 2018-06-04 22:12:40.528226
++Task: CLEANUP Status: Ended Time: 2018-06-04 22:12:40.541034
++Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.013
++ Logging Location:
/user/trafodion/bulkload/logs/TEST005/ERR_TRAFODION.SEABASE.TRAF_TBL_BAD_20180604_221240
++Task: LOADING DATA Status: Started Time: 2018-06-04 22:12:40.541082
Rows Processed: 8
Error Rows: 5
- Task: LOADING DATA Status: Ended Time: 2018-06-04 13:58:26.781747
- Task: LOADING DATA Status: Ended Elapsed Time: 00:00:00.189
- Task: COMPLETION Status: Started Time: 2018-06-04 13:58:26.781792
-Task: LOADING DATA Status: Ended Time: 2018-03-23 00:02:20.743348
-Task: LOADING DATA Status: Ended Elapsed Time: 00:00:00.465
-Task: COMPLETION Status: Started Time: 2018-03-23 00:02:20.743404
++Task: LOADING DATA Status: Ended Time: 2018-06-04 22:12:40.732369
++Task: LOADING DATA Status: Ended Elapsed Time: 00:00:00.191
++Task: COMPLETION Status: Started Time: 2018-06-04 22:12:40.732402
Rows Loaded: 3
- Task: COMPLETION Status: Ended Time: 2018-06-04 13:58:27.137355
- Task: COMPLETION Status: Ended Elapsed Time: 00:00:00.356
-Task: COMPLETION Status: Ended Time: 2018-03-23 00:02:21.350084
-Task: COMPLETION Status: Ended Elapsed Time: 00:00:00.607
++Task: COMPLETION Status: Ended Time: 2018-06-04 22:12:41.125846
++Task: COMPLETION Status: Ended Elapsed Time: 00:00:00.393
--- 3 row(s) loaded.
>>select count(*) from trafodion.seabase.traf_tbl_bad;
@@@ -697,10 -697,10 +697,10 @@@
--- 6 row(s) deleted.
>>load with stop after 3 error rows into trafodion.seabase.traf_tbl_bad
select * from tbl_bad;
Task: LOAD Status: Started Object:
TRAFODION.SEABASE.TRAF_TBL_BAD
- Task: CLEANUP Status: Started Time: 2018-06-04 13:58:28.171192
- Task: CLEANUP Status: Ended Time: 2018-06-04 13:58:28.186727
- Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.016
- Task: LOADING DATA Status: Started Time: 2018-06-04 13:58:28.186761
-Task: CLEANUP Status: Started Time: 2018-03-23 00:02:22.398357
-Task: CLEANUP Status: Ended Time: 2018-03-23 00:02:22.409109
-Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.011
-Task: LOADING DATA Status: Started Time: 2018-03-23 00:02:22.409145
++Task: CLEANUP Status: Started Time: 2018-06-04 22:12:42.147737
++Task: CLEANUP Status: Ended Time: 2018-06-04 22:12:42.157127
++Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.009
++Task: LOADING DATA Status: Started Time: 2018-06-04 22:12:42.157174
*** ERROR[8113] The maximum number of error rows is exceeded.
@@@ -715,11 -715,11 +715,11 @@@
--- 1 row(s) selected.
>>load with log error rows, stop after 3 error rows into
trafodion.seabase.traf_tbl_bad select * from tbl_bad;
Task: LOAD Status: Started Object:
TRAFODION.SEABASE.TRAF_TBL_BAD
- Task: CLEANUP Status: Started Time: 2018-06-04 13:58:29.310459
- Task: CLEANUP Status: Ended Time: 2018-06-04 13:58:29.320142
-Task: CLEANUP Status: Started Time: 2018-03-23 00:02:23.773372
-Task: CLEANUP Status: Ended Time: 2018-03-23 00:02:23.788799
-Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.015
- Logging Location:
/user/trafodion/bulkload/logs/ERR_TRAFODION.SEABASE.TRAF_TBL_BAD_20180323_000223
-Task: LOADING DATA Status: Started Time: 2018-03-23 00:02:23.788861
++Task: CLEANUP Status: Started Time: 2018-06-04 22:12:43.279600
++Task: CLEANUP Status: Ended Time: 2018-06-04 22:12:43.289771
+Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.010
- Logging Location:
/user/trafodion/bulkload/logs/ERR_TRAFODION.SEABASE.TRAF_TBL_BAD_20180604_135829
- Task: LOADING DATA Status: Started Time: 2018-06-04 13:58:29.320178
++ Logging Location:
/user/trafodion/bulkload/logs/ERR_TRAFODION.SEABASE.TRAF_TBL_BAD_20180604_221243
++Task: LOADING DATA Status: Started Time: 2018-06-04 22:12:43.289816
*** ERROR[8113] The maximum number of error rows is exceeded.
@@@ -800,15 -800,14 +800,16 @@@
--- 0 row(s) selected.
>>
- >>process hive statement 'insert into thive values (1)';
->>sh echo "insert into thive values (1);" > TEST005_junk;
->>sh regrhive.ksh -f TEST005_junk;
++>>--process hive statement 'insert into thive values (1)';
++>>insert into hive.hive.thive values (1);
+
- --- SQL operation complete.
++--- 1 row(s) inserted.
>>
>>select a from hive.hive.thive;
*** WARNING[8597] Statement was automatically retried 1 time(s). Delay before
each retry was 0 seconds. See next entry for the error that caused this retry.
- *** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528120736679,
failedModTS = 1528120744575, failedLoc =
hdfs://localhost:36000/user/hive/warehouse/thive
-*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1521763369777,
failedModTS = 1521763389102, failedLoc =
hdfs://localhost:24200/user/hive/warehouse/thive
++*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528150390948,
failedModTS = 1528150393514, failedLoc =
hdfs://localhost:36000/user/hive/warehouse/thive
A
-----------
@@@ -836,9 -835,8 +837,10 @@@
--- SQL operation complete.
>>
- >>process hive statement 'insert into thive values (1,2)';
->>sh echo "insert into thive values (1,2);" > TEST005_junk;
->>sh regrhive.ksh -f TEST005_junk;
++>>--process hive statement 'insert into thive values (1,2)';
++>>insert into hive.hive.thive values (1,2);
+
- --- SQL operation complete.
++--- 1 row(s) inserted.
>>
>>select a from hive.hive.thive;
@@@ -870,10 -877,6 +872,10 @@@ A
--- 1 row(s) inserted.
>>select * from hive.hive.thive;
+*** WARNING[8597] Statement was automatically retried 1 time(s). Delay before
each retry was 0 seconds. See next entry for the error that caused this retry.
+
- *** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528120760959,
failedModTS = 1528120763842, failedLoc =
hdfs://localhost:36000/user/hive/warehouse/thive
++*** WARNING[8436] Mismatch detected between compiletime and runtime hive
table definitions. DataModMismatchDetails: compiledModTS = 1528150404696,
failedModTS = 1528150406756, failedLoc =
hdfs://localhost:36000/user/hive/warehouse/thive
+
A B
----------- -----------
@@@ -975,8 -983,8 +977,8 @@@ t005part.a t005part.b t005part.
>>-- tests for hive insert error modes
>>invoke hive.hive.thive_insert_smallint;
--- Definition of hive table THIVE_INSERT_SMALLINT
--- Definition current Fri Mar 23 00:07:13 2018
+-- Definition of hive table HIVE.HIVE.THIVE_INSERT_SMALLINT
- -- Definition current Mon Jun 4 14:02:21 2018
++-- Definition current Mon Jun 4 22:16:40 2018
(
A SMALLINT
@@@ -996,12 -1004,9 +998,12 @@@ CREATE TABLE HIVE.HIVE.THIVE_INSERT_SMA
/* Trafodion DDL */
+REGISTER /*INTERNAL*/ HIVE TABLE HIVE.HIVE.THIVE_INSERT_SMALLINT;
- /* ObjectUID = 4678276860950888823 */
++/* ObjectUID = 7976600667680320368 */
+
--- SQL operation complete.
>>
->>truncate hive.hive.thive_insert_smallint;
+>>truncate table hive.hive.thive_insert_smallint;
--- SQL operation complete.
>>cqd hive_insert_error_mode '0';
@@@ -1085,8 -1090,8 +1087,8 @@@
--- SQL operation complete.
>>invoke hive.hive.thive_insert_varchar;
--- Definition of hive table THIVE_INSERT_VARCHAR
--- Definition current Fri Mar 23 00:07:23 2018
+-- Definition of hive table HIVE.HIVE.THIVE_INSERT_VARCHAR
- -- Definition current Mon Jun 4 14:02:40 2018
++-- Definition current Mon Jun 4 22:17:04 2018
(
A VARCHAR(1 CHAR) CHARACTER SET UTF8
COLLATE
@@@ -1110,9 -1115,6 +1112,9 @@@ CREATE TABLE HIVE.HIVE.THIVE_INSERT_VAR
/* Trafodion DDL */
+REGISTER /*INTERNAL*/ HIVE TABLE HIVE.HIVE.THIVE_INSERT_VARCHAR;
- /* ObjectUID = 4678276860950889215 */
++/* ObjectUID = 7976600667680321080 */
+
--- SQL operation complete.
>>cqd hive_insert_error_mode '1';
http://git-wip-us.apache.org/repos/asf/trafodion/blob/05bd8821/core/sql/regress/hive/TEST005
----------------------------------------------------------------------
diff --cc core/sql/regress/hive/TEST005
index 6e91949,b0c6808..6521786
--- a/core/sql/regress/hive/TEST005
+++ b/core/sql/regress/hive/TEST005
@@@ -303,16 -303,18 +303,18 @@@ create table hive.hive.thive(a int)
select a from hive.hive.thive;
- process hive statement 'insert into thive values (1)';
-sh echo "insert into thive values (1);" > TEST005_junk;
-sh regrhive.ksh -f TEST005_junk;
++--process hive statement 'insert into thive values (1)';
++insert into hive.hive.thive values (1);
select a from hive.hive.thive;
insert into hive.hive.thive values (2);
select a from hive.hive.thive;
-process hive statement 'drop table thive';
-process hive statement 'create table thive(a int, b int)';
+drop table hive.hive.thive;
+create table hive.hive.thive(a int, b int);
- process hive statement 'insert into thive values (1,2)';
-sh echo "insert into thive values (1,2);" > TEST005_junk;
-sh regrhive.ksh -f TEST005_junk;
++--process hive statement 'insert into thive values (1,2)';
++insert into hive.hive.thive values (1,2);
select a from hive.hive.thive;
http://git-wip-us.apache.org/repos/asf/trafodion/blob/05bd8821/core/sql/regress/hive/TEST009_b.hive.sql
----------------------------------------------------------------------
diff --cc core/sql/regress/hive/TEST009_b.hive.sql
index e0a0ff5,b9d088d..be61593
--- a/core/sql/regress/hive/TEST009_b.hive.sql
+++ b/core/sql/regress/hive/TEST009_b.hive.sql
@@@ -20,15 -20,29 +20,17 @@@
-- specified by the configuration property hive.metastore.warehouse.dir.
--
============================================================================
--- Our version of HIVE does not support special characters. This test should
--- be changed to use delimited names once we upgrade HIVE.
+process hive ddl 'create schema if not exists sch_t009';
+process hive ddl 'drop table sch_t009.t009t1';
+process hive ddl 'create external table sch_t009.t009t1 (a int, b int, c int,
d int) row format delimited fields terminated by ''|'' location
''/user/trafodion/hive/exttables/t009t1'' ';
- -- Our version of HIVE does not support insert ... VALUES clause, so use the
- -- load command from an existing table.
- process hive statement 'insert into table sch_t009.t009t1 select
c_customer_sk, c_birth_day, c_birth_month, c_birth_year from customer limit 10
';
-create schema if not exists sch_t009;
-use sch_t009;
-drop table t009t1;
-create external table t009t1
-(
- a int,
- b int,
- c int,
- d int
-)
-row format delimited fields terminated by '|'
-location '/user/trafodion/hive/exttables/t009t1';
++-- process hive statement with insert runs into an error on HDP platform.
++-- Use regrhive until that issue is fixed.
++--process hive statement 'insert into table sch_t009.t009t1 select
c_customer_sk, c_birth_day, c_birth_month, c_birth_year from customer limit 10
';
++sh echo "insert into table sch_t009.t009t1 select c_customer_sk, c_birth_day,
c_birth_month, c_birth_year from customer limit 10;" > TEST009_junk;
++sh regrhive.ksh -f TEST009_junk;
--- Our version of HIVE does not support insert ... VALUES clause, so use the
--- load command from an existing table.
-insert into table t009t1
-select c_customer_sk, c_birth_day, c_birth_month, c_birth_year
-from default.customer
-limit 10;
+--select * from hive.sch_t009.t009t1;
-select * from t009t1;
http://git-wip-us.apache.org/repos/asf/trafodion/blob/05bd8821/core/sql/regress/seabase/EXPECTED031
----------------------------------------------------------------------
diff --cc core/sql/regress/seabase/EXPECTED031
index 0a67a92,6d8d542..a1b37fb
--- a/core/sql/regress/seabase/EXPECTED031
+++ b/core/sql/regress/seabase/EXPECTED031
@@@ -446,7 -446,7 +446,7 @@@ Z Z (EXPR) (EXPR
>>invoke t031t10;
-- Definition of Trafodion table TRAFODION.SCH.T031T10
- -- Definition current Sat Jun 2 02:17:30 2018
--- Definition current Sun Mar 11 00:49:14 2018
++-- Definition current Mon Jun 4 23:10:00 2018
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT
DROPPABLE
@@@ -630,20 -630,14 +630,21 @@@ LC RC OP OPERATOR OP
--- SQL operation complete.
>>
->>-- should return error.
->>process hive statement 'insert into t values (1)';
+>>-- should not return error.
+>>process hive statement 'drop table t';
-*** ERROR[3242] This statement is not supported. Reason: Only CREATE, DROP,
ALTER or TRUNCATE hive DDL statements can be specified.
+--- SQL operation complete.
+>>process hive statement 'create table t (a int)';
-*** ERROR[8822] The statement was not prepared.
+--- SQL operation complete.
- >>process hive statement 'insert into t values (1)';
-
- --- SQL operation complete.
+>>process hive statement 'drop table t';
+--- SQL operation complete.
+>>
++>>-- insert through "process hive statement" returns an error on HDP
platform.
++>>-- Disable it until that issue is fixed.
++>>--process hive statement 'insert into t values (1)';
+ >>
>>-- default USER
>>drop table if exists t031t1;
@@@ -654,7 -648,7 +655,7 @@@
>>invoke t031t1;
-- Definition of Trafodion table TRAFODION.SCH.T031T1
- -- Definition current Sat Jun 2 02:18:43 2018
--- Definition current Sun Mar 11 00:50:44 2018
++-- Definition current Mon Jun 4 23:11:15 2018
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT
DROPPABLE
@@@ -685,7 -679,7 +686,7 @@@ A
>>invoke t031t1;
-- Definition of Trafodion table TRAFODION.SCH.T031T1
- -- Definition current Sat Jun 2 02:18:50 2018
--- Definition current Sun Mar 11 00:50:53 2018
++-- Definition current Mon Jun 4 23:11:25 2018
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT
DROPPABLE
@@@ -736,7 -730,7 +737,7 @@@ A B
>>invoke t031t1;
-- Definition of Trafodion table TRAFODION.SCH.T031T1
- -- Definition current Sat Jun 2 02:18:59 2018
--- Definition current Sun Mar 11 00:51:05 2018
++-- Definition current Mon Jun 4 23:11:36 2018
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT
DROPPABLE
@@@ -765,7 -759,7 +766,7 @@@
>>invoke t031t1;
-- Definition of Trafodion table TRAFODION.SCH.T031T1
- -- Definition current Sat Jun 2 02:19:15 2018
--- Definition current Sun Mar 11 00:51:23 2018
++-- Definition current Mon Jun 4 23:11:52 2018
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT
DROPPABLE
@@@ -790,7 -784,7 +791,7 @@@
>>invoke t031t1;
-- Definition of Trafodion table TRAFODION.SCH.T031T1
- -- Definition current Sat Jun 2 02:19:22 2018
--- Definition current Sun Mar 11 00:51:32 2018
++-- Definition current Mon Jun 4 23:12:00 2018
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT
DROPPABLE
@@@ -810,7 -804,7 +811,7 @@@
>>invoke t031t1;
-- Definition of Trafodion table TRAFODION.SCH.T031T1
- -- Definition current Sat Jun 2 02:19:27 2018
--- Definition current Sun Mar 11 00:51:37 2018
++-- Definition current Mon Jun 4 23:12:07 2018
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT
DROPPABLE
@@@ -825,7 -819,7 +826,7 @@@
>>invoke t031v1;
-- Definition of Trafodion view TRAFODION.SCH.T031V1
- -- Definition current Sat Jun 2 02:19:30 2018
--- Definition current Sun Mar 11 00:51:41 2018
++-- Definition current Mon Jun 4 23:12:11 2018
(
A INT DEFAULT NULL
@@@ -848,7 -842,7 +849,7 @@@
>>invoke t031v1;
-- Definition of Trafodion view TRAFODION.SCH.T031V1
- -- Definition current Sat Jun 2 02:19:35 2018
--- Definition current Sun Mar 11 00:51:45 2018
++-- Definition current Mon Jun 4 23:12:15 2018
(
A INT DEFAULT NULL
@@@ -866,7 -860,7 +867,7 @@@
>>invoke t031v1;
-- Definition of Trafodion view TRAFODION.SCH.T031V1
- -- Definition current Sat Jun 2 02:19:40 2018
--- Definition current Sun Mar 11 00:51:52 2018
++-- Definition current Mon Jun 4 23:12:21 2018
(
A INT DEFAULT NULL
@@@ -953,7 -947,7 +954,7 @@@ CREATE INDEX T031T1I1 ON TRAFODION.SCH.
>>invoke table(index_table t031t1i1);
-- Definition of Trafodion table TRAFODION.SCH.T031T1I1
- -- Definition current Sat Jun 2 02:20:02 2018
--- Definition current Sun Mar 11 00:52:20 2018
++-- Definition current Mon Jun 4 23:12:45 2018
(
"A@" INT NO DEFAULT
@@@ -1098,7 -1092,7 +1099,7 @@@ CREATE TABLE HIVE.HIVE.T031HIVET
/* Trafodion DDL */
REGISTER /*INTERNAL*/ HIVE TABLE HIVE.HIVE.T031HIVET1;
- /* ObjectUID = 6094095443794522678 */
-/* ObjectUID = 596882092547840046 */
++/* ObjectUID = 6747117915818847408 */
CREATE EXTERNAL TABLE T031HIVET1
FOR HIVE.HIVE.T031HIVET1
@@@ -1265,8 -1259,8 +1266,8 @@@
A@ SYSKEY
----------- --------------------
- 1 6394711054759248971
- 2 6394711054759564196
- 1 2046478438118704386
- 2 2046478438119028079
++ 1 7183404187467833116
++ 2 7183404187468147950
--- 2 row(s) selected.
>>
http://git-wip-us.apache.org/repos/asf/trafodion/blob/05bd8821/core/sql/regress/seabase/TEST031
----------------------------------------------------------------------
diff --cc core/sql/regress/seabase/TEST031
index 6d2b182,aa9cf09..92decd1
--- a/core/sql/regress/seabase/TEST031
+++ b/core/sql/regress/seabase/TEST031
@@@ -215,12 -215,9 +215,15 @@@ control query shape cut
cqd hdfs_io_buffersize reset ;
cqd hive_min_bytes_per_esp_partition reset;
--- should return error.
-process hive statement 'insert into t values (1)';
+-- should not return error.
+process hive statement 'drop table t';
+process hive statement 'create table t (a int)';
- process hive statement 'insert into t values (1)';
+process hive statement 'drop table t';
+
++-- insert through "process hive statement" returns an error on HDP platform.
++-- Disable it until that issue is fixed.
++--process hive statement 'insert into t values (1)';
+
-- default USER
drop table if exists t031t1;
create table t031t1 (a int, b varchar(20) default user);