-
Notifications
You must be signed in to change notification settings - Fork 82
SQL Analysis relation's nodeLocation.line appears wrong number #683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @andreashimin. It makes sense to me. "relation": {
"type": "INNER_JOIN",
"left": {
"type": "TABLE",
"alias": "c",
"tableName": "customers",
"nodeLocation": {
"line": 5,
"column": 3
}
},
"right": {
"type": "TABLE",
"alias": "o",
"tableName": "orders",
"nodeLocation": {
"line": 6,
"column": 8
}
},
"criteria": "ON (\"c\".\"Id\" = \"o\".\"CustomerId\")",
"exprSources": [
{
"expression": "o.CustomerId",
"sourceDataset": "orders",
"nodeLocation": {
"line": 6,
"column": 38
}
},
{
"expression": "c.Id",
"sourceDataset": "customers",
"nodeLocation": {
"line": 6,
"column": 27
}
}
],
"nodeLocation": {
"line": 5,
"column": 3
}
}, For SQL structure, the first layer of "customers" AS "c"
JOIN "orders" AS "o" ON "c"."Id" = "o"."CustomerId" So, the node location of this join is "right": {
"type": "TABLE",
"alias": "o",
"tableName": "orders",
"nodeLocation": {
"line": 6,
"column": 8
}
}, |
Hi @goldmedal, hmm...I see, but since the AI service will return explained snippets from Is it also correct if we get the |
So, I think what you need is the location of {
"criteria": {
"expr": "ON (\"c\".\"Id\" = \"o\".\"CustomerId\")",
"nodeLocation": {
"line": 6,
"column": 8
}
}
}
If you get the locations of |
Yeah, that would be appreciated if I could obtain the criteria's |
I found the relation's
nodeLocation.line
mostly appears the wrong line numberReference
According to the SQL
string[]
on the left side, thenodeLocation.line
should be (index + 1) =6
instead.SQL for Analysis
JsonString
"SELECT\n \"c\".\"City\" AS \"_City\",\n \"o\".\"OrderId\" AS \"_OrderId\"\nFROM\n \"customers\" AS \"c\"\n JOIN \"orders\" AS \"o\" ON \"c\".\"Id\" = \"o\".\"CustomerId\"\nWHERE\n \"o\".\"Status\" = 'completed'"
Response
response.json
The text was updated successfully, but these errors were encountered: