|
39 | 39 | import javax.xml.transform.stream.StreamResult; |
40 | 40 | import javax.xml.xpath.XPathExpressionException; |
41 | 41 |
|
| 42 | +import com.fasterxml.jackson.databind.node.ObjectNode; |
42 | 43 | import com.marklogic.client.datamovement.DataMovementManager; |
43 | 44 | import com.marklogic.client.datamovement.WriteBatcher; |
44 | 45 | import com.marklogic.client.io.*; |
|
48 | 49 | import com.marklogic.client.type.*; |
49 | 50 | import org.junit.AfterClass; |
50 | 51 | import org.junit.BeforeClass; |
| 52 | +import org.junit.Ignore; |
51 | 53 | import org.junit.Test; |
52 | 54 | import org.w3c.dom.Document; |
53 | 55 | import org.w3c.dom.Element; |
@@ -1458,6 +1460,30 @@ public void testSampleByNoArg() throws IOException { |
1458 | 1460 | long count = rows.stream().count(); |
1459 | 1461 | assertEquals("count doesn't match", 4, count); |
1460 | 1462 | } |
| 1463 | + |
| 1464 | + @Test |
| 1465 | + @Ignore("Waiting on a fix for https://bugtrack.marklogic.com/58233") |
| 1466 | + public void testBug58233() { |
| 1467 | + RowManager rowMgr = Common.client.newRowManager(); |
| 1468 | + |
| 1469 | + PlanBuilder op = rowMgr.newPlanBuilder(); |
| 1470 | + |
| 1471 | + // This succeeds |
| 1472 | + rowMgr.resultRows(op |
| 1473 | + .fromLiterals(numberRows) |
| 1474 | + .facetBy( |
| 1475 | + op.namedGroupSeq(op.bucketGroup(op.xs.string("r"), op.col("r"), op.xs.integerSeq(2, 4))) |
| 1476 | + )).stream().collect(Collectors.toList()); |
| 1477 | + |
| 1478 | + // But this fails when namedGroupSeq is not included |
| 1479 | + rowMgr.resultRows(op |
| 1480 | + .fromLiterals(numberRows) |
| 1481 | + .facetBy( |
| 1482 | + op.bucketGroup(op.xs.string("r"), op.col("r"), op.xs.integerSeq(2, 4)) |
| 1483 | + )).stream().collect(Collectors.toList()); |
| 1484 | + } |
| 1485 | + |
| 1486 | + |
1461 | 1487 | @Test |
1462 | 1488 | public void testBucketGroup() { |
1463 | 1489 | RowManager rowMgr = Common.client.newRowManager(); |
|
0 commit comments