Add non-distributed sort query test
@@ -50,6 +50,7 @@ import java.util.Optional;
import java.util.Set;
import java.util.stream.IntStream;
+import static com.facebook.presto.SystemSessionProperties.DISTRIBUTED_SORT;
import static com.facebook.presto.SystemSessionProperties.REORDER_JOINS;
import static com.facebook.presto.connector.informationSchema.InformationSchemaMetadata.INFORMATION_SCHEMA;
import static com.facebook.presto.operator.scalar.ApplyFunction.APPLY_FUNCTION;
@@ -2999,6 +3000,15 @@ public abstract class AbstractTestQueries
"SELECT 1, 172799.49, 1");
}
+ @Test
+ public void testUndistributedOrderBy()
+ {
+ Session undistributedOrderBy = Session.builder(getSession())
+ .setSystemProperty(DISTRIBUTED_SORT, "false")
+ .build();
+ assertQueryOrdered(undistributedOrderBy, "SELECT orderstatus FROM orders ORDER BY orderstatus");
+ }
+
@Test
public void testChecksum()
{
