ClickHouse/dbms/Core/tests/string_ref_hash.cpp
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

23 lines
468 B
C++

#include <IO/ReadBufferFromFileDescriptor.h>
#include <IO/WriteBufferFromFileDescriptor.h>
#include <IO/Operators.h>
#include <common/StringRef.h>
/** Calculates StringRefHash from stdin. For debugging.
*/
int main(int, char **)
{
using namespace DB;
ReadBufferFromFileDescriptor in(STDIN_FILENO);
WriteBufferFromFileDescriptor out(STDOUT_FILENO);
String s;
readStringUntilEOF(s, in);
out << StringRefHash()(s) << '\n';
return 0;
}