From faeb36fb7cf9be861c624fffa056a19b991b29e1 Mon Sep 17 00:00:00 2001 From: penghuo Date: Mon, 14 Dec 2020 21:19:48 -0800 Subject: [PATCH] update doc --- docs/user/optimization/optimization.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/user/optimization/optimization.rst b/docs/user/optimization/optimization.rst index f55c1545a1..c4aab0e3aa 100644 --- a/docs/user/optimization/optimization.rst +++ b/docs/user/optimization/optimization.rst @@ -85,6 +85,31 @@ Elasticsearch Specific Optimization The Elasticsearch `Query DSL `_ and `Aggregation `_ also enabling the storage engine specific optimization. +Push Project Into Query DSL +--------------------------- +The Project list will push down to Query DSL to `filter the source `_:: + + sh$ curl -sS -H 'Content-Type: application/json' \ + ... -X POST localhost:9200/_opendistro/_sql/_explain \ + ... -d '{"query" : "SELECT age FROM accounts"}' + { + "root": { + "name": "ProjectOperator", + "description": { + "fields": "[age]" + }, + "children": [ + { + "name": "ElasticsearchIndexScan", + "description": { + "request": "ElasticsearchQueryRequest(indexName=accounts, sourceBuilder={\"from\":0,\"size\":200,\"timeout\":\"1m\",\"_source\":{\"includes\":[\"age\"],\"excludes\":[]}}, searchDone=false)" + }, + "children": [] + } + ] + } + } + Filter Merge Into Query DSL ---------------------------