mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Heredoc updated tests
This commit is contained in:
parent
22fa1efacb
commit
197bda1ff1
@ -28,7 +28,7 @@ inline UInt64 ALWAYS_INLINE normalizedQueryHash(const char * begin, const char *
|
||||
continue;
|
||||
|
||||
/// Literals.
|
||||
if (token.type == TokenType::Number || token.type == TokenType::StringLiteral)
|
||||
if (token.type == TokenType::Number || token.type == TokenType::StringLiteral || token.type == TokenType::HereDoc)
|
||||
{
|
||||
if (0 == num_literals_in_sequence)
|
||||
hash.update("\x00", 1);
|
||||
@ -156,7 +156,7 @@ inline void ALWAYS_INLINE normalizeQueryToPODArray(const char * begin, const cha
|
||||
prev_insignificant = false;
|
||||
|
||||
/// Literals.
|
||||
if (token.type == TokenType::Number || token.type == TokenType::StringLiteral)
|
||||
if (token.type == TokenType::Number || token.type == TokenType::StringLiteral || token.type == TokenType::HereDoc)
|
||||
{
|
||||
if (0 == num_literals_in_sequence)
|
||||
res_data.push_back('?');
|
||||
|
@ -20,3 +20,6 @@ SELECT ? AS xyz11
|
||||
SELECT ? xyz11
|
||||
SELECT ?, xyz11
|
||||
SELECT ?..
|
||||
SELECT ? xyz11
|
||||
SELECT ?, xyz11
|
||||
SELECT ?..
|
||||
|
@ -20,3 +20,7 @@ SELECT normalizeQuery('SELECT 1 AS xyz11');
|
||||
SELECT normalizeQuery('SELECT 1 xyz11');
|
||||
SELECT normalizeQuery('SELECT 1, xyz11');
|
||||
SELECT normalizeQuery('SELECT 1, ''xyz11''');
|
||||
SELECT normalizeQuery('SELECT $doc$VALUE$doc$ xyz11');
|
||||
SELECT normalizeQuery('SELECT $doc$VALUE$doc$, xyz11');
|
||||
SELECT normalizeQuery('SELECT $doc$VALUE$doc$, ''xyz11''');
|
||||
|
||||
|
@ -5,3 +5,5 @@
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
|
@ -5,3 +5,7 @@ SELECT normalizedQueryHash('[1, 2, 3]') = normalizedQueryHash('[1, ''x'']');
|
||||
SELECT normalizedQueryHash('[1, 2, 3, x]') != normalizedQueryHash('[1, x]');
|
||||
SELECT normalizedQueryHash('SELECT 1 AS `xyz`') != normalizedQueryHash('SELECT 1 AS `abc`');
|
||||
SELECT normalizedQueryHash('SELECT 1 AS xyz111') = normalizedQueryHash('SELECT 2 AS xyz234');
|
||||
SELECT normalizedQueryHash('SELECT $doc$VALUE$doc$ AS `xyz`') != normalizedQueryHash('SELECT $doc$VALUE$doc$ AS `abc`');
|
||||
SELECT normalizedQueryHash('SELECT $doc$VALUE$doc$ AS xyz111') = normalizedQueryHash('SELECT $doc$VALUE$doc$ AS xyz234');
|
||||
|
||||
|
||||
|
@ -9,3 +9,5 @@ $do$ $ doc$ $doc $ $doco$ $do$ $ doc$ $doc $ $doco$
|
||||
该类型的引擎
|
||||
VALUE
|
||||
VALUE
|
||||
\nvalue1\nvalue2\nvalue3\n
|
||||
\'\\xc3\\x28\'
|
||||
|
@ -11,3 +11,11 @@ SELECT $doc$该类型的引擎$doc$;
|
||||
|
||||
SELECT $РАЗДЕЛИТЕЛЬ$VALUE$РАЗДЕЛИТЕЛЬ$;
|
||||
SELECT $该类型的引擎$VALUE$该类型的引擎$;
|
||||
|
||||
SELECT $$
|
||||
value1
|
||||
value2
|
||||
value3
|
||||
$$;
|
||||
|
||||
SELECT $doc$'\xc3\x28'$doc$;
|
||||
|
Loading…
Reference in New Issue
Block a user