mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Add support for queries with null
quoted identifier and ON CLUSTER
This commit is contained in:
parent
919cc10a3c
commit
2866d45681
@ -149,7 +149,11 @@ inline bool isPunctuationASCII(char c)
|
||||
|
||||
inline bool isValidIdentifier(const std::string_view & str)
|
||||
{
|
||||
return !str.empty() && isValidIdentifierBegin(str[0]) && std::all_of(str.begin() + 1, str.end(), isWordCharASCII);
|
||||
return !str.empty()
|
||||
&& isValidIdentifierBegin(str[0])
|
||||
&& std::all_of(str.begin() + 1, str.end(), isWordCharASCII)
|
||||
/// NULL is not a valid identifier in SQL, any case.
|
||||
&& !(str.size() == strlen("null") && 0 == strncasecmp(str.data(), "null", strlen("null")));
|
||||
}
|
||||
|
||||
/// Works assuming isAlphaASCII.
|
||||
|
@ -0,0 +1,3 @@
|
||||
1
|
||||
1
|
||||
1 \N
|
@ -0,0 +1,3 @@
|
||||
SELECT `null` FROM remote('127.0.0.2', view(SELECT 1 AS `null`));
|
||||
SELECT `NULL` FROM remote('127.0.0.2', view(SELECT 1 AS `NULL`));
|
||||
SELECT `nULl`, null FROM remote('127.0.0.2', view(SELECT 1 AS `nULl`));
|
Loading…
Reference in New Issue
Block a user