priyankporwal commented on a change in pull request #665: PHOENIX-5650:
IndexUpgradeTool does not rebuild view indexes
URL: https://github.com/apache/phoenix/pull/665#discussion_r363512197
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexUpgradeTool.java
##########
@@ -673,16 +668,21 @@ private boolean
extractTablesAndIndexes(PhoenixConnection conn) {
return indexInfos;
}
+ @VisibleForTesting
+ public String getViewSql(String tableName, String schemaName) {
+ return "SELECT DISTINCT COLUMN_FAMILY, TENANT_ID FROM "
+ + "SYSTEM.CHILD_LINK "
+ + "WHERE TABLE_NAME = \'" + tableName + "\' "
+ + (!StringUtil.EMPTY_STRING.equals(schemaName) ? "AND
TABLE_SCHEM = \'"
Review comment:
That seems like a very long way to check emptiness of a string. Perhaps add
an isEmpty() fn in StringUtil class, if schemaName.isEmpty() is not sufficient
for whatever reason.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services