Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/516#discussion_r65594458
--- Diff: core/sql/optimizer/RelExeUtil.cpp ---
@@ -4981,9 +4981,43 @@ RelExpr * ExeUtilFastDelete::bindNode(BindWA *bindWA)
{
// do not do override schema for this
bindWA->setToOverrideSchema(FALSE);
-
+
naTable = bindWA->getNATable(getTableName());
- if (getTableName().isSeabase())
+ if (getTableName().isHive())
+ {
+ if (! naTable)
+ {
+ *CmpCommon::diags() << DgSqlCode(-4222) << DgString0("PURGEDATA");
+ bindWA->setErrStatus();
+ return NULL;
+ }
+
+ const HHDFSTableStats* hTabStats =
+ naTable->getClusteringIndex()->getHHDFSTableStats();
+
+ isHiveTable_ = TRUE;
+
+ const char * hiveTablePath = (*hTabStats)[0]->getDirName();
+ NAString hostName;
+ Int32 hdfsPort;
+ NAString tableDir;
+
+ NABoolean result = ((HHDFSTableStats* )hTabStats)->splitLocation
+ (hiveTablePath, hostName, hdfsPort, tableDir) ;
+ if (!result)
+ {
+ *CmpCommon::diags() << DgSqlCode(-4224)
+ << DgString0(hiveTablePath);
+ bindWA->setErrStatus();
+ return this;
--- End diff --
Shouldn't this be "return NULL"?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
|