Loki: Add unwrap with conversion function to builder (#52639)

* Loki: Add unwrap with conversion operator to builder

* Update explain section

* Update test
This commit is contained in:
Ivana Huckova
2022-07-25 12:51:28 +02:00
committed by GitHub
parent 9d6994c565
commit 53b8e528fc
4 changed files with 97 additions and 29 deletions

View File

@@ -323,16 +323,21 @@ function handleUnwrapExpr(
}
if (unwrapChild) {
if (unwrapChild?.nextSibling?.type.name === 'ConvOp') {
if (unwrapChild.nextSibling?.type.name === 'ConvOp') {
const convOp = unwrapChild.nextSibling;
const identifier = convOp.nextSibling;
return {
error: 'Unwrap with conversion operator not supported in query builder',
operation: {
id: 'unwrap',
params: [getString(expr, identifier), getString(expr, convOp)],
},
};
}
return {
operation: {
id: 'unwrap',
params: [getString(expr, unwrapChild?.nextSibling)],
params: [getString(expr, unwrapChild?.nextSibling), ''],
},
};
}