/** * Given a list of model field schemas, create a new model column descriptor. * @param cols the columns the column descriptor contains * @return a new column descriptor db-backed object */ private MColumnDescriptor createNewMColumnDescriptor(List<MFieldSchema> cols) { if (cols == null) { return null; } return new MColumnDescriptor(cols); }
MConstraint currConstraint = (MConstraint) i.next(); List<MFieldSchema> cols = currConstraint.getParentColumn() != null ? currConstraint.getParentColumn().getCols() : currConstraint.getParentTable().getPartitionKeys(); int enableValidateRely = currConstraint.getEnableValidateRely(); boolean enable = (enableValidateRely & 4) != 0;
int parentIntegerIndex = getColumnIndexFromTableColumns(parentCD == null ? null : parentCD.getCols(), columnName); if (parentIntegerIndex == -1) { if (parentTable.getPartitionKeys() != null) {
/** * Given a list of model field schemas, create a new model column descriptor. * @param cols the columns the column descriptor contains * @return a new column descriptor db-backed object */ private MColumnDescriptor createNewMColumnDescriptor(List<MFieldSchema> cols) { if (cols == null) { return null; } return new MColumnDescriptor(cols); }
MConstraint currConstraint = (MConstraint) i.next(); List<MFieldSchema> cols = currConstraint.getParentColumn() != null ? currConstraint.getParentColumn().getCols() : currConstraint.getParentTable().getPartitionKeys(); int enableValidateRely = currConstraint.getEnableValidateRely(); boolean enable = (enableValidateRely & 4) != 0;
/** * Given a list of model field schemas, create a new model column descriptor. * @param cols the columns the column descriptor contains * @return a new column descriptor db-backed object */ private MColumnDescriptor createNewMColumnDescriptor(List<MFieldSchema> cols) { if (cols == null) { return null; } return new MColumnDescriptor(cols); }
int parentIntegerIndex = getColumnIndexFromTableColumns(parentCD == null ? null : parentCD.getCols(), columnName); if (parentIntegerIndex == -1) { if (parentTable.getPartitionKeys() != null) {
/** * Given a list of model field schemas, create a new model column descriptor. * @param cols the columns the column descriptor contains * @return a new column descriptor db-backed object */ private MColumnDescriptor createNewMColumnDescriptor(List<MFieldSchema> cols) { if (cols == null) { return null; } return new MColumnDescriptor(cols); }
MConstraint currConstraint = (MConstraint) i.next(); List<MFieldSchema> cols = currConstraint.getParentColumn() != null ? currConstraint.getParentColumn().getCols() : currConstraint.getParentTable().getPartitionKeys(); int enableValidateRely = currConstraint.getEnableValidateRely(); boolean enable = (enableValidateRely & 4) != 0;
/** * Given a list of model field schemas, create a new model column descriptor. * @param cols the columns the column descriptor contains * @return a new column descriptor db-backed object */ private MColumnDescriptor createNewMColumnDescriptor(List<MFieldSchema> cols) { if (cols == null) { return null; } return new MColumnDescriptor(cols); }
final List<MFieldSchema> childCols = childCD == null || childCD.getCols() == null ? new ArrayList<>() : new ArrayList<>(childCD.getCols()); if (childTable.getPartitionKeys() != null) { childCols.addAll(childTable.getPartitionKeys()); parentCols = parentCD == null || parentCD.getCols() == null ? new ArrayList<>() : new ArrayList<>(parentCD.getCols()); if (parentTable.getPartitionKeys() != null) { parentCols.addAll(parentTable.getPartitionKeys()); final SQLForeignKey foreignKey = foreignKeys.get(i); final String fkColumnName = normalizeIdentifier(foreignKey.getFkcolumn_name()); int childIntegerIndex = getColumnIndexFromTableColumns(childCD.getCols(), fkColumnName); if (childIntegerIndex == -1) { if (childTable.getPartitionKeys() != null) { int parentIntegerIndex = getColumnIndexFromTableColumns(parentCD.getCols(), pkColumnName); if (parentIntegerIndex == -1) { if (parentTable.getPartitionKeys() != null) {
MConstraint currPK = (MConstraint) i.next(); List<MFieldSchema> cols = currPK.getParentColumn() != null ? currPK.getParentColumn().getCols() : currPK.getParentTable().getPartitionKeys(); int enableValidateRely = currPK.getEnableValidateRely(); boolean enable = (enableValidateRely & 4) != 0;
MConstraint currConstraint = (MConstraint) i.next(); List<MFieldSchema> cols = currConstraint.getParentColumn() != null ? currConstraint.getParentColumn().getCols() : currConstraint.getParentTable().getPartitionKeys(); int enableValidateRely = currConstraint.getEnableValidateRely(); boolean enable = (enableValidateRely & 4) != 0;
int parentIntegerIndex = getColumnIndexFromTableColumns(parentCD == null ? null : parentCD.getCols(), columnName); if (parentIntegerIndex == -1) { if (parentTable.getPartitionKeys() != null) {
MConstraint currPKFK = (MConstraint) i.next(); List<MFieldSchema> parentCols = currPKFK.getParentColumn() != null ? currPKFK.getParentColumn().getCols() : currPKFK.getParentTable().getPartitionKeys(); List<MFieldSchema> childCols = currPKFK.getChildColumn() != null ? currPKFK.getChildColumn().getCols() : currPKFK.getChildTable().getPartitionKeys(); int enableValidateRely = currPKFK.getEnableValidateRely(); boolean enable = (enableValidateRely & 4) != 0;
int parentIntegerIndex = getColumnIndexFromTableColumns(parentCD == null ? null : parentCD.getCols(), columnName); if (parentIntegerIndex == -1) { if (parentTable.getPartitionKeys() != null) {
private StorageDescriptor convertToStorageDescriptor( MStorageDescriptor msd, boolean noFS) throws MetaException { if (msd == null) { return null; } List<MFieldSchema> mFieldSchemas = msd.getCD() == null ? null : msd.getCD().getCols(); StorageDescriptor sd = new StorageDescriptor(noFS ? null : convertToFieldSchemas(mFieldSchemas), msd.getLocation(), msd.getInputFormat(), msd.getOutputFormat(), msd .isCompressed(), msd.getNumBuckets(), convertToSerDeInfo(msd .getSerDeInfo(), true), convertList(msd.getBucketCols()), convertToOrders(msd .getSortCols()), convertMap(msd.getParameters())); SkewedInfo skewedInfo = new SkewedInfo(convertList(msd.getSkewedColNames()), convertToSkewedValues(msd.getSkewedColValues()), covertToSkewedMap(msd.getSkewedColValueLocationMaps())); sd.setSkewedInfo(skewedInfo); sd.setStoredAsSubDirectories(msd.isStoredAsSubDirectories()); return sd; }
private SchemaVersion convertToSchemaVersion(MSchemaVersion mSchemaVersion) throws MetaException { if (mSchemaVersion == null) { return null; } SchemaVersion schemaVersion = new SchemaVersion( new ISchemaName(mSchemaVersion.getiSchema().getDb().getCatalogName(), mSchemaVersion.getiSchema().getDb().getName(), mSchemaVersion.getiSchema().getName()), mSchemaVersion.getVersion(), mSchemaVersion.getCreatedAt(), convertToFieldSchemas(mSchemaVersion.getCols().getCols())); if (mSchemaVersion.getState() > 0) { schemaVersion.setState(SchemaVersionState.findByValue(mSchemaVersion.getState())); } if (mSchemaVersion.getDescription() != null) { schemaVersion.setDescription(mSchemaVersion.getDescription()); } if (mSchemaVersion.getSchemaText() != null) { schemaVersion.setSchemaText(mSchemaVersion.getSchemaText()); } if (mSchemaVersion.getFingerprint() != null) { schemaVersion.setFingerprint(mSchemaVersion.getFingerprint()); } if (mSchemaVersion.getName() != null) { schemaVersion.setName(mSchemaVersion.getName()); } if (mSchemaVersion.getSerDe() != null) { schemaVersion.setSerDe(convertToSerDeInfo(mSchemaVersion.getSerDe(), false)); } return schemaVersion; }