Add support for Query Hints for MS Fabric in TSql170Parser
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with the TSql170Parser entry point and the C# reproduction in the issue, using the Microsoft Fabric Query Hints examples as inputs. Trace the parser errors for FOR TIMESTAMP AS OF, FORCE SINGLE NODE PLAN, and FORCE DISTRIBUTED PLAN; done means all three examples parse without errors.
Written by the indexing model from the issue text.
Description
We have encountered a parsing issue in Microsoft Documentation for MS Fabric Query Hints using TSql170Parser 170.128.0.
Examples
FOR TIMESTAMP AS OF
SELECT OrderDateKey, SUM(SalesAmount) AS TotalSales
FROM FactInternetSales
GROUP BY OrderDateKey
ORDER BY OrderDateKey
OPTION (FOR TIMESTAMP AS OF '2024-03-13T19:39:35.28');--March 13, 2024 at 7:39:35.28 PM UTC
Error Message : Incorrect syntax near 'FOR'.
Query force a single node or distributed query
SELECT OrderDateKey, SalesAmount
FROM FactInternetSales
OPTION (FORCE SINGLE NODE PLAN);
Error Message : Incorrect syntax near 'NODE'.
SELECT OrderDateKey, SalesAmount
FROM FactInternetSales
OPTION (FORCE DISTRIBUTED PLAN);
Error Message : Incorrect syntax near 'FORCE'.
Steps to reproduce
static void Main(string[] args)
{
var script = @"<EXAMPLE_SCRIPT>";
var parser = new TSql170Parser(true, 0);
var fragment = parser.Parse(new StringReader(script), out var parseErrors);
if (parseErrors.Count > 0)
{
Console.WriteLine(parseErrors[0].Message);
}
}
- Dominant language
- GAP
- Stars
- 277
- Forks
- 43
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/SqlScriptDOM
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/SqlScriptDOM#228 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
microsoft/SqlScriptDOM#183 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 56/100
microsoft/SqlScriptDOM#226 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/SqlScriptDOM#225 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
microsoft/SqlScriptDOM#224 ·
All issues in microsoft/SqlScriptDOM
Similar issues
-
todo:perf
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
objectionary/eo#8894 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
objectionary/phie#154 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
objectionary/jeo-maven-plugin#1774 ·
-
Minor breakage w/ LLVM 7: `test_llvm.cpp: error: cannot convert 'llvm::Module' to 'llvm::Module*'` Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100