|  | @@ -215,6 +215,7 @@ public class Verifier {
 | 
	
		
			
				|  |  |              checkOperationsOnUnsignedLong(p, failures);
 | 
	
		
			
				|  |  |              checkBinaryComparison(p, failures);
 | 
	
		
			
				|  |  |              checkForSortableDataTypes(p, failures);
 | 
	
		
			
				|  |  | +            checkSort(p, failures);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              checkFullTextQueryFunctions(p, failures);
 | 
	
		
			
				|  |  |          });
 | 
	
	
		
			
				|  | @@ -232,6 +233,18 @@ public class Verifier {
 | 
	
		
			
				|  |  |          return failures;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    private void checkSort(LogicalPlan p, Set<Failure> failures) {
 | 
	
		
			
				|  |  | +        if (p instanceof OrderBy ob) {
 | 
	
		
			
				|  |  | +            ob.order().forEach(o -> {
 | 
	
		
			
				|  |  | +                o.forEachDown(Function.class, f -> {
 | 
	
		
			
				|  |  | +                    if (f instanceof AggregateFunction) {
 | 
	
		
			
				|  |  | +                        failures.add(fail(f, "Aggregate functions are not allowed in SORT [{}]", f.functionName()));
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      private static void checkFilterConditionType(LogicalPlan p, Set<Failure> localFailures) {
 | 
	
		
			
				|  |  |          if (p instanceof Filter f) {
 | 
	
		
			
				|  |  |              Expression condition = f.condition();
 |