Fix formatting of INSERT ... COMPRESSION

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2022-04-04 10:30:31 +03:00
parent 9a76efb850
commit 93bbe9641a
3 changed files with 6 additions and 1 deletions

View File

@ -91,7 +91,7 @@ void ASTInsertQuery::formatImpl(const FormatSettings & settings, FormatState & s
<< (settings.hilite ? hilite_keyword : "")
<< " COMPRESSION "
<< (settings.hilite ? hilite_none : "")
<< compression->as<ASTLiteral &>().value.safeGet<std::string>();
<< quoteString(compression->as<ASTLiteral &>().value.safeGet<std::string>());
}
if (select)

View File

@ -0,0 +1,3 @@
-- { echo }
EXPLAIN SYNTAX INSERT INTO foo FROM INFILE '/dev/null' COMPRESSION 'gz';
INSERT INTO foo FROM INFILE \'/dev/null\' COMPRESSION \'gz\'

View File

@ -0,0 +1,2 @@
-- { echo }
EXPLAIN SYNTAX INSERT INTO foo FROM INFILE '/dev/null' COMPRESSION 'gz';