throw new InvalidQueryException(query,
"A function call is not supported in the primary path expression; therefore '"
+ primary + "' is not valid");
} else if (primary instanceof ParenthesizedExpression) {
// This can be used to define an OR-ed set of expressions defining select columns ...
ParenthesizedExpression paren = (ParenthesizedExpression)primary;
Component wrapped = paren.getWrapped().collapse();
if (wrapped instanceof AttributeNameTest) {
AttributeNameTest attributeName = (AttributeNameTest)wrapped;
builder.select(nameFrom(attributeName.getNameTest()));
} else if (wrapped instanceof BinaryComponent) {
for (AttributeNameTest attributeName : extractAttributeNames((BinaryComponent)wrapped)) {