Skip to content

Commit

Permalink
Workaround eclipse.jdt compiler bug
Browse files Browse the repository at this point in the history
For some reason `OrderingByPositionTest` triggered a bug in the
eclipse compiler, causing it to crash.

See eclipse-jdtls/eclipse.jdt.ls#3199

(cherry picked from commit edda49c)

# Conflicts:
#	server/src/test/java/io/crate/execution/engine/sort/OrderingByPositionTest.java
  • Loading branch information
mfussenegger authored and mergify[bot] committed Jul 29, 2024
1 parent ea863ff commit 6048faf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ public void testOrderByAsc() throws Exception {

@Test
public void testMultipleOrderBy() throws Exception {
Comparator<Object[]> ordering = Ordering.compound(Arrays.asList(
var orderings = Arrays.asList(
OrderingByPosition.arrayOrdering(DataTypes.INTEGER, 1, false, false),
OrderingByPosition.arrayOrdering(DataTypes.INTEGER, 0, false, false)
));
);
Comparator<Object[]> ordering = Ordering.compound(orderings);

assertThat(ordering.compare(new Object[]{0, 0}, new Object[]{4, 0})).isEqualTo(-1);
assertThat(ordering.compare(new Object[]{4, 0}, new Object[]{1, 1})).isEqualTo(-1);
Expand Down

0 comments on commit 6048faf

Please sign in to comment.