MCPcopy Create free account
hub / github.com/BlazingDB/blazingsql / mysql_is_cudf_string

Function mysql_is_cudf_string

engine/src/io/data_parser/sql/MySQLParser.cpp:38–61  ·  view source on GitHub ↗

TODO percy this is too naive ... improve this later String Data Types Data type Description CHAR(size) A FIXED length string (can contain letters, numbers, and special characters). The size parameter specifies the column length in characters - can be from 0 to 255. Default is 1 VARCHAR(size) A VARIABLE length string (can contain letters, numbers, and special characters). The size parameter specifi

Source from the content-addressed store, hash-verified

36//ENUM(val1, val2, val3, ...) A string object that can have only one value, chosen from a list of possible values. You can list up to 65535 values in an ENUM list. If a value is inserted that is not in the list, a blank value will be inserted. The values are sorted in the order you enter them
37//SET(val1, val2, val3, ...)
38bool mysql_is_cudf_string(const std::string &t) {
39 std::vector<std::string> mysql_string_types_hints = {
40 "CHAR",
41 "VARCHAR",
42 "BINARY",
43 "VARBINARY",
44 "TINYBLOB",
45 "TINYTEXT",
46 "TEXT",
47 "BLOB",
48 "MEDIUMTEXT",
49 "MEDIUMBLOB",
50 "LONGTEXT",
51 "LONGBLOB",
52 "ENUM",
53 "SET"
54 };
55
56 for (auto hint : mysql_string_types_hints) {
57 if (StringUtil::beginsWith(t, hint)) return true;
58 }
59
60 return false;
61}
62
63cudf::type_id parse_mysql_column_type(const std::string t) {
64 if (mysql_is_cudf_string(t)) return cudf::type_id::STRING;

Callers 1

parse_mysql_column_typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected