}
public void visit(Select query) {
super.visit(query);
if (query.isDistinct()) {
exceptions.add(new TranslatorException(SalesForcePlugin.Util.getString("SelectVisitor.distinct.not.supported")));
}
selectSymbols = query.getDerivedColumns();
selectSymbolCount = selectSymbols.size();
Iterator<DerivedColumn> symbolIter = selectSymbols.iterator();
int index = 0;
while (symbolIter.hasNext()) {
DerivedColumn symbol = symbolIter.next();
// get the name in source
Expression expression = symbol.getExpression();
if (expression instanceof ColumnReference) {
Column element = ((ColumnReference) expression).getMetadataObject();
selectSymbolIndexToElement.put(index, element);
String qualifiedName = element.getParent().getNameInSource() + ':' + element.getNameInSource();
selectSymbolNameToIndex .put(qualifiedName, index);
String nameInSource = element.getNameInSource();
if (null == nameInSource || nameInSource.length() == 0) {
exceptions.add(new TranslatorException("name in source is null or empty for column "+ symbol.toString()));
continue;
}
if (nameInSource.equalsIgnoreCase("id")) {
idIndex = index;
}