(yes I know it's supposed to be math-oriented library)
Hello,
I'm doing server log analysis with PyTables that apparently uses Numexpr for filtering tables (in Table.Where conditions and the like).
Apart from purely numerical data it would be very useful for me to be able to filter rows on regexes. At the moment it seems like only strict string equality is supported.
Yes, I know this would severely limit performance, but it's either here that I get limited performance or elsewhere (where I will get even more limited performance due to not filtering rows on numerical conditions and even more on data loading of lines matching regexes).
The logic in interpreter.cpp/stringcmp is simple, but how can I connect string regex matching logic to the rest of it? I see there are opcodes in interp_body.cpp:
case OP_GT_BSS: VEC_ARG2(b_dest = (stringcmp(s1, s2, ss1, ss2) > 0));
case OP_GE_BSS: VEC_ARG2(b_dest = (stringcmp(s1, s2, ss1, ss2) >= 0));
case OP_EQ_BSS: VEC_ARG2(b_dest = (stringcmp(s1, s2, ss1, ss2) == 0));
case OP_NE_BSS: VEC_ARG2(b_dest = (stringcmp(s1, s2, ss1, ss2) != 0));
But I do not see where the condition is parsed and how can I add the opcode for regex matching so that it used while parsing conditions.