diff --git a/processing/src/main/java/io/druid/query/groupby/orderby/OrderByColumnSpec.java b/processing/src/main/java/io/druid/query/groupby/orderby/OrderByColumnSpec.java index bf0432ad5c9..efb91a9c3c0 100644 --- a/processing/src/main/java/io/druid/query/groupby/orderby/OrderByColumnSpec.java +++ b/processing/src/main/java/io/druid/query/groupby/orderby/OrderByColumnSpec.java @@ -185,7 +185,7 @@ public class OrderByColumnSpec final byte[] dimensionBytes = dimension.getBytes(); final byte[] directionBytes = direction.name().getBytes(); - return ByteBuffer.allocate(dimensionBytes.length + dimensionBytes.length) + return ByteBuffer.allocate(dimensionBytes.length + directionBytes.length) .put(dimensionBytes) .put(directionBytes) .array();