private void copyExpressionMetadata(Expression toCopy, QueryMetadataInterface metadata, Column column) throws QueryMetadataException, TeiidComponentException { //determine the column metadata toCopy = SymbolMap.getExpression(toCopy); boolean metadataSet = false; if (toCopy instanceof ElementSymbol) { Object mid = ((ElementSymbol) toCopy).getMetadataID(); if (mid instanceof Column) { metadataSet = true; Column other = (Column)mid; column.setCaseSensitive(other.isCaseSensitive()); column.setCharOctetLength(other.getCharOctetLength()); column.setCurrency(other.isCurrency()); column.setFixedLength(other.isFixedLength()); column.setFormat(other.getFormat()); column.setLength(other.getLength()); column.setNullType(other.getNullType()); column.setPrecision(other.getPrecision()); column.setRadix(other.getRadix()); column.setScale(other.getScale()); column.setSigned(other.isSigned()); } } if (!metadataSet) { MetaDataProcessor.setColumnMetadata(column, toCopy, metadata); } }
private void copyExpressionMetadata(Expression toCopy, QueryMetadataInterface metadata, Column column) throws QueryMetadataException, TeiidComponentException { //determine the column metadata toCopy = SymbolMap.getExpression(toCopy); boolean metadataSet = false; if (toCopy instanceof ElementSymbol) { Object mid = ((ElementSymbol) toCopy).getMetadataID(); if (mid instanceof Column) { metadataSet = true; Column other = (Column)mid; column.setCaseSensitive(other.isCaseSensitive()); column.setCharOctetLength(other.getCharOctetLength()); column.setCurrency(other.isCurrency()); column.setFixedLength(other.isFixedLength()); column.setFormat(other.getFormat()); column.setLength(other.getLength()); column.setNullType(other.getNullType()); column.setPrecision(other.getPrecision()); column.setRadix(other.getRadix()); column.setScale(other.getScale()); column.setSigned(other.isSigned()); } } if (!metadataSet) { MetaDataProcessor.setColumnMetadata(column, toCopy, metadata); } }