Commit graph

25 commits

Author SHA1 Message Date
CLoZengineer
f9ddb5d5c1
fix: updating code to meet linting requirements (#2171)
* removes unused filesize function

* removes ioutil usage

* updates ioutil.ReadAll to io.ReadAll

* updates ioutil.TempFile to os.CreateTemp

* updates ioutil.TempDir to os.MkdirTemp

* updates ioutil.ReadAll to os.ReadAll

* update ioutil.WriteFile to os.WriteFile

* updates ioutil.Discard to io.Discard

* updates ioutil.ReadDir to os.ReadDir where applicable

* removes unused code in idk

* creates type to use for context value keys

* replaces assert.Nil with assert.NoError for error checks
2022-09-29 12:34:29 -04:00
Fletcher Haynes
eb06bb50ae Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
Shaquille Wyan Que
44088d4f29 added check for unexpected parser error 2019-05-15 12:11:55 -05:00
Shaquille Wyan Que
6ba6218ae4 changed out of range error message name and fixed formatting 2019-05-15 11:22:04 -05:00
Shaquille Wyan Que
b770167db6 fixed formatting 2019-05-15 10:52:15 -05:00
Shaquille Wyan Que
98a864634e fixed out of bounds panic to show error 2019-05-14 16:58:03 -05:00
Travis Turner
bdc4f3b07e
recover the duplicate arg panic from parser, treat as error 2019-04-10 23:48:17 -05:00
Cody Soyland
fb7de28557 Unexport pql.TimeFormat 2018-07-05 23:11:56 -05:00
Cody Soyland
75ea43c9da Unexport pql.Parser 2018-07-05 23:11:56 -05:00
Matt Jaffee
47233c8bee
replace PQL parser with one created by PEG parser generator 2018-06-15 08:34:12 -05:00
Travis
4304d341f7
Add support for field != null Range query 2017-10-06 11:36:41 -05:00
Travis
2b88d278bc
Implements BETWEEN for Range queries.
The PQL looks like:
```
Range(frame=f, field0 >< [200,610])
```

One thing I noticed while implementing this is that it doesn't seem
like `FieldRange()` is used in either `Frame` or `View`; the Executor
calls `Fragment.FieldRange()` directly. The problem with this is that
the offset logic is calculated in the Frame, but since the Executor
doesn't go through Frame, then the Executor also has to calculate
the offset before calling `Fragment.FieldRange`. We should unify this
logic somewhere. Note, this applies to both `FieldRange` and
`FieldRangeBetween`.
2017-09-25 15:11:04 -05:00
Ben Johnson
c36fdbfacb
Support PQL Range() queries for fields. 2017-08-12 11:39:25 -06:00
Cody Soyland
3996b56b88 Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Matt Jaffee
6f443f447a add signed int support
this affects the scanner/parser and makes it produce signed ints rather than
uints, and so it affects all code that is expecting unsighed ints to come out of
the parser.
2017-04-18 12:50:26 -05:00
Matt Jaffee
69586ea074 rename NUMBER -> INTEGER 2017-03-08 14:03:21 -06:00
Matt Jaffee
dbfc6052b7 add float support to scanner/parser for arguments 2017-03-07 15:40:50 -06:00
Ben Johnson
f39768b49b Refactor parser & AST to remove compile-time field names.
Consolidates all the pql.Call implementations into a single
pql.Call struct. This is needed to support user-defined schemas
on frames.

This also has the added benefit that a lot of redundant parsing
code has been consolidated.
2017-02-02 14:27:18 -07:00
Ben Johnson
569bafdc7d add bulk call support to the query endpoint
This commit changes the `pql.Query` so that it can accept one or more
top-level calls instead of only one.

The query request format change because a query with a single call is
still valid. However, the result format now returns a `results` field
that has one result for each top-level call. The `profiles` field is
still the same, however, it combines all profiles from all bitmap
responses into one return so that there's not duplicate attributes.

Fixes #59
2016-03-08 14:34:37 -07:00
Ben Johnson
5a63a14742 refetch full counts for TopN()
This commits adds refetching to get the actual TopN() count
after the top bitmaps are determined.

Fixes #57
2016-03-03 13:03:20 -07:00
Ben Johnson
cca8970019 add Range() support
This commit adds support for setting bits in time-based frames.
2016-02-23 14:53:03 -07:00
Ben Johnson
b68c1caea0 fix int64 attr 2016-02-17 10:59:17 -07:00
Ben Johnson
d3500c64f7 TopN()
This commit adds TopN() functionality to the fragment, executor
and handler.
2016-02-09 14:43:49 -07:00
Ben Johnson
e0937b79c0 add bitmap and profile attribute support
This commit adds the ability to set string, integer, and boolean
values on bitmaps and profiles within Pilosa. Bitmap attributes
are automatically returned when making a `Bitmap()` call. Profile
attributes must be requested by setting `profile=true` in the
URL.

The function names have also been renamed to initial caps so that
the PQL query language can support math operations in the future.
2016-02-01 08:44:33 -07:00
Ben Johnson
a632d08629 refactor
This commit refactors the pilosa codebase. It makes several major
changes:

* Removes bitmap handles
* Removes dispatch/hold/transport
* Removes etcd dependency
* Adds consistent hash ring for slice placement
* Refactors parser/lexer
* Adds strong typing to PQL AST
* Flattens package hierarchy
2015-12-02 15:34:49 -07:00