Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,8 @@ last_up:long | cluster:keyword | time_bucket:date_nanos
5 | staging | 2024-05-10T00:20:00.000Z
;

count_over_time_of_date_nanos_promql
count_over_time_of_date_nanos_promql-Ignore
required_capability: promql_command_v0
required_capability: promql_date_nanos_support_v0
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sidosera in case you remember, was this introduced intentionally?


PROMQL index=datenanos-k8s step=10m last_up=(max by (cluster) (count_over_time(network.eth0.last_up[10m])))
| SORT step, cluster | LIMIT 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ FINAL WITNESS | 1.4
// end::two-queries-result[]
;

combine
combine-Ignore
required_capability: rerank
required_capability: rerank_combine
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nik9000 in case you remember, was this introduced intentionally?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no memory of this, sorry.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afoucret, it looks like these weren't being run and I think I broke them. You own this function, right? Could you get these running?

@idegtiarenko, I think you should merge this.


// tag::combine[]
FROM books METADATA _score
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static java.util.stream.Collectors.toSet;
import static org.elasticsearch.xpack.esql.CsvSpecReader.specParser;
import static org.elasticsearch.xpack.esql.CsvTestUtils.ExpectedResults;
import static org.elasticsearch.xpack.esql.CsvTestUtils.isEnabled;
Expand Down Expand Up @@ -196,6 +198,10 @@
// @TestLogging(value = "org.elasticsearch.xpack.esql:TRACE,org.elasticsearch.compute:TRACE", reason = "debug")
public class CsvTests extends ESTestCase {

private static final Set<String> ALL_ESQL_CAPABILITIES = Stream.of(EsqlCapabilities.Cap.values())
.map(EsqlCapabilities.Cap::capabilityName)
.collect(toSet());

private static final Logger LOGGER = LogManager.getLogger(CsvTests.class);

private final String fileName;
Expand Down Expand Up @@ -278,6 +284,9 @@ public CsvTests(

public final void test() throws Throwable {
try {
for (String capability : testCase.requiredCapabilities) {
assertTrue("Requested capability does not exist: " + capability, ALL_ESQL_CAPABILITIES.contains(capability));
}
assumeTrueLogging("Test " + testName + " is not enabled", isEnabled(testName, instructions, Version.CURRENT));
/*
* The csv tests support all but a few features. The unsupported features
Expand Down Expand Up @@ -549,7 +558,7 @@ private static MergedResult mergeMappings(List<MappingPerIndex> mappingsPerIndex
.stream()
.filter(e -> e.getValue().size() < numberOfIndices)
.map(Map.Entry::getKey)
.collect(Collectors.toSet());
.collect(toSet());
var mappings = columnNamesToFieldByIndices.entrySet()
.stream()
.collect(Collectors.toMap(Map.Entry::getKey, e -> mergeFields(e.getKey(), e.getValue())));
Expand Down