Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
1. Encrypt: Support SqlServer update statement for Specifying a view as the target object when use encrypt feature - [#38896](https://github.com/apache/shardingsphere/pull/38896)
1. Encrypt: Support SqlServer for Using the UPDATE statement with information from another table when use encrypt feature - [#38926](https://github.com/apache/shardingsphere/pull/38926)
1. Sharding: Fix HASH_MOD routing mismatch for same negative numeric values across numeric Java types with compatibility switch `normalize-numeric-int-range` - [#38327](https://github.com/apache/shardingsphere/pull/38327)
1. SQL Parser: Support parsing SYSTEM_USER in SQL92 dialect and bind it as a niladic function instead of a column - [#39102](https://github.com/apache/shardingsphere/pull/39102)

## Release 5.5.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public final class SQL92FunctionOption implements DialectFunctionOption {

private static final Collection<String> UNPARENTHESIZED_FUNCTION_NAMES = new CaseInsensitiveSet<>(Arrays.asList(
"CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "SESSION_USER", "USER"));
"CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "SESSION_USER", "SYSTEM_USER", "USER"));

@Override
public Collection<String> getUnparenthesizedFunctionNames() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ void assertGetUnparenthesizedFunctionNames() {
assertTrue(functionOption.getUnparenthesizedFunctionNames().contains("CURRENT_TIMESTAMP"));
assertTrue(functionOption.getUnparenthesizedFunctionNames().contains("CURRENT_USER"));
assertTrue(functionOption.getUnparenthesizedFunctionNames().contains("SESSION_USER"));
assertTrue(functionOption.getUnparenthesizedFunctionNames().contains("SYSTEM_USER"));
assertTrue(functionOption.getUnparenthesizedFunctionNames().contains("USER"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ unreservedWord
| ORDER
| PASCAL | PLI
| REPEATABLE | RETURNED_LENGTH | RETURNED_OCTET_LENGTH | RETURNED_SQLSTATE | ROW_COUNT
| SCALE | SCHEMA_NAME | SERIALIZABLE | SERVER_NAME | SUBCLASS_ORIGIN
| SCALE | SCHEMA_NAME | SERIALIZABLE | SERVER_NAME | SUBCLASS_ORIGIN | SYSTEM_USER
| TABLE_NAME | TYPE
| UNCOMMITTED | UNNAMED
;
Expand Down
6 changes: 6 additions & 0 deletions test/it/parser/src/main/resources/case/dml/select.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9148,6 +9148,12 @@
</projections>
</select>

<select sql-case-id="select_system_user_sql92">
<projections start-index="7" stop-index="17">
<column-projection name="SYSTEM_USER" start-index="7" stop-index="17" />
</projections>
</select>

<select sql-case-id="select_with_unreserved_column">
<from>
<simple-table name="servers" start-index="38" stop-index="48">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@
<sql-case id="select_where_is_not_null_sql92" value="SELECT * FROM t_order WHERE status IS NOT NULL" db-types="SQL92" />
<sql-case id="select_compare_subquery_sql92" value="SELECT * FROM t_order WHERE order_id = (SELECT 1)" db-types="SQL92" />
<sql-case id="select_distinct_simple_sql92" value="SELECT DISTINCT user_id FROM t_order" db-types="SQL92" />
<sql-case id="select_system_user_sql92" value="SELECT SYSTEM_USER" db-types="SQL92" />
<sql-case id="select_distinct_with_count_sql92" value="SELECT COUNT(DISTINCT order_id) c FROM t_order WHERE order_id &lt; 1100" db-types="SQL92" />
<sql-case id="select_having_sql92" value="SELECT user_id, COUNT(*) AS cnt FROM t_order GROUP BY user_id HAVING COUNT(*) &gt; 1" db-types="SQL92" />
<sql-case id="select_cast_int_sql92" value="SELECT CAST(user_id AS INT) FROM t_order" db-types="SQL92" />
Expand Down
Loading