Skip to content

Commit e0d0edc

Browse files
kyleconroyclaude
andcommitted
Wrap IN predicate subquery in ScalarSubquery for JSON output
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4586de6 commit e0d0edc

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

parser/marshal.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3429,7 +3429,10 @@ func booleanExpressionToJSON(expr ast.BooleanExpression) jsonNode {
34293429
node["Values"] = values
34303430
}
34313431
if e.Subquery != nil {
3432-
node["Subquery"] = queryExpressionToJSON(e.Subquery)
3432+
node["Subquery"] = jsonNode{
3433+
"$type": "ScalarSubquery",
3434+
"QueryExpression": queryExpressionToJSON(e.Subquery),
3435+
}
34333436
}
34343437
return node
34353438
case *ast.BooleanLikeExpression:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"todo": true}
1+
{}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
{"todo": true}
1+
{
2+
"todo": true,
3+
"skip_reason": "ScriptDOM normalizes JSON strings in ROWSET_OPTIONS, removing whitespace and changing case"
4+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"todo": true}
1+
{}

0 commit comments

Comments
 (0)