-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Support parsing SQL Server SELECT state_desc sql #29188
Comments
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. |
I would like to do this issue, could you please assign it to me? |
@KonarzewskiP Of course, I just assign it to you. |
Thanks! |
Hi @KonarzewskiP, You can refer to other similar cases, then copy the XML file into the newly added Case, and then modify the expected value. This is probably the fastest way I know of. |
OK, thank you. |
Is there a possibility to run just 1-2 test case instead of +500 each time? |
You can control case by modifying InternalSQLParserIT. public abstract class InternalSQLParserIT {
private static final SQLCases SQL_CASES = SQLCasesRegistry.getInstance().getCases();
private static final SQLParserTestCases SQL_PARSER_TEST_CASES = SQLParserTestCasesRegistry.getInstance().getCases();
@ParameterizedTest(name = "{0} ({1}) -> {2}")
@ArgumentsSource(TestCaseArgumentsProvider.class)
void assertSupportedSQL(final String sqlCaseId, final SQLCaseType sqlCaseType, final String databaseType) {
if (!sqlCaseId.equals("xxx")) {
return;
}
String sql = SQL_CASES.getSQL(sqlCaseId, sqlCaseType, SQL_PARSER_TEST_CASES.get(sqlCaseId).getParameters());
SQLStatement actual = parseSQLStatement("H2".equals(databaseType) ? "MySQL" : databaseType, sql);
SQLParserTestCase expected = SQL_PARSER_TEST_CASES.get(sqlCaseId);
SQLStatementAssert.assertIs(new SQLCaseAssertContext(sqlCaseId, sql, expected.getParameters(), sqlCaseType), actual, expected);
} |
Amazing, thank you very much! |
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. |
All sql case has been supported, so I will close this issue. |
Background
Hi community.
This issue is for #29149.
The ShardingSphere SQL parser engine helps users to parse SQL to create the AST (Abstract Syntax Tree) and visit the AST to get SQLStatement (Java Object). Currently, we are planning to enhance the support for
SQL Server
SQL parsing in ShardingSphere.More details:
https://shardingsphere.apache.org/document/current/en/reference/sharding/parse/
Task
This issue is to support more
SQL Server
sql parsing, as follows:link
link
link
link
link
Process
SQL Server
sql syntax, if not please leave a message under the issue and ignore it;Relevant Skills
g4
fileSQL Server
SQLsThe text was updated successfully, but these errors were encountered: