MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / makeCodec

Function makeCodec

src/Compression/tests/gtest_compressionCodec.cpp:443–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441};
442
443CompressionCodecPtr makeCodec(const std::string & codec_string, const DataTypePtr data_type)
444{
445 const std::string codec_statement = "(" + codec_string + ")";
446 Tokens tokens(codec_statement.begin().base(), codec_statement.end().base());
447 IParser::Pos token_iterator(tokens, 0, 0);
448
449 Expected expected;
450 ASTPtr codec_ast;
451 ParserCodec parser;
452
453 parser.parse(token_iterator, codec_ast, expected);
454
455 return CompressionCodecFactory::instance().get(codec_ast, data_type);
456}
457
458template <typename Timer>
459void testTranscoding(Timer & timer, ICompressionCodec & codec, const CodecTestSequence & test_sequence,

Callers 5

makeCodecMethod · 0.85
TEST_PFunction · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85

Calls 5

baseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
parseMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected