private boolean isGropTableFilter(TableFilter filter) {
   TableMate table1 = (TableMate) filter.getTable();
   for (TableFilter item : filters) {
     if (item == filter || isNestedJoinTable(item)) {
       continue;
     }
     TableMate table2 = (TableMate) item.getTable();
     TableRule rule1 = table1.getTableRule();
     TableRule rule2 = table2.getTableRule();
     if (!rule1.isNodeComparable(rule2)) {
       return false;
     }
   }
   return true;
 }
Beispiel #2
0
 public void loadMataData(Session session) {
   ObjectNode node = tableRule.getMetadataNode();
   String tableName = node.getCompositeObjectName();
   String shardName = node.getShardName();
   try {
     trace.debug("Try to load {0} metadata from table {1}.{2}", getName(), shardName, tableName);
     readMataData(session, node);
     trace.debug("Load the {0} metadata success.", getName());
     initException = null;
   } catch (DbException e) {
     if (e.getErrorCode() == ErrorCode.COLUMN_NOT_FOUND_1) {
       throw e;
     }
     trace.debug(
         "Fail to load {0} metadata from table {1}.{2}. error: {3}",
         getName(), shardName, tableName, e.getCause().getMessage());
     initException = e;
     Column[] cols = {};
     setColumns(cols);
   }
   if (isInited()) {
     setRuleColumns();
   }
 }