Replies: 1 comment 3 replies
-
Sigh. Thank you for reporting as always. Sorry my regression tests seem to be so lacking and you keep running into new unique problems. I'll add this one to my list for my current effort. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Bruce,
We just discovered a new exception. When you parse a simple SELECT statement, and if the statement contains a column as NULL, it will throw a Null Ref exception as below.
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=TSQL_Parser
StackTrace:
at TSQL.Elements.Parsers.TSQLSelectColumnParser.Parse(ITSQLTokenizer tokenizer)
at TSQL.Clauses.Parsers.TSQLSelectClauseParser.Parse(ITSQLTokenizer tokenizer)
at TSQL.Statements.Parsers.TSQLSelectStatementParser.Parse()
at TSQL.Statements.Parsers.TSQLSelectStatementParser.TSQL.Statements.Parsers.ITSQLStatementParser.Parse()
at TSQL.TSQLStatementReader.MoveNext()
at System.Collections.Generic.List
1..ctor(IEnumerable
1 collection)at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at TSQL.TSQLStatementReader.ParseStatements(String tsqlText, Boolean useQuotedIdentifiers, Boolean includeWhitespace)
at ConsoleApp_ParserTest01.Program.TestParser()
My simple test statement is as below:
SELECT 1, 2, 3, NULL, 5 FROM MyTable
It does not matter where the NULL is placed, it always throws that null ref exception.
I am using version 2.3.0.0 of the package.
Thank you for investigating.
Paul
Beta Was this translation helpful? Give feedback.
All reactions