Skip to content

When querying from a azure function using input binding, a query plan request is made that is not mapped #90

@LanPodder

Description

@LanPodder

When creating a function app and a function with cosmosdb input binding and a sqlquery,
two post requests are made to "/dbs/:dbId/colls/:collId/docs", one of which has the "x-ms-cosmos-is-query-plan-request: True" header.
The Azure function expects a specific response from this request, after which the actual query request will be made.
The expected resposne looks like this:

{
    "partitionedQueryExecutionInfoVersion": "2",
    "queryInfo": {
        "distinctType": "None",
        "top": null,
        "offset": null,
        "limit": null,
        "orderBy": [],
        "orderByExpressions": [],
        "groupByExpressions": [],
        "groupByAliases": [],
        "aggregates": [],
        "groupByAliasToAggregateType": {},
        "rewrittenQuery": "",
        "hasSelectValue": false,
        "dCountInfo": null
    },
    "queryRanges": [
        {
            "min": "05C1A3C5D33F20083200",
            "max": "05C1A3C5D33F20083200",
            "isMinInclusive": true,
            "isMaxInclusive": true
        }
    ]
}

with attribute values depending on the specific query, for instance if "order by" is added, the attributes
orderBy and orderByExpressions will contain "Ascending/Descending" and the column names respectively

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions