Commit graph

190 commits

Author SHA1 Message Date
Ben Johnson
6d06f5550b Restrict max-memory to Extract() calls only 2022-02-11 14:19:56 -06:00
Samir Patel
39c9a062aa address feedback 2022-02-09 13:16:19 -06:00
Samir Patel
be68241d8e add test 2022-02-09 12:33:12 -06:00
Samir Patel
bfcbf9d784 change interfaceOrVariable type 2022-02-09 11:29:11 -06:00
Samir Patel
edc16a61ea remove comment 2022-02-08 16:08:04 -06:00
Samir Patel
9e8b968c19 Refactor ExpandVars to reduce complexity 2022-02-08 15:58:12 -06:00
Samir Patel
fbe23915cf support ConstRow expansion and cleanup 2022-02-08 13:39:22 -06:00
Samir Patel
9a52dd1a2c handle rows for the most part 2022-02-07 20:00:05 -06:00
Ben Johnson
4fb795d6cb Parse variables for _field 2022-02-07 15:40:24 -07:00
Samir Patel
f5d0b227fa messing with parser, Rows call
messing around trying to get Rows call to recognize
$ syntax. got Rows to not barf, but it is interpreting $ syntax
as string values for the _field parameter as opposed to a Variable
2022-02-07 16:21:35 -06:00
Samir Patel
a755006d95 match on variable name, not field name 2022-02-07 15:43:32 -06:00
Samir Patel
b3faaa9dc0 handle expanding of Row call
working for equality, but not for inequalityh ATM
2022-02-07 12:55:10 -06:00
Ben Johnson
3989b363ce Add variable support to PQL 2022-02-01 08:30:48 -07:00
Ben Johnson
9ebf0e2119 Upgrade go.mod to featurebase/v3 2022-01-21 10:57:05 -07:00
reesporte
48aef0c8a4 add copyright notice back in
```bash
for file in `cat diffys`; do
   printf '%s\n%s\n' "// Copyright 2021 Molecula Corp. All rights reserved." "$(cat $file)" >$file;
done
```
2021-12-10 11:01:04 -06:00
reesporte
4c53f86e82 removed license from each go file
i used this script, a little clunky but it got the job done

```bash
for file in `find . -type f -print | grep '\.go'`; do
    sed '1,/^\/\/ limitations under the License.$/d' $file > $file.tmp;
    result=`cat $file.tmp`
    if [[ result != "" ]]; then
        gofmt $file.tmp &> /dev/null;
        if [[ $? == 0 ]]; then
            mv $file.tmp $file && gofmt -w $file;
        else
            rm $file.tmp;
        fi
    else
        rm $file.tmp;
    fi
done
```
2021-12-10 09:17:17 -06:00
reesporte
63c5c11108 fix some staticcheck issues 2021-12-03 09:31:45 -06:00
Mahesh Arumugam
858f889745 FeatureBase Renaming: changing go.mod module name for featurebase 2021-07-19 09:20:30 -07:00
Mahesh Arumugam
357caf68c3 Fix percentile query: field is mandatory (should not crash), fieldnames can be unquoted 2021-06-24 15:10:05 -07:00
Nia Weiss
a72f6425af
add an option to open a postgres transaction in lookup so it isnt actually a lookup 2021-05-26 14:07:52 -04:00
Nia Weiss
f4ba34247f
remove attributes
Attributes are unmaintained and unused.
They have become more of a liability than a benefit.
This change eliminates them from the codebase.
The only user-visible change (assuming that attrs are not used) is that the attrs field will no longer appear in row JSON.
2021-05-14 10:28:08 -04:00
tgruben
a60c70b2a5
Merge branch 'master' into delete 2021-04-09 10:26:30 -05:00
Ben Johnson
d70eb737cb Fix timestamp field issues 2021-04-09 08:26:12 -06:00
Todd Gruben
918644820b added pql delete function 2021-04-07 13:57:43 -05:00
Ben Johnson
cfc725e799 Add timestamp field type support 2021-04-06 10:50:10 -06:00
Nia Weiss
e9b92e1cd4
add ExternalLookup query 2021-03-25 13:21:28 -04:00
Kuba Podgórski
d370452449 Add helper function FirstStringArg 2021-03-16 16:32:35 +01:00
Kuba Podgórski
1dac4c7622 Consistency with aggregate functions 2021-03-16 15:02:40 +01:00
Travis
883e687094
fix missing bracket 2021-03-02 22:14:07 -06:00
Travis
ea8b07d380
Merge branch 'master' into disco 2021-03-02 22:11:04 -06:00
nagamocha3000
30a7e0f0da
Add pql syntax for Percentile 2021-03-02 20:36:51 -06:00
Maxton Huff
15aa7d1ad8 add field to SetRowAttrs and TopK to prototypes in ast.go 2021-03-01 11:18:31 -06:00
Maxton Huff
23f44725cb remove var allowUnderField 2021-02-26 16:36:16 -06:00
Maxton Huff
3822e38952 remove z arg from Rows tests 2021-02-26 16:15:37 -06:00
Maxton Huff
441630d804 try fixing tests 2021-02-26 16:13:00 -06:00
Maxton Huff
8bc8368c57 change test arguments to be appropriate 2021-02-26 12:58:59 -06:00
Maxton Huff
d49a8f953e regenerate pql from modified peg file 2021-02-26 11:27:39 -06:00
Maxton Huff
ab41d0492c add more tests for TopK, Rows, and SetRowAttrs 2021-02-25 16:04:31 -06:00
Maxton Huff
6b75a8b500 Revert "allow 'field=' for TopN()"
This reverts commit db01237904.
2021-02-25 11:01:22 -06:00
Maxton Huff
db01237904 allow 'field=' for TopN() 2021-02-24 15:29:10 -06:00
Nia Weiss
ac09c11bad
Invoke precalls directly in count operations
This changes Count(Precall()) operations to execute the precall directly inside of the count operation, bypassing the transformation to a Precomputed() call.
Eliminating the Precomputed() step causes Count(Distinct()) to work properly on negative integers.
2021-01-26 12:44:03 -05:00
Nia Weiss
dde318ac8c
Move globally computed GroupBy rows calls into EmbeddedData
This fixes a bug where a globally computed Rows call would be computed with a subset of the shards.
2021-01-25 10:17:58 -05:00
Matt Jaffee
ea539d8241
simplify groupby sorting and fix bugs
Back out support for sorting on fields (only count and aggregate
supported for now).

Fix bug where default return of "true" caused sort to be unstable. (If
they are equal, Less should return false)

Fix bug where limit was being applied before sorting.

Fix bug where offset was not actually allowed to be an argument to
GroupBy (weird! guess we weren't testing that very well)

Apply "having" after calculating Count(Distinct) aggregate so that
having can apply to that.

Switch to stable sort to make testing easier.
2020-12-31 14:42:03 -06:00
Matt Jaffee
5fdae74812
draft of sorting groupby results 2020-12-31 14:41:52 -06:00
Nia Weiss
46818863e8
implement TopK on time
This replaces the former TopK BSI building algorithm, as the row cache was too expensive.
Additionally, BSI addition has been optimized with specialized adders inside of roaring.
2020-11-20 11:06:55 -05:00
Nia Weiss
02498ce57a
add TopK with perpendicular BSI bitmaps 2020-11-13 18:31:55 -05:00
Seebs
6e725d50ce check error return from peg parser Init
The updated peg tool produces an Init that can return an error. As
of this writing, the error can't be non-nil unless you specified an
option which itself returned an error, but that could change later,
so let's be careful.
2020-10-19 13:47:42 -05:00
Seebs
e84d2d2a59 refactor number parsing a bit
There are subtle inconsistencies, like "01" being a valid decimal but not
a valid integer, which vaguely bug me. Cleaning this up, and the corresponding
parser logic.

A number can't have leading spaces because the grammar doesn't
put spaces in them in the first place, so stop accepting them in the
number syntax. This should never have any impact on anything,
it's just simpler.

Update a couple of test cases to reflect this -- no longer testing
that trailing spaces are okay, now testing that they're not, for
instance.
2020-10-19 13:37:21 -05:00
Seebs
c19d571112 more consistent spacing
We still prohibit a space before a leading '(', which maybe we shouldn't,
but we now allow spaces on both sides of a closing ')' more consistently.
Drop the unneeded "sp" before "close" in the special handling after
null, true, and false, because close now implies that.

Also, refactored the two instances of "sp '=' sp" into a thing called eq,
which may not be worth it.
2020-10-19 13:35:49 -05:00
Seebs
28d18920b9 Make PQL case-insensitive about call names.
Use "" strings for fixed string names. In startCall(), look up the
lowercase conversion of a call name in a table mapping all-lowercase
representations to canonical case, so we don't have to chase down
everyplace in the rest of the code base that assumes "Row" is
capitalized exactly like that.
2020-10-19 13:35:49 -05:00