This is an automated email from the ASF dual-hosted git repository.
dbirdsall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafodion.git
The following commit(s) were added to refs/heads/master by this push:
new ec2d9c9 [TRAFODION-3315] Add Hive excption info to OSIM Hive error
message
new 9b9f0be Merge pull request #1847 from DaveBirdsall/Trafodion3315
ec2d9c9 is described below
commit ec2d9c910e62ae15d10fa7371b4307d7d6b53f9e
Author: Dave Birdsall <[email protected]>
AuthorDate: Wed Jul 3 20:17:46 2019 +0000
[TRAFODION-3315] Add Hive excption info to OSIM Hive error message
---
core/sql/optimizer/OptimizerSimulator.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/core/sql/optimizer/OptimizerSimulator.cpp
b/core/sql/optimizer/OptimizerSimulator.cpp
index 8441386..cb25c9c 100644
--- a/core/sql/optimizer/OptimizerSimulator.cpp
+++ b/core/sql/optimizer/OptimizerSimulator.cpp
@@ -1542,7 +1542,13 @@ NABoolean
OptimizerSimulator::massageTableUID(OsimHistogramEntry* entry, NAHashD
void OptimizerSimulator::execHiveSQL(const char* hiveSQL)
{
if (HiveClient_JNI::executeHiveSQL(hiveSQL) != HVC_OK)
- raiseOsimException("Error running hive SQL.");
+ {
+ NAString error("Error running hive SQL. ");
+ const char * jniErrorStr = GetCliGlobals()->getJniErrorStr();
+ if (jniErrorStr)
+ error += jniErrorStr;
+ raiseOsimException(error.data());
+ }
}
short OptimizerSimulator::loadHistogramsTable(NAString* modifiedPath,
QualifiedName * qualifiedName, unsigned int bufLen, NABoolean isHive)