Package sql.schema.parser.SchemaParser

Examples of sql.schema.parser.SchemaParser.ColumnInfo


      throw new RuntimeException("Schema " + _path + " cannot be parsed!\n " + err);
    }
  }

  public boolean contains(String fullSchemaColumnName) {
    final ColumnInfo column = getColumnInfo(fullSchemaColumnName);
    return (column != null);
  }
View Full Code Here


   * from contains(), so each caller has to be aware that this method might
   * return null
   */
  private ColumnInfo getColumnInfo(String tableSchemaName, String columnName) {
    final TableInfo table = getTableInfo(tableSchemaName);
    final ColumnInfo column = table.getColumnInfos().get(columnName);
    return column;
  }
View Full Code Here

    final ColumnInfo column = table.getColumnInfos().get(columnName);
    return column;
  }

  public long getNumDistinctValues(String fullSchemaColumnName) {
    final ColumnInfo column = getColumnInfo(fullSchemaColumnName);
    final long distinct = column.getDistinctValues();
    if (distinct == SchemaParser.INVALID)
      throw new RuntimeException(
          "No information about the number of distinct values for column "
              + fullSchemaColumnName
              + "\n Either add required information to schema "
View Full Code Here

  public Range getRange(String fullSchemaColumnName) {
    // TODO : if we don't have it, we can assume integers from [0,
    // distinctValues]

    final ColumnInfo column = getColumnInfo(fullSchemaColumnName);
    final Object min = column.getMinValue();
    final Object max = column.getMaxValue();
    if (min == null || max == null)
      throw new RuntimeException(
          "No complete information about ranges for column "
              + fullSchemaColumnName
              + "\n Either add required information to schema "
View Full Code Here

  /*
   * For a field N1.NATIONNAME, fullSchemaColumnName is NATION.NATIONNAME
   */
  public TypeConversion getType(String fullSchemaColumnName) {
    final ColumnInfo column = getColumnInfo(fullSchemaColumnName);
    if (column == null)
      throw new RuntimeException("Column " + fullSchemaColumnName + " does not exist !");
    return column.getType();
  }
View Full Code Here

TOP

Related Classes of sql.schema.parser.SchemaParser.ColumnInfo

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.