mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
This adds testing for Store(Distinct(...)) with and without filters, to verify that we can, in fact, store the results of a Distinct() query directly. This was at one point unsupported, now we think it should work so we're testing it. The change to the testdata is because the specific structure used for this test doesn't work with a keyed index, and changing things to be "foreign keys" seems annoying and more complicated, but possibly that should become part of a future test. There was talk of testing this with non-BSI fields, but they don't seem to actually work with Distinct right now, so that will be later.
424 lines
9.2 KiB
JSON
424 lines
9.2 KiB
JSON
{
|
|
"indexes": [
|
|
{
|
|
"name": "equipment",
|
|
"options": {
|
|
"keys": true,
|
|
"trackExistence": true
|
|
},
|
|
"fields": [
|
|
{
|
|
"name": "classification",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "equip_id",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 1,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": false
|
|
}
|
|
},
|
|
{
|
|
"name": "last_inspection",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 15,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "latitude",
|
|
"options": {
|
|
"type": "decimal",
|
|
"base": 0,
|
|
"scale": 4,
|
|
"bitDepth": 19,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false
|
|
}
|
|
},
|
|
{
|
|
"name": "longitude",
|
|
"options": {
|
|
"type": "decimal",
|
|
"base": 0,
|
|
"scale": 4,
|
|
"bitDepth": 21,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false
|
|
}
|
|
},
|
|
{
|
|
"name": "maintainer",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "region",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "service_provider",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "site_id",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 1,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "timestamp",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 1,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "type",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
}
|
|
],
|
|
"shardWidth": 1048576
|
|
},
|
|
{
|
|
"name": "power_ts",
|
|
"options": {
|
|
"keys": true,
|
|
"trackExistence": true
|
|
},
|
|
"fields": [
|
|
{
|
|
"name": "cost",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 20,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "date_acquired",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 15,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "domain",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "equip_id",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 1,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": false
|
|
}
|
|
},
|
|
{
|
|
"name": "last_maintenance",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 15,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "manufacturer",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "model",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "name",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "site_id",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 23,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "sites_id",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 1,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "timestamp",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 1,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "type",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
}
|
|
],
|
|
"shardWidth": 1048576
|
|
},
|
|
{
|
|
"name": "sites",
|
|
"options": {
|
|
"keys": false,
|
|
"trackExistence": true
|
|
},
|
|
"fields": [
|
|
{
|
|
"name": "cost",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 20,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "date_acquired",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 15,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "domain",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "equip_id",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 1,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": false
|
|
}
|
|
},
|
|
{
|
|
"name": "last_maintenance",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 15,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "manufacturer",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "model",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "name",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
},
|
|
{
|
|
"name": "site_id",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 23,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "timestamp",
|
|
"options": {
|
|
"type": "int",
|
|
"base": 0,
|
|
"bitDepth": 1,
|
|
"min": -1000,
|
|
"max": 1000,
|
|
"keys": false,
|
|
"foreignIndex": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "type",
|
|
"options": {
|
|
"type": "set",
|
|
"cacheType": "ranked",
|
|
"cacheSize": 50000,
|
|
"keys": true
|
|
}
|
|
}
|
|
],
|
|
"shardWidth": 1048576
|
|
}
|
|
]
|
|
}
|