<commit_before>
#include "backend/bridge/dml/expr/pg_func_map.h"

namespace peloton {
namespace bridge {

/**
 * @brief Mapping PG Function Id to Peloton Function Meta Info.
 */
std::unordered_map<Oid, const PltFuncMetaInfo> kPgFuncMap({

    //====--------------------------------
    // Relational comparison
    //====--------------------------------
    {63, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {65, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {67, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {158, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {159, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {287, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {293, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {1718, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {2052, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},

    {84, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {144, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {145, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {157, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {164, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {165, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {288, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {294, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {1719, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {2053, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},

    {56, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {64, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {66, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {160, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {161, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {1246, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {289, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {295, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {1722, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {2054, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},

    {57, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {73, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {146, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {147, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {162, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {163, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {291, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {297, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {1720, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {2057, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},

    {74, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {150, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {151, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {168, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {169, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {1692, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {292, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {298, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {1721, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {2056, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},

    {72, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {148, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {149, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {166, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {167, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {1691, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {290, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {296, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {1723, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {2055, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},

    {850, {EXPRESSION_TYPE_COMPARE_LIKE, 2}},
    {1631, {EXPRESSION_TYPE_COMPARE_LIKE, 2}},
    {851, {EXPRESSION_TYPE_COMPARE_NOTLIKE, 2}},
    {1632, {EXPRESSION_TYPE_COMPARE_NOTLIKE, 2}},

    //====--------------------------------
    // String expressions
    //====--------------------------------
    {877, {EXPRESSION_TYPE_SUBSTR, 3}},
    {936, {EXPRESSION_TYPE_SUBSTR, 3}},
    {937, {EXPRESSION_TYPE_SUBSTR, 2}},
    {883, {EXPRESSION_TYPE_SUBSTR, 2}},
    {2073, {EXPRESSION_TYPE_SUBSTR, 2}},
    {1258, {EXPRESSION_TYPE_CONCAT, 2}},
    {3058, {EXPRESSION_TYPE_CONCAT, 2}},
    {1404, {EXPRESSION_TYPE_OVERLAY, 4}},
    {1405, {EXPRESSION_TYPE_OVERLAY, 3}},
    {849, {EXPRESSION_TYPE_POSITION, 2}},
    {1622, {EXPRESSION_TYPE_REPEAT, 2}},
    {3060, {EXPRESSION_TYPE_LEFT, 2}},
    {3061, {EXPRESSION_TYPE_RIGHT, 2}},<commit_msg>support text comparison<commit_after>
#include "backend/bridge/dml/expr/pg_func_map.h"

namespace peloton {
namespace bridge {

/**
 * @brief Mapping PG Function Id to Peloton Function Meta Info.
 */
std::unordered_map<Oid, const PltFuncMetaInfo> kPgFuncMap({

    //====--------------------------------
    // Relational comparison
    //====--------------------------------
    {63, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {65, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {67, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {158, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {159, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {287, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {293, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {1718, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},
    {2052, {EXPRESSION_TYPE_COMPARE_EQUAL, 2}},

    {84, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {144, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {145, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {157, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {164, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {165, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {288, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {294, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {1719, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},
    {2053, {EXPRESSION_TYPE_COMPARE_NOTEQUAL, 2}},

    {56, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {64, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {66, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {160, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {161, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {1246, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {289, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {295, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {1722, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {2054, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {740, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},
    {1049, {EXPRESSION_TYPE_COMPARE_LESSTHAN, 2}},

    {57, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {73, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {146, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {147, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {162, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {163, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {291, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {297, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {1720, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {2057, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {742, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},
    {1051, {EXPRESSION_TYPE_COMPARE_GREATERTHAN, 2}},

    {74, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {150, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {151, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {168, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {169, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {1692, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {292, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {298, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {1721, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {2056, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {743, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},
    {1052, {EXPRESSION_TYPE_COMPARE_GREATERTHANOREQUALTO, 2}},

    {72, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {148, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {149, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {166, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {167, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {1691, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {290, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {296, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {1723, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {2055, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {741, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},
    {1050, {EXPRESSION_TYPE_COMPARE_LESSTHANOREQUALTO, 2}},

    {850, {EXPRESSION_TYPE_COMPARE_LIKE, 2}},
    {1631, {EXPRESSION_TYPE_COMPARE_LIKE, 2}},
    {851, {EXPRESSION_TYPE_COMPARE_NOTLIKE, 2}},
    {1632, {EXPRESSION_TYPE_COMPARE_NOTLIKE, 2}},

    //====--------------------------------
    // String expressions
    //====--------------------------------
    {877, {EXPRESSION_TYPE_SUBSTR, 3}},
    {936, {EXPRESSION_TYPE_SUBSTR, 3}},
    {937, {EXPRESSION_TYPE_SUBSTR, 2}},
    {883, {EXPRESSION_TYPE_SUBSTR, 2}},
    {2073, {EXPRESSION_TYPE_SUBSTR, 2}},
    {1258, {EXPRESSION_TYPE_CONCAT, 2}},
    {3058, {EXPRESSION_TYPE_CONCAT, 2}},
    {1404, {EXPRESSION_TYPE_OVERLAY, 4}},
    {1405, {EXPRESSION_TYPE_OVERLAY, 3}},
    {849, {EXPRESSION_TYPE_POSITION, 2}},
    {1622, {EXPRESSION_TYPE_REPEAT, 2}},
    {3060, {EXPRESSION_TYPE_LEFT, 2}},
    {3061, {EXPRESSION_TYPE_RIGHT, 2}},
{'fraction_non_alphanumeric': 0.161633717140995, 'fraction_numerical': 0.07299587225722355, 'mean_word_length': 4.898142216527867, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6949960', 'n_tokens_mistral': 4359, 'n_tokens_neox': 3707, 'n_words': 531}