private Integer compareTo(StoredObject so, Tree leftChild, Tree rightChild) {
Object rVal = onLiteral(rightChild);
//log.debug("retrieve node from where: " + System.identityHashCode(leftChild) + " is " + leftChild);
ColumnReference colRef = getColumnReference(leftChild);
TypeDefinition td = colRef.getTypeDefinition();
PropertyDefinition<?> pd = td.getPropertyDefinitions().get(colRef.getPropertyId());
PropertyData<?> lVal = so.getProperties().get(colRef.getPropertyId());
if (lVal instanceof List<?>)
throw new RuntimeException("You can't query operators <, <=, ==, !=, >=, > on multi-value properties ");
else
return compareTo(pd, lVal, rVal);
}