view regexp/regexp.mal @ 29:e44cffee8312

Implemented bulk variant of match function.
author Sjoerd Mullender <sjoerd@acm.org>
date Mon, 06 Aug 2018 20:59:23 +0200 (2018-08-06)
parents e799d117c5b1
children
line wrap: on
line source
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0.  If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright 2013-2018 MonetDB B.V.

module regexp;

# variant without flags argument

command rematch(val:str, pat:str) :bit
address regexpmatch
comment "Return true when the value 'val' matches the regular expression 'pat'";

command rematchselect(val:bat[:str], cand:bat[:oid], pat:str, anti:bit):bat[:oid]
address regexpmatchselect
comment "Return the list of matches in 'val' that match the regular expression 'pat'";

command rematchjoin(val:bat[:str], pat:bat[:str], sl:bat[:oid], sr:bat[:oid], nil_matches:bit, estimate:lng)(lr:bat[:oid],rr:bat[:oid])
address regexpmatchjoin
comment "Return the matching pairs from the 'val' and 'pat' columns";

# variant with flags argument

command rematch(val:str, pat:str, flags:str) :bit
address regexpmatchf
comment "Return true when the value 'val' matches the regular expression 'pat'";

command rematchselect(val:bat[:str], s:bat[:oid], pat:str, flags:str, anti:bit):bat[:oid]
address regexpmatchfselect
comment "Return the list of matches in 'val' that match the regular expression 'pat'";

command rematchjoin(val:bat[:str], pat:bat[:str], flags:str, sl:bat[:oid], sr:bat[:oid], nil_matches:bit, estimate:lng)(lr:bat[:oid],rr:bat[:oid])
address regexpmatchfjoin
comment "Return the matching pairs from the 'val' and 'pat'
columns";

module batregexp;

command rematch(val:bat[:str], pat:str) :bat[:bit]
address regexpmatchbulk
comment "Return a BAT with true for match and false for no match";

command rematch(val:bat[:str], pat:str, flags:str) :bat[:bit]
address regexpmatchfbulk
comment "Return a BAT with true for match and false for no match";