gokceni commented on a change in pull request #864:
URL: https://github.com/apache/phoenix/pull/864#discussion_r489613600
##########
File path: phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
##########
@@ -1524,6 +1525,40 @@ public Integer getBucketNum() {
return indexes;
}
+ @Override
+ public List<PTable> getIndexes(boolean viewOnly) {
+ List<PTable> indexes = new ArrayList<>();
+ indexes.addAll(this.indexes);
+ if (viewOnly) {
+ for (PTable index: this.indexes) {
+ if(index.getTableName().toString().contains("#")) {
+ indexes.remove(index);
+ }
+ }
+ }
+ return indexes;
+ }
+
+ @Override
+ public List<PTable> getIndexes(List<NamedNode> indexes) {
+ List<PTable> indexesPTable =
Lists.newArrayListWithExpectedSize(indexes.size());
+ List<String> indexesParam =
Lists.newArrayListWithExpectedSize(indexes.size());
+ for (NamedNode index : indexes) {
+ indexesParam.add(index.getName());
+ }
+ for (PTable index : this.indexes) {
Review comment:
Can you add a comment what this loop is doing?
----------------------------------------------------------------
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]