Package com.alibaba.wasp.plan.action

Examples of com.alibaba.wasp.plan.action.ColumnStruct


        }
        j++;
      }
      // Check the input is the same as DataType
      checkType(column, exprValues.get(i));
      ColumnStruct columnAction = new ColumnStruct(table.getTableName(),
          column.getFamily(), columnName, column.getType(), value);
      cols.add(columnAction);
      i++;
    }
View Full Code Here


    LinkedHashMap<String, Field> fields = table.getColumns();
    for (String fieldname : queryInfo.getAllConditionFieldName()) {
      if(!index.getIndexKeys().containsKey(fieldname)) {
        Field field = fields.get(fieldname);
        if(field != null) {
          ColumnStruct column = buildColumnStruct(table, queryInfo, field);
          columns.add(column);
        }
      }
    }
    return columns;
View Full Code Here

    List<ColumnStruct> columns = new ArrayList<ColumnStruct>();
    LinkedHashMap<String, Field> fields = table.getColumns();
    for (String fieldname : queryInfo.getAllConditionFieldName()) {
      Field field = fields.get(fieldname);
      if(field != null) {
        ColumnStruct column = buildColumnStruct(table, queryInfo, field);
        columns.add(column);
      }
    }
    return columns;
  }
View Full Code Here

    return columns;
  }

  private ColumnStruct buildColumnStruct(FTable table, QueryInfo queryInfo, Field field) throws UnsupportedException {
    Condition condition = queryInfo.getField(field.getName());
    ColumnStruct column = null;
    if(condition.getType() == ConditionType.EQUAL) {
      column = new ColumnStruct(table.getTableName(), field.getFamily(), field.getName(), field.getType(),
          DruidParser.convert(field, condition.getValue()),
          ParserUtils.parseSQLBinaryOperatorToIntValue(SQLBinaryOperator.Equality));
    } else {
      SQLBinaryOperator leftOperator = condition.getLeftOperator();
      SQLBinaryOperator rightOperator = condition.getRightOperator();
      column = new ColumnStruct(table.getTableName(), field.getFamily(), field.getName(), field.getType(),
          DruidParser.convert(field, leftOperator != null ? condition.getLeft() : condition.getRight()),
          ParserUtils.parseSQLBinaryOperatorToIntValue(leftOperator != null ? leftOperator : rightOperator));
    }
    return column;
  }
View Full Code Here

    for (String item : selectItem) {
      // Get the column's familyName
      String familyName = metaEventOperation.getColumnFamily(
          table.getTableName(), item);
      Field field = table.getColumn(item);
      ColumnStruct column = new ColumnStruct(table.getTableName(), familyName,
          item, field.getType());
      selectEntityColumns.add(column);
    }
    return selectEntityColumns;
  }
View Full Code Here

      // Get the column's familyName
      familyName = metaEventOperation.getColumnFamily(
          table.getTableName(), item);
      Field field = table.getColumn(item);
      if (index.getStoring().containsKey(item)) {
        ColumnStruct column = new ColumnStruct(table.getTableName(),
            FConstants.INDEX_STORING_FAMILY_STR, item, field.getType());
        selectStoringColumns.add(column);
      } else {
        ColumnStruct column = new ColumnStruct(table.getTableName(),
            familyName, item, field.getType());
        selectEntityColumns.add(column);
      }
    }
    // if not only query storing columns, will be query the column with others.
    if(selectEntityColumns.size() > 0) {
      for (ColumnStruct selectStoringColumn : selectStoringColumns) {
        ColumnStruct column = new ColumnStruct(table.getTableName(),
            familyName, selectStoringColumn.getColumnName(), selectStoringColumn.getDataType());
        selectEntityColumns.add(column);
      }
    }
    return new Pair<List<ColumnStruct>, List<ColumnStruct>>(
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.plan.action.ColumnStruct

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.