public static Map<String, String> columnStartAndEndTimeFromXColumns(XColumns columns) { if (columns != null && !columns.getColumn().isEmpty()) { Map<String, String> colStartTimeMap = new HashMap<String, String>(); for (XColumn c : columns.getColumn()) { if (!(c.getStartTime() == null)) { colStartTimeMap.put(MetastoreConstants.FACT_COL_START_TIME_PFX.concat(c.getName()), c.getStartTime()); } if (!(c.getEndTime() == null)) { colStartTimeMap.put(MetastoreConstants.FACT_COL_END_TIME_PFX.concat(c.getName()), c.getEndTime()); } } return colStartTimeMap; } return null; }
public static Map<String, String> columnStartAndEndTimeFromXColumns(XColumns columns) { if (columns != null && !columns.getColumn().isEmpty()) { Map<String, String> colStartTimeMap = new HashMap<String, String>(); for (XColumn c : columns.getColumn()) { if (!(c.getStartTime() == null)) { colStartTimeMap.put(MetastoreConstants.FACT_COL_START_TIME_PFX.concat(c.getName()), c.getStartTime()); } if (!(c.getEndTime() == null)) { colStartTimeMap.put(MetastoreConstants.FACT_COL_END_TIME_PFX.concat(c.getName()), c.getEndTime()); } } return colStartTimeMap; } return null; }
public static FieldSchema fieldSchemaFromColumn(XColumn c) { if (c == null) { return null; } return new FieldSchema(c.getName(), c.getType().toLowerCase(), c.getComment()); }
public static FieldSchema fieldSchemaFromColumn(XColumn c) { if (c == null) { return null; } return new FieldSchema(c.getName(), c.getType().toLowerCase(), c.getComment()); }
public static Map<String, Set<String>> getStorageTablePartitionColumnsFromTableDescs(XStorageTables storageTables) { Map<String, Set<String>> storageTablePartitionColumns = new HashMap<>(); if (storageTables != null && !storageTables.getStorageTable().isEmpty()) { for (XStorageTableElement xStorageTableElement : storageTables.getStorageTable()) { Set<String> partitionColumns = new HashSet<>(); if (xStorageTableElement.getTableDesc() != null && xStorageTableElement.getTableDesc().getPartCols() != null) { for (XColumn xColumn : xStorageTableElement.getTableDesc().getPartCols().getColumn()) { partitionColumns.add(xColumn.getName()); } } storageTablePartitionColumns.put(xStorageTableElement.getStorageName(), partitionColumns); } } return storageTablePartitionColumns; }
assertEquals(actual.getColumns().getColumn().get(0).getName(), "col1"); assertEquals(actual.getStorageDescriptor().getPartCols().getColumn().size(), 1); assertEquals(actual.getStorageDescriptor().getPartCols().getColumn().get(0).getName(), "pcol1"); assertEquals(actual.getTableType(), TableType.MANAGED_TABLE.name()); assertFalse(actual.getStorageDescriptor().isExternal());
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName); } { String theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType); } { String theComment; theComment = this.getComment(); strategy.appendField(locator, this, "comment", buffer, theComment); } { String theStartTime; theStartTime = this.getStartTime(); strategy.appendField(locator, this, "startTime", buffer, theStartTime); } { String theEndTime; theEndTime = this.getEndTime(); strategy.appendField(locator, this, "endTime", buffer, theEndTime); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName); } { String theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType); } { String theComment; theComment = this.getComment(); strategy.appendField(locator, this, "comment", buffer, theComment); } { String theStartTime; theStartTime = this.getStartTime(); strategy.appendField(locator, this, "startTime", buffer, theStartTime); } { String theEndTime; theEndTime = this.getEndTime(); strategy.appendField(locator, this, "endTime", buffer, theEndTime); } return buffer; }
boolean foundCol = false; for (XColumn col : colList) { if (col.getName().equals("col3") && col.getType().equals("string") && "Added column".equalsIgnoreCase(col.getComment())) { foundCol = true;
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName); } { String theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } { String theComment; theComment = this.getComment(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "comment", theComment), currentHashCode, theComment); } { String theStartTime; theStartTime = this.getStartTime(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "startTime", theStartTime), currentHashCode, theStartTime); } { String theEndTime; theEndTime = this.getEndTime(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "endTime", theEndTime), currentHashCode, theEndTime); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName); } { String theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } { String theComment; theComment = this.getComment(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "comment", theComment), currentHashCode, theComment); } { String theStartTime; theStartTime = this.getStartTime(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "startTime", theStartTime), currentHashCode, theStartTime); } { String theEndTime; theEndTime = this.getEndTime(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "endTime", theEndTime), currentHashCode, theEndTime); } return currentHashCode; }