private Map<Integer, Object> createAggregateMetadata(String shortColumnName, AggregateSymbol symbol) throws QueryMetadataException, TeiidComponentException { Type function = symbol.getAggregateFunction(); if(function == Type.MIN || function == Type.MAX){ Expression expression = symbol.getArg(0); if(expression instanceof ElementSymbol) { return createColumnMetadata(shortColumnName, expression); } } return createTypedMetadata(shortColumnName, symbol); }
private Map<Integer, Object> createAggregateMetadata(String shortColumnName, AggregateSymbol symbol) throws QueryMetadataException, TeiidComponentException { Type function = symbol.getAggregateFunction(); if(function == Type.MIN || function == Type.MAX){ Expression expression = symbol.getArg(0); if(expression instanceof ElementSymbol) { return createColumnMetadata(shortColumnName, expression); } } return createTypedMetadata(shortColumnName, symbol); }
private Map<Integer, Object> createAggregateMetadata(String shortColumnName, AggregateSymbol symbol) throws QueryMetadataException, TeiidComponentException { Type function = symbol.getAggregateFunction(); if(function == Type.MIN || function == Type.MAX){ Expression expression = symbol.getArg(0); if(expression instanceof ElementSymbol) { return createColumnMetadata(shortColumnName, expression); } } return createTypedMetadata(shortColumnName, symbol); }
private Map<Integer, Object> createColumnMetadata(String label, Expression symbol) throws QueryMetadataException, TeiidComponentException { if(symbol instanceof ElementSymbol) { return createElementMetadata(label, (ElementSymbol) symbol); } symbol = SymbolMap.getExpression(symbol); if (symbol instanceof AggregateSymbol) { return createAggregateMetadata(label, (AggregateSymbol)symbol); } else if (symbol instanceof WindowFunction) { return createAggregateMetadata(label, ((WindowFunction)symbol).getFunction()); } return createTypedMetadata(label, symbol); }
private Map<Integer, Object> createColumnMetadata(String label, Expression symbol) throws QueryMetadataException, TeiidComponentException { if(symbol instanceof ElementSymbol) { return createElementMetadata(label, (ElementSymbol) symbol); } symbol = SymbolMap.getExpression(symbol); if (symbol instanceof AggregateSymbol) { return createAggregateMetadata(label, (AggregateSymbol)symbol); } else if (symbol instanceof WindowFunction) { return createAggregateMetadata(label, ((WindowFunction)symbol).getFunction()); } return createTypedMetadata(label, symbol); }
private Map<Integer, Object> createColumnMetadata(String label, Expression symbol) throws QueryMetadataException, TeiidComponentException { if(symbol instanceof ElementSymbol) { return createElementMetadata(label, (ElementSymbol) symbol); } symbol = SymbolMap.getExpression(symbol); if (symbol instanceof AggregateSymbol) { return createAggregateMetadata(label, (AggregateSymbol)symbol); } else if (symbol instanceof WindowFunction) { return createAggregateMetadata(label, ((WindowFunction)symbol).getFunction()); } return createTypedMetadata(label, symbol); }