CarbonTable implements Serializable { public CarbonDimension getDimensionByName(String tableName, String columnName) { List<CarbonDimension> dimList = tableDimensionsMap.get(tableName); for (CarbonDimension dim : dimList) { if (dim.getColName().equalsIgnoreCase(columnName)) { return dim; } } return null; } CarbonTable(); void loadCarbonTable(TableInfo tableInfo); String getDatabaseName(); String getFactTableName(); String getTableUniqueName(); String getMetaDataFilepath(); String getStorePath(); List<String> getAggregateTablesName(); long getTableLastUpdatedTime(); int getNumberOfDimensions(String tableName); int getNumberOfMeasures(String tableName); List<CarbonDimension> getDimensionByTableName(String tableName); List<CarbonMeasure> getMeasureByTableName(String tableName); CarbonMeasure getMeasureByName(String tableName, String columnName); CarbonDimension getDimensionByName(String tableName, String columnName); List<CarbonDimension> getChildren(String dimName); List<CarbonDimension> getChildren(String dimName, List<CarbonDimension> dimensions); AbsoluteTableIdentifier getAbsoluteTableIdentifier(); CarbonTableIdentifier getCarbonTableIdentifier(); int getPartitionCount();  }
@Test public void testDimensionPresentInTableIsProper() { CarbonDimension dimension = new CarbonDimension(getColumnarDimensionColumn(), 0, -1, -1,-1); assertTrue(carbonTable.getDimensionByName("carbonTestTable", "IMEI").equals(dimension)); }