featurebase/cmd
Matt Jaffee 5dcabfcc7f
support for decimal fields
This commit adds a Decimal field type which is implemented mostly with
the Int field. It adds an optional "Scale" value to the Int field
which means that the values stored in that field are actually meant to
be divided by 10^Scale before being interpreted.

In order to make use of this functionality, we extend the importValue
request to allow a slice of floats rather than just int64. If the
slice of floats is present, each float in the slice is multiplied by
10^Scale and converted to an int64 before being imported. If a slice
of int64 is imported to a Decimal field, it is treated normally, and
scale is ignored. This allows the conversion to be handled at the
client side if desired.

Currently there are Field level methods for querying Float values out
of a decimal field, but no support in PQL or the executor for getting
float values. Going to wait until I can use the generic result type
before doing that, so for now, any values queried will be the scaled
integer values.

needed to add client support for importing float values, and did this
by adding a more general and simplified client method for value
imports.

rewrote api.ImportValue to use the new method which should be more
performant and efficient.

allow floats to be "pilosa import"ed into decimal fields
2019-10-29 16:36:14 -05:00
..
pilosa v2.0.0 2019-10-08 14:56:17 -06:00
check.go v2.0.0 2019-10-08 14:56:17 -06:00
check_test.go Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
config.go v2.0.0 2019-10-08 14:56:17 -06:00
doc.go Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
export.go v2.0.0 2019-10-08 14:56:17 -06:00
export_test.go v2.0.0 2019-10-08 14:56:17 -06:00
generate_config.go v2.0.0 2019-10-08 14:56:17 -06:00
import.go support for decimal fields 2019-10-29 16:36:14 -05:00
import_test.go v2.0.0 2019-10-08 14:56:17 -06:00
inspect.go v2.0.0 2019-10-08 14:56:17 -06:00
inspect_test.go Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
root.go v2.0.0 2019-10-08 14:56:17 -06:00
root_test.go v2.0.0 2019-10-08 14:56:17 -06:00
server.go v2.0.0 2019-10-08 14:56:17 -06:00
server_test.go initial gRPC server implementation 2019-10-29 14:27:07 -05:00