Package org.apache.calcite.test
Class ElasticsearchChecker
- java.lang.Object
-
- org.apache.calcite.test.ElasticsearchChecker
-
public class ElasticsearchChecker extends java.lang.Object
Internal util methods for ElasticSearch tests
-
-
Field Summary
Fields Modifier and Type Field Description private static com.fasterxml.jackson.databind.ObjectMapper
MAPPER
-
Constructor Summary
Constructors Modifier Constructor Description private
ElasticsearchChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.function.Consumer<java.util.List>
elasticsearchChecker(java.lang.String... strings)
Returns a function that checks that a particular Elasticsearch pipeline is generated to implement a query.private static <T extends com.fasterxml.jackson.databind.JsonNode>
TexpandDots(T parent)
Expands attributes with dots (.
) into sub-nodes.
-
-
-
Method Detail
-
elasticsearchChecker
public static java.util.function.Consumer<java.util.List> elasticsearchChecker(java.lang.String... strings)
Returns a function that checks that a particular Elasticsearch pipeline is generated to implement a query.- Parameters:
strings
- expected expressions- Returns:
- validation function
-
expandDots
private static <T extends com.fasterxml.jackson.databind.JsonNode> T expandDots(T parent)
Expands attributes with dots (.
) into sub-nodes. Use for more friendly JSON format:{'a.b.c': 1} expanded to {a: { b: {c: 1}}}}
- Type Parameters:
T
- type of node (usually JsonNode).- Parameters:
parent
- current node- Returns:
- copy of existing node with field
a.b.c
expanded.
-
-