private Column addColumn(Expression toCopy, Table table, MetadataFactory mf, QueryMetadataInterface metadata) throws TranslatorException, QueryMetadataException, TeiidComponentException { String name = Symbol.getShortName(toCopy); Class<?> type = toCopy.getType(); if (type == null) { throw new TranslatorException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31086, name, table.getFullName())); } Column column = mf.addColumn(name, DataTypeManager.getDataTypeName(type), table); column.setUpdatable(table.supportsUpdate()); copyExpressionMetadata(toCopy, metadata, column); return column; }
private Column addColumn(Expression toCopy, Table table, MetadataFactory mf, QueryMetadataInterface metadata) throws TranslatorException, QueryMetadataException, TeiidComponentException { String name = Symbol.getShortName(toCopy); Class<?> type = toCopy.getType(); if (type == null) { throw new TranslatorException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31086, name, table.getFullName())); } Column column = mf.addColumn(name, DataTypeManager.getDataTypeName(type), table); column.setUpdatable(table.supportsUpdate()); copyExpressionMetadata(toCopy, metadata, column); return column; }
Expression projected = symbols.get(i); MetadataFactory.setDataType(DataTypeManager.getDataTypeName(projected.getType()), c, mf.getDataTypes(), false); copyExpressionMetadata(projected, metadata, c);
Expression projected = symbols.get(i); MetadataFactory.setDataType(DataTypeManager.getDataTypeName(projected.getType()), c, mf.getDataTypes(), false); copyExpressionMetadata(projected, metadata, c);