Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1579#discussion_r190638403
--- Diff: core/sql/sqlcomp/CmpSeabaseDDLcommentOn.cpp ---
@@ -338,6 +338,15 @@ void
CmpSeabaseDDL::doSeabaseCommentOn(StmtDDLCommentOn *commentOnNode,
textType = COM_COLUMN_COMMENT_TEXT;
subID = commentOnNode->getColNum();
}
+
+ // cannot set comment on hbase native table
+ if (str_cmp(toUpper(catalogNamePart.data()), "HBASE", 5) == 0)
+ {
+ CmpCommon::diags()->clear();
+ *CmpCommon::diags() << DgSqlCode(-1722);
+ processReturn();
+ return;
+ }
--- End diff --
Three comments:
1. There is a literal, HBASE_SYSTEM_CATALOG, that should be used instead of
hard-coding the string "HBASE" in line 343. (See common/ComSmallDefs.h.)
2. In your error message text, you have a $0 ~ String0 parameter, but you
don't set that here. To set it, you need to add "*CmpCommon::diags() <<
DgString0(some string text)". Alternatively, you could remove the '$0 ~
String0' from your message text in bin/SqlciErrors.txt.
3. Minor point. The indentation is irregular. Perhaps you have tabs on some
lines and spaces on others. If you could make it uniform with the surrounding
code it will be easier to read.
---