From f3221054c3f8dbf9f840a7e759c6584a10a4760c Mon Sep 17 00:00:00 2001 From: Seebs Date: Wed, 12 Oct 2022 10:23:38 -0500 Subject: [PATCH 01/10] use t.Fatal(f) to abort tests, not panic --- tx_test.go | 56 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/tx_test.go b/tx_test.go index a79a82e79..56429f3bc 100644 --- a/tx_test.go +++ b/tx_test.go @@ -12,10 +12,12 @@ import ( . "github.com/featurebasedb/featurebase/v3/vprint" // nolint:staticcheck ) -func queryIRABit(m0api *pilosa.API, acctOwnerID uint64, iraField string, iraRowID uint64, index string) (bit bool) { +func queryIRABit(t *testing.T, m0api *pilosa.API, acctOwnerID uint64, iraField string, iraRowID uint64, index string) (bit bool) { query := fmt.Sprintf("Row(%v=%v)", iraField, iraRowID) // acctOwnerID) res, err := m0api.Query(context.Background(), &pilosa.QueryRequest{Index: index, Query: query}) - PanicOn(err) + if err != nil { + t.Fatalf("querying IRA bit: %v", err) + } cols := res.Results[0].(*pilosa.Row).Columns() for i := range cols { if cols[i] == acctOwnerID { @@ -25,10 +27,12 @@ func queryIRABit(m0api *pilosa.API, acctOwnerID uint64, iraField string, iraRowI return false } -func mustQueryAcct(m0api *pilosa.API, acctOwnerID uint64, fieldAcct0, index string) (acctBal int64) { +func mustQueryAcct(t *testing.T, m0api *pilosa.API, acctOwnerID uint64, fieldAcct0, index string) (acctBal int64) { query := fmt.Sprintf("FieldValue(field=%v, column=%v)", fieldAcct0, acctOwnerID) res, err := m0api.Query(context.Background(), &pilosa.QueryRequest{Index: index, Query: query}) - PanicOn(err) + if err != nil { + t.Fatalf("querying account: %v", err) + } if len(res.Results) == 0 { return 0 @@ -37,10 +41,10 @@ func mustQueryAcct(m0api *pilosa.API, acctOwnerID uint64, fieldAcct0, index stri return valCount.Val } -func queryBalances(m0api *pilosa.API, acctOwnerID uint64, fldAcct0, fldAcct1, index string) (acct0bal, acct1bal int64) { +func queryBalances(t *testing.T, m0api *pilosa.API, acctOwnerID uint64, fldAcct0, fldAcct1, index string) (acct0bal, acct1bal int64) { - acct0bal = mustQueryAcct(m0api, acctOwnerID, fldAcct0, index) - acct1bal = mustQueryAcct(m0api, acctOwnerID, fldAcct1, index) + acct0bal = mustQueryAcct(t, m0api, acctOwnerID, fldAcct0, index) + acct1bal = mustQueryAcct(t, m0api, acctOwnerID, fldAcct1, index) return } @@ -144,19 +148,19 @@ func TestAPI_ImportAtomicRecord(t *testing.T) { //vv("AFTER the first ImportAtomicRecord!") - iraBit := queryIRABit(m0api, acctOwnerID, iraField, iraRowID, index) + iraBit := queryIRABit(t, m0api, acctOwnerID, iraField, iraRowID, index) if !iraBit { - PanicOn("IRA bit should have been set") + t.Fatal("IRA bit should have been set") } - startingBalanceAcct0, startingBalanceAcct1 := queryBalances(m0api, acctOwnerID, fieldAcct0, fieldAcct1, index) + startingBalanceAcct0, startingBalanceAcct1 := queryBalances(t, m0api, acctOwnerID, fieldAcct0, fieldAcct1, index) //vv("starting balance: acct0=%v, acct1=%v", startingBalanceAcct0, startingBalanceAcct1) if startingBalanceAcct0 != expectedBalStartingAcct0 { - PanicOn(fmt.Sprintf("expected %v, observed %v starting acct0 balance", expectedBalStartingAcct0, startingBalanceAcct0)) + t.Fatalf("expected %v, observed %v starting acct0 balance", expectedBalStartingAcct0, startingBalanceAcct0) } if startingBalanceAcct1 != expectedBalStartingAcct1 { - PanicOn(fmt.Sprintf("expected %v, observed %v starting acct1 balance", expectedBalStartingAcct1, startingBalanceAcct1)) + t.Fatalf("expected %v, observed %v starting acct1 balance", expectedBalStartingAcct1, startingBalanceAcct1) } //vv("sad path: transferUSD %v from %v -> %v, with power loss half-way through", transferUSD, fieldAcct0, fieldAcct1) @@ -175,20 +179,20 @@ func TestAPI_ImportAtomicRecord(t *testing.T) { err = m0api.ImportAtomicRecord(ctx, qcx, air.Clone(), opt) //err = m0api.ImportAtomicRecord(ctx, nil, air, opt) if err != pilosa.ErrAborted { - PanicOn(fmt.Sprintf("expected ErrTxnAborted but got err='%#v'", err)) + t.Fatalf("expected ErrTxnAborted but got err='%#v'", err) } // sad path, cleanup qcx.Abort() qcx = nil - b0, b1 := queryBalances(m0api, acctOwnerID, fieldAcct0, fieldAcct1, index) + b0, b1 := queryBalances(t, m0api, acctOwnerID, fieldAcct0, fieldAcct1, index) //vv("after power failure tx, balance: acct0=%v, acct1=%v", b0, b1) if b0 != expectedBalStartingAcct0 { - PanicOn(fmt.Sprintf("expected %v, observed %v starting acct0 balance", expectedBalStartingAcct0, b0)) + t.Fatalf("expected %v, observed %v starting acct0 balance", expectedBalStartingAcct0, b0) } if b1 != expectedBalStartingAcct1 { - PanicOn(fmt.Sprintf("expected %v, observed %v starting acct1 balance", expectedBalStartingAcct1, b1)) + t.Fatalf("expected %v, observed %v starting acct1 balance", expectedBalStartingAcct1, b1) } //vv("good: with power loss half-way, no change in account balances; acct0=%v; acct1=%v", b0, b1) @@ -199,16 +203,18 @@ func TestAPI_ImportAtomicRecord(t *testing.T) { qcx = m0api.Txf().NewQcx() err = m0api.ImportAtomicRecord(ctx, qcx, air.Clone()) - PanicOn(err) + if err != nil { + t.Fatalf("importing record: %v", err) + } if err := qcx.Finish(); err != nil { t.Fatal(err) } - eb0, eb1 := queryBalances(m0api, acctOwnerID, fieldAcct0, fieldAcct1, index) + eb0, eb1 := queryBalances(t, m0api, acctOwnerID, fieldAcct0, fieldAcct1, index) // should have been applied this time. if eb0 != expectedBalEndingAcct0 || eb1 != expectedBalEndingAcct1 { - PanicOn(fmt.Sprintf("problem: transaction did not get committed/applied. transferUSD=%v, but we see: startingBalanceAcct0=%v -> endingBalanceAcct0=%v; startingBalanceAcct1=%v -> endingBalanceAcct1=%v", transferUSD, startingBalanceAcct0, eb0, startingBalanceAcct1, eb1)) + t.Fatalf("problem: transaction did not get committed/applied. transferUSD=%v, but we see: startingBalanceAcct0=%v -> endingBalanceAcct0=%v; startingBalanceAcct1=%v -> endingBalanceAcct1=%v", transferUSD, startingBalanceAcct0, eb0, startingBalanceAcct1, eb1) } //vv("ending balance: acct0=%v, acct1=%v", eb0, eb1) @@ -219,20 +225,22 @@ func TestAPI_ImportAtomicRecord(t *testing.T) { qcx = m0api.Txf().NewQcx() err = m0api.ImportAtomicRecord(ctx, qcx, air) + if err != nil { + t.Fatalf("importing record: %v", err) + } if err := qcx.Finish(); err != nil { t.Fatal(err) } - PanicOn(err) - eb0, eb1 = queryBalances(m0api, acctOwnerID, fieldAcct0, fieldAcct1, index) + eb0, eb1 = queryBalances(t, m0api, acctOwnerID, fieldAcct0, fieldAcct1, index) if eb0 != 0 || eb1 != 0 { - PanicOn("problem: bits did not clear") + t.Fatal("problem: bits did not clear") } //vv("cleared balances: acct0=%v, acct1=%v", eb0, eb1) - iraBit = queryIRABit(m0api, acctOwnerID, iraField, iraRowID, index) + iraBit = queryIRABit(t, m0api, acctOwnerID, iraField, iraRowID, index) if iraBit { - PanicOn("IRA bit should have been cleared") + t.Fatal("IRA bit should have been cleared") } } From ce84f2cac5d5247f5c5e8855aaad730e88ba0ff6 Mon Sep 17 00:00:00 2001 From: Seebs Date: Wed, 12 Oct 2022 11:53:19 -0500 Subject: [PATCH 02/10] make perf_able run at all, make it debug a bit better switch perf-able to using same node type we use for other spot instances, because otherwise it never finds any available capacity. we switch the perf-able script to use the standard get_value function instead of direct jq calls. we try to grab server logs if the restore fails in the hopes of finding out why the restore very occasionally fails. --- qa/scripts/perf/able/ableSetup.sh | 47 ++++++++++++++++++++++++++----- qa/scripts/perf/able/ableTest.sh | 13 +++++++-- qa/tf/perf/able/main.tf | 4 +-- 3 files changed, 52 insertions(+), 12 deletions(-) diff --git a/qa/scripts/perf/able/ableSetup.sh b/qa/scripts/perf/able/ableSetup.sh index ae180011a..d642937a9 100755 --- a/qa/scripts/perf/able/ableSetup.sh +++ b/qa/scripts/perf/able/ableSetup.sh @@ -20,7 +20,35 @@ pushd ./qa/tf/perf/able echo "Running terraform init..." terraform init -input=false echo "Running terraform apply..." -terraform apply -input=false -auto-approve + +okay=false +# This logic is gratuitously complicated because I want visibility +# into how it's working, or not-working. The chances are this should +# just be a test against the exit status of terraform apply. +tries=1 +while ! $okay && [ $tries -le $max_tries ] ; do + echo "Try $tries/$max_tries, running terraform..." + terraform apply -input=false -auto-approve + tf=$? + terraform output -json > outputs.json + echo "Outputs:" + cat outputs.json + must_get_value outputs.json TMP_I .ingest_ips 0 '"value"' 0 + must_get_value outputs.json TMP_D .data_node_ips 0 '"value"' 0 + echo "TF status: $tf, ingest_ips $TMP_I, data_node_ips $TMP_D" + case $TMP_I.$TMP_D in + *null*) echo >&2 "looks like we failed, null in IPs." + tries=$(expr $tries + 1) + ;; + *) okay=true + ;; + esac +done +echo "okay $okay, tries $tries" +if ! $okay; then + echo >&2 "didn't start terraform successfully, giving up" + exit 1 +fi terraform output -json > outputs.json popd @@ -31,28 +59,33 @@ EBS_DEVICE_NAME=/dev/nvme1n1 FB_BINARY=featurebase_linux_arm64 # get the first ingest host -INGESTNODE0=$(cat ./qa/tf/perf/able/outputs.json | jq -r '[.ingest_ips][0]["value"][0]') +must_get_value ./qa/tf/perf/able/outputs.json INGESTNODE0 .ingest_ips 0 '"value"' 0 echo "using INGESTNODE0 ${INGESTNODE0}" # get the first data host -DATANODE0=$(cat ./qa/tf/perf/able/outputs.json | jq -r '[.data_node_ips][0]["value"][0]') +must_get_value ./qa/tf/perf/able/outputs.json DATANODE0 .data_node_ips 0 '"value"' 0 echo "using DATANODE0 ${DATANODE0}" +case ${INGESTNODE0}${DATANODE0} in +*null*) echo >&2 "didn't get nodes, giving up early" + exit 1 + ;; +esac -DEPLOYED_CLUSTER_PREFIX=$(cat ./qa/tf/perf/able/outputs.json | jq -r '[.cluster_prefix][0]["value"]') +must_get_value ./qa/tf/perf/able/outputs.json DEPLOYED_CLUSTER_PREFIX .cluster_prefix 0 '"value"' echo "Using DEPLOYED_CLUSTER_PREFIX: ${DEPLOYED_CLUSTER_PREFIX}" -DEPLOYED_CLUSTER_REPLICA_COUNT=$(cat ./qa/tf/perf/able/outputs.json | jq -r '[.fb_cluster_replica_count][0]["value"]') +must_get_value ./qa/tf/perf/able/outputs.json DEPLOYED_CLUSTER_REPLICA_COUNT .fb_cluster_replica_count 0 '"value"' echo "Using DEPLOYED_CLUSTER_REPLICA_COUNT: ${DEPLOYED_CLUSTDEPLOYED_CLUSTER_REPLICA_COUNTER_PREFIX}" -DEPLOYED_DATA_IPS=$(cat ./qa/tf/perf/able/outputs.json | jq -r '[.data_node_ips][0]["value"][]') +must_get_value ./qa/tf/perf/able/outputs.json DEPLOYED_DATA_IPS .data_node_ips 0 '"value"' "" echo "DEPLOYED_DATA_IPS: {" echo "${DEPLOYED_DATA_IPS}" echo "}" DEPLOYED_DATA_IPS_LEN=`echo "$DEPLOYED_DATA_IPS" | wc -l` -DEPLOYED_INGEST_IPS=$(cat ./qa/tf/perf/able/outputs.json | jq -r '[.ingest_ips][0]["value"][]') +must_get_value ./qa/tf/perf/able/outputs.json DEPLOYED_INGEST_IPS .ingest_ips 0 '"value"' "" echo "DEPLOYED_INGEST_IPS: {" echo "${DEPLOYED_INGEST_IPS}" echo "}" diff --git a/qa/scripts/perf/able/ableTest.sh b/qa/scripts/perf/able/ableTest.sh index 282bf3d7a..d001b89d2 100755 --- a/qa/scripts/perf/able/ableTest.sh +++ b/qa/scripts/perf/able/ableTest.sh @@ -1,12 +1,13 @@ #!/bin/bash # get the first ingest host -INGESTNODE0=$(cat ./qa/tf/perf/able/outputs.json | jq -r '[.ingest_ips][0]["value"][0]') +must_get_value ./qa/tf/perf/able/outputs.json INGESTNODE0 .ingest_ips 0 '"value"' 0 echo "using INGESTNODE0 ${INGESTNODE0}" # get the first data host -DATANODE0=$(cat ./qa/tf/perf/able/outputs.json | jq -r '[.data_node_ips][0]["value"][0]') +must_get_value ./qa/tf/perf/able/outputs.json DATANODE0 .data_node_ips 0 '"value"' 0 echo "using DATANODE0 ${DATANODE0}" +must_get_value ./qa/tf/perf/able/outputs.json DEPLOYED_DATA_IPS .data_node_ips 0 '"value"' "" # leaving this here because K6 is timing out and need to work out why # ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "wget https://github.com/grafana/k6/releases/download/v0.36.0/k6-v0.36.0-linux-arm64.tar.gz" @@ -45,7 +46,13 @@ echo "Restoring data" ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "cd /data; featurebase restore --host http://${DATANODE0}:10101 -s /data/data/backup > restore.out" if (( $? != 0 )) then - echo "Restoring failed" + echo "restoring failed. trying to dump server logs in case server crashed:" + for i in $DEPLOYED_DATA_IPS; do + echo "BEGIN LOGS $i:" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${i} "cat /var/log/molecula/featurebase.log" + echo "END LOGS $i" + + done exit 1 fi diff --git a/qa/tf/perf/able/main.tf b/qa/tf/perf/able/main.tf index a86e6dc4f..508153d21 100644 --- a/qa/tf/perf/able/main.tf +++ b/qa/tf/perf/able/main.tf @@ -3,10 +3,10 @@ module "able-cluster" { cluster_prefix = var.cluster_prefix region = var.region profile = var.profile - fb_data_node_type = "m6g.12xlarge" + fb_data_node_type = "c6g.16xlarge" fb_data_disk_iops = 10000 fb_data_node_count = 3 - fb_ingest_type = "m6g.2xlarge" + fb_ingest_type = "c6g.2xlarge" fb_ingest_disk_iops = 10000 fb_ingest_disk_size_gb = 500 fb_ingest_node_count = 1 From 102fb661b4679e49b05407f23d324e2b33a85172 Mon Sep 17 00:00:00 2001 From: Travis Turner Date: Fri, 14 Oct 2022 14:02:36 -0500 Subject: [PATCH 03/10] Fix some issues with running IDK tests in docker. (#2248) *Stop running TestKafkaSourceIntegration with t.Parallel() This test can't be run in parallel as it's currently written. Doing so allows for interleaving of messages to the same kafka topic between tests. I didn't attempt to modify the test so it could be run in parallel. That could be done, but left for someone more ambitious. * Remove idk/testenv/certs which got accidentally committed. also update .gitignore to include those. --- .gitignore | 3 ++ Dockerfile | 2 +- idk/kafka/source_test.go | 2 -- idk/testenv/certs/ca.crl | 16 ---------- idk/testenv/certs/ca.crt | 28 ------------------ idk/testenv/certs/ca.key | 51 -------------------------------- idk/testenv/certs/localhost.crt | 25 ---------------- idk/testenv/certs/localhost.csr | 16 ---------- idk/testenv/certs/localhost.key | 27 ----------------- idk/testenv/certs/pilosa-tls.crt | 25 ---------------- idk/testenv/certs/pilosa-tls.csr | 16 ---------- idk/testenv/certs/pilosa-tls.key | 27 ----------------- idk/testenv/certs/theclient.crt | 25 ---------------- idk/testenv/certs/theclient.csr | 16 ---------- idk/testenv/certs/theclient.key | 27 ----------------- 15 files changed, 4 insertions(+), 302 deletions(-) delete mode 100644 idk/testenv/certs/ca.crl delete mode 100644 idk/testenv/certs/ca.crt delete mode 100644 idk/testenv/certs/ca.key delete mode 100644 idk/testenv/certs/localhost.crt delete mode 100644 idk/testenv/certs/localhost.csr delete mode 100644 idk/testenv/certs/localhost.key delete mode 100644 idk/testenv/certs/pilosa-tls.crt delete mode 100644 idk/testenv/certs/pilosa-tls.csr delete mode 100644 idk/testenv/certs/pilosa-tls.key delete mode 100644 idk/testenv/certs/theclient.crt delete mode 100644 idk/testenv/certs/theclient.csr delete mode 100644 idk/testenv/certs/theclient.key diff --git a/.gitignore b/.gitignore index fa912d374..4d6f1a763 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,9 @@ builds/ *.tfstate.backup .vscode +idk/testdata/idk*.out +idk/testenv/certs/* + # copy of .gitignore from archived idk repo # Compiled Object files, Static and Dynamic libs (Shared Objects) *.o diff --git a/Dockerfile b/Dockerfile index 992336ee0..59f906052 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ FROM golang:${GO_VERSION} as pilosa-builder ARG MAKE_FLAGS WORKDIR /pilosa -RUN go get github.com/rakyll/statik +RUN go install github.com/rakyll/statik@v0.1.7 COPY . ./ COPY --from=lattice-builder /lattice/build /lattice diff --git a/idk/kafka/source_test.go b/idk/kafka/source_test.go index 3f796a259..eaeccca3c 100644 --- a/idk/kafka/source_test.go +++ b/idk/kafka/source_test.go @@ -549,8 +549,6 @@ func TestKafkaSourceTimeout(t *testing.T) { // be, but I think it has something to do with kafka rebalancing // itself when a new client joins. func TestKafkaSourceIntegration(t *testing.T) { - t.Parallel() - if testing.Short() { t.Skip() } diff --git a/idk/testenv/certs/ca.crl b/idk/testenv/certs/ca.crl deleted file mode 100644 index 905918346..000000000 --- a/idk/testenv/certs/ca.crl +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN X509 CRL----- -MIICfjBoAgEBMA0GCSqGSIb3DQEBCwUAMA0xCzAJBgNVBAMTAmNhFw0yMjA3MjIx -OTUxNDVaGA8yMTIyMDcyMjE5NTE0MlowAKAjMCEwHwYDVR0jBBgwFoAU+NtDPKa1 -UzeelNYEuhD5snOV+aowDQYJKoZIhvcNAQELBQADggIBAIfRwTYSQNDwnFB3YlB/ -PoHhEWKdmyoFnN/Zax9FIa8/0F7K/mWwoCPH5xhdP9oo4MR3XR9R0A+iVX3Vohme -ku6XgL2YxGwYL5pZLNH1N34iRNF8R2TnLHMi8dF37JJcJ/HsuiGRqNnpnELlz1m8 -/sxJVl8w3sZBsCmMsDI/lyzk1du+mKJk3bIjapefyT/cQGd4r8kbDyM4ZRzORiks -g4X6nXZK1jhBo6/7nzLsa9egHUGA4rleBleimCXcnaVCyQgVOXorhHdGPNIJQRZg -JGIzV1FdSp2ecrzZ0ERALtz4VkOyWK9Nfhy6TJBiKvc4gDS7M/meNl4GdIu8eV6W -BdL/VlR1JsUSBejd2vjdd5X0SZoMi6dJzUoU6EhmyRFnZMdLAlRcn7eHQqXW5bqP -ZqnGAbb68tVLZI0vt0QyYlmlaWKFkOMGSS+5Gu04uoYNDufHzMb0Nh5vt5MEEkNE -ZYERuzT/PcrI1dEq6di9iK6dRoeTERMgWcZoKg7Yx5jReks0v+Pae4d+B4dHdB52 -LtmK9bn43/E2gbVhRYNDX7xi6rG9AxdshL3/IcLq11bWiDjPL7sUAcvJKk//KXEc -nA/p8H+ZHsD3E1Lln+/3Yf7nj/cxjbF46RRm0yzLdDuTVa+Ov8OB7DtGhT8wW+Ok -gEJXdXlcnzv51gGa2F35/DFi ------END X509 CRL----- diff --git a/idk/testenv/certs/ca.crt b/idk/testenv/certs/ca.crt deleted file mode 100644 index ab84e8414..000000000 --- a/idk/testenv/certs/ca.crt +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIE3DCCAsSgAwIBAgIBATANBgkqhkiG9w0BAQsFADANMQswCQYDVQQDEwJjYTAg -Fw0yMjA3MjIxOTUxNDVaGA8yMTIyMDcyMjE5NTE0MlowDTELMAkGA1UEAxMCY2Ew -ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQD3qe+w4WaeFtroEqBpxKJY -/a/IpC12Bg4HAYqkK3FwWhOVA+AQ1w2AA/BnLa3u8eszVsNdsnmo+qWZmI9fiJiR -sylJNbnATuWYus7rNNXWnhot3P6CJjEMs5phC0S9zaizFVzL7GFnpjfGgPrbZoQJ -Blmxb/IuEaaKGjUw0MSs83SuauRTGBjVSX80JYI61Wc/KO8hhmLEMne9WSD+Ow3i -GEt5RGRtN6HLkmCBPHieBsWtqToltEV5AqgOXiskGK16q13osBK6mg17QDqg3g7z -w2XSGQx/HSS8e16SqBBt3Ia43ZL7r8qgNxXA9wQP86RKI55ncR3Q7MGVcIMobYbh -gB3nlgqSIYkTs5+5Ffq3na+Fv7yjhw/4gl9UKb84wpZdgHyL4HFrkwdZ3k/go319 -6n0gLpAsgruBF8MNRdQmyojFJX0NKgT7qW6FabpjZklLfzI8MWHX+2sCmICc8Ny5 -imbdz9sJGJi9vEU+AT6HK0pNHQx+4aQyiq/Md3XFNJmkvt9m9vfE7IcTlV/1Pf7W -7Sj06q55k9lO+nmv6qfu3nO1EL+MIHDvObkqNrKiA4ynuBWa+ZIwjLvc/zs6w6or -l7qGSBZZCHv/e/cPrq/EIxUAvD9yhUUbpJY2FCTGv5U87vxWmqHGnoTviRbkg9u7 -6mEwX84Xspg1bTgMbHs7OQIDAQABo0UwQzAOBgNVHQ8BAf8EBAMCAQYwEgYDVR0T -AQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQU+NtDPKa1UzeelNYEuhD5snOV+aowDQYJ -KoZIhvcNAQELBQADggIBADLv2XnXmYCpHVjqVD4NHmg7iv1nitOPsgcqmIUlJ8ZA -iJKN7o5eZs1k26MQXFjcTtEqjV7+yzMfnH53bvD5oEzpxzK6IzQyhxOmz07h907w -/31GVy1VD9+hfUukRnwcVCabc8attyrSs1rI+4RmMdEBNrUEQkNnwWxwzgBMFaIM -P2uH8qen3EIJFxLMl5JJOYE2FzuXrTpvsA0jsCzxVI8bEHzBVaLiNqdMQedsdKAV -WLp64yW/ACnqadk1YIfb8S4sAx/HsLBsnz5+LHHoCzUcodSVODm/otBxJAB2vNUb -ulh3bSWZVdQ4SykMFLlDDd0l+gbgPCVsB8aKj5r6b4EuM6Bsq8GTG511f03vP96g -U4sUkZHssYxA7T5VzIHUtzSl0xC0JngVPVXAcUqGv0etNwlaL/zDotVC8mtPTF15 -cTwy9upE/MHXrYegMTdi2t5ZvM9vVHWemSJ1J0X0jsVmJtT9hYuzPyFR8qAEpd06 -XZD2upB8c3X+kyWdIV0oh2fk37glUU3JihZTRib24qBZ7TUlkGIM0K3PkUHlZ8+v -ljwouIa5Ghf+rYBA0ABJeYdFw6i9hRglWvBc/FHmpIBl9gLzB7+C9Yg20WXMZCvr -p7H/xSf5Dh8fpCO0yeGdpzfWy/3kpTmxg9/RPWyv8hTaB+4ur6CY3pVsVcshLhS3 ------END CERTIFICATE----- diff --git a/idk/testenv/certs/ca.key b/idk/testenv/certs/ca.key deleted file mode 100644 index d208e1915..000000000 --- a/idk/testenv/certs/ca.key +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIJKgIBAAKCAgEA96nvsOFm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crt b/idk/testenv/certs/localhost.crt deleted file mode 100644 index 6708b2c7e..000000000 --- a/idk/testenv/certs/localhost.crt +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIENjCCAh6gAwIBAgIQLtKA8VN9DP2u3nQt1rcZFzANBgkqhkiG9w0BAQsFADAN -MQswCQYDVQQDEwJjYTAgFw0yMjA3MjIxOTUxNDVaGA8yMTIyMDcyMjE5NTE0Mlow -FDESMBAGA1UEAxMJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAsxpHn/bm5EwiYcKIKY3sKG5sByIJa6gG6MFnrBt2Urd9LlDEnyq6A38i -fhIwTqPUY4dvCXW6SNOqp/ugTCbp78F0GUPvJodK+IsrvvVjmQeXg/9ieN91VqY5 -xaVkkaLOEWrcoTAD23+eO0Q3afG5+AFplFyrGwsCFIgz0iB8DMuixsObCao3EWA+ -YwiFUTFE6gthq2rPPXzFtszlGFm6ZJAJOIfnVTgEjNMSc5KgkF39+1vL6URtybnk -3thhnsgSWQDoWgKiBxPt/IuTnJun5JdHkgKTgfO2PVczsFmMzg2e+LJjI8ds8GEY -T7P9jP5KjtzrZ8WMKw6BeeNzXCmjvQIDAQABo4GIMIGFMA4GA1UdDwEB/wQEAwID -uDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwHQYDVR0OBBYEFB9m9jk7 -qfCfPnHUcWDTf7b40ZH0MB8GA1UdIwQYMBaAFPjbQzymtVM3npTWBLoQ+bJzlfmq -MBQGA1UdEQQNMAuCCWxvY2FsaG9zdDANBgkqhkiG9w0BAQsFAAOCAgEAwwXgkVYu -VBq6Uxm+DORby4LiFmLwKIJFuO1UUlAvqNAmUyy6h3S/azb9qvfNiMmHe0+C9j2M -t4eb1KGbZaNiMr5bATFGkJzQl4bEsKZqLv23D6LDRV8D/DtZzNb6e2xhIx1uQYc8 -J8oVlciTKVr5jI82ewvO4O4mu9MlFACva1Zvzk0CB4UZEq1QXpTAlNPG7e3PVT1u -wNZXJ/8kmE1/7OMfQ9PZBGtiYK3OAiTLc0GHFhNjnCFWvFq+sD70bSJCiy3UjMUq -GhcAVHsyzv+O2nmDX4G/QXn+An1wb6hfKYFsR4nWBXQn1HjaswXdw91O6t1UViTS -RittkL/jS3Pn1wzBl80zn+/oOcxSt/KKA07Wfi4JYk6KHWHMk6lTnvMn+csXiRpq -hvUd4gcr4fTYynaXWMP3Of+H1DyJ0edXHxrHjVRS7f9AOpQF1LaZSkWff9ety5Ir -omCvkmopsOeFxKvrbVvgkAi0r8rwfockSNxZI2tp2QFXu6FDywKtL/P/YBJujcsm -zm5XFrjnri/R+c9JQNbuctZtb3Y1WAXnz2RWeunNxxjyaYvEiWh6vXgu0QCXUbev -4wUOK+gFgyczHtbprph9a5iUjEA3P+wzp5u7zGpax07BXMEFSul0HEklc1YP3/ac -35SOBQlvo1oX0VJE0CZB8zlT7upPTuTjus0= ------END CERTIFICATE----- diff --git a/idk/testenv/certs/localhost.csr b/idk/testenv/certs/localhost.csr deleted file mode 100644 index 86fd59537..000000000 --- a/idk/testenv/certs/localhost.csr +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIICgDCCAWgCAQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0B -AQEFAAOCAQ8AMIIBCgKCAQEAsxpHn/bm5EwiYcKIKY3sKG5sByIJa6gG6MFnrBt2 -Urd9LlDEnyq6A38ifhIwTqPUY4dvCXW6SNOqp/ugTCbp78F0GUPvJodK+IsrvvVj -mQeXg/9ieN91VqY5xaVkkaLOEWrcoTAD23+eO0Q3afG5+AFplFyrGwsCFIgz0iB8 -DMuixsObCao3EWA+YwiFUTFE6gthq2rPPXzFtszlGFm6ZJAJOIfnVTgEjNMSc5Kg -kF39+1vL6URtybnk3thhnsgSWQDoWgKiBxPt/IuTnJun5JdHkgKTgfO2PVczsFmM -zg2e+LJjI8ds8GEYT7P9jP5KjtzrZ8WMKw6BeeNzXCmjvQIDAQABoCcwJQYJKoZI -hvcNAQkOMRgwFjAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZIhvcNAQELBQAD -ggEBAItPe0ClBPlTpkfmbTE0JWsai6Nh12bakigQePI58HYbeV2g0Ld9vpUNGE+i -esTnvDKSYEHKyscNRsehXU8XArKEj6MzUgicPxhqr0eow9O2kGanUz5/M4Y8w0Oa -Q2wUCpqS08jCT0bwdCtFY/y19DXJmwovkGa5+yB+UV5FKkA31l6X7c0vzrdQexAc -FOQjG/9TpvSWXkvkZOv9041f9xeg2g23lfx5gnDvef0hgKhbOsN9tr6tVfJ4zGDv -qC+PuKMTLTfJWKgc2wNLBevA3lYFoHchD+hZMGNktsMraS2Re0FC6MCqH9UMlSGd -T4FN0g5TdI1o5/Hcxjmeac+T444= ------END CERTIFICATE REQUEST----- diff --git a/idk/testenv/certs/localhost.key b/idk/testenv/certs/localhost.key deleted file mode 100644 index 4db92c33f..000000000 --- a/idk/testenv/certs/localhost.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAsxpHn/bm5EwiYcKIKY3sKG5sByIJa6gG6MFnrBt2Urd9LlDE -nyq6A38ifhIwTqPUY4dvCXW6SNOqp/ugTCbp78F0GUPvJodK+IsrvvVjmQeXg/9i -eN91VqY5xaVkkaLOEWrcoTAD23+eO0Q3afG5+AFplFyrGwsCFIgz0iB8DMuixsOb -Cao3EWA+YwiFUTFE6gthq2rPPXzFtszlGFm6ZJAJOIfnVTgEjNMSc5KgkF39+1vL -6URtybnk3thhnsgSWQDoWgKiBxPt/IuTnJun5JdHkgKTgfO2PVczsFmMzg2e+LJj -I8ds8GEYT7P9jP5KjtzrZ8WMKw6BeeNzXCmjvQIDAQABAoIBAFuT5meusWSuYS4n -b8P/o28Q9v+2saZwZggBTGc+K4Qj+kgCWGciS7aZ/SMFXdn3/xNdHrNxlOzD/hCi -otYNV7S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NBh8ZInbetUNIi -A+TeEEeSdnK7ou4s030krS/pG0ZsTUYVEMRFwHiIvoD6/G2wsJhi ------END RSA PRIVATE KEY----- diff --git a/idk/testenv/certs/pilosa-tls.crt b/idk/testenv/certs/pilosa-tls.crt deleted file mode 100644 index 9b1de2b33..000000000 --- a/idk/testenv/certs/pilosa-tls.crt +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEODCCAiCgAwIBAgIQbk/XbQqd/JZWsL2MQ2BmpjANBgkqhkiG9w0BAQsFADAN -MQswCQYDVQQDEwJjYTAgFw0yMjA3MjIxOTUxNDVaGA8yMTIyMDcyMjE5NTE0Mlow -FTETMBEGA1UEAxMKcGlsb3NhLXRsczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBAN++mmirorKBY7HNe+obmh/1od/5INgjIMobQ6BILGzKeWIH0BpEVR9w -dTUtGM2z/kct8Oi6RibOl99Lj0d/nseKn9kjqMXdJEnoyooQBI++QrWwyYHZ76ag -9H1gmpCqUQILibFGUy9WLRuJbbLAGYfFsb2aiISEIFwbhFg2uFFD8W7VGzOHCXfA -S+oiYSFP3E9pddN4bkurmeuiL+lXxFBTL+RhssdBNreiS4pJ21vbPJw0xpwU7RVB -2aSNVqfdVzXIMwnjPX9zqeGUcvJAcI+9kcMLwGmynjaZ1idVPbpmShhAHJqR/R/1 -r20i32UE6l5SHBWeW+n/2Wb5ZXHT6lkCAwEAAaOBiTCBhjAOBgNVHQ8BAf8EBAMC -A7gwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMB0GA1UdDgQWBBSpCzKw -Yt9vI7BsLAy43R9fGNLbjjAfBgNVHSMEGDAWgBT420M8prVTN56U1gS6EPmyc5X5 -qjAVBgNVHREEDjAMggpwaWxvc2EtdGxzMA0GCSqGSIb3DQEBCwUAA4ICAQBPLSKl -LU3BenjGhIoPfz43odk+XWtcBWx2xxI0+RKtYMXA689lk9UO8ghtPfbhvovVzORF -Sveh1GC6n6kIwmA6v8svQewqWiKlcOglQttRuCdKPLF3y0OnyxW4ki4/nHOmKWvo -lUS+iB37HNMMkvAp9t19k3d18NVDWPpa1R8tukWYdsbeze/lznXO4lHL5AoRZqJP -h5ihCdW07spDX4N0cx09vfqCBGEMClYvnBZzIjiDdtEXjh9Ve81+kxqak6lX0nL0 -p4ilqnWbz4zokTusJZCSfPslcq7V95+3EiBZjZ/NV9ZNjR9HCjfPCe5uQqYK5LJh -1/RG8gBUfcDLvm36c2cQI0ZrG9RMXKjBPlSv3OPd4vRlEMVHVtTyxP3FAMnhlYqp -kVmgoo0ambTxoYhdS3vKV/47KNnmWiJoPNZUZO+40zRfcCuBfuPQGlQgr3pctGZy -NQVp0eNz9xOH+UDrHhPPyDG0F+XcwgflBaIWSoyh4skESlzGqTBcsKGOkVCyrapq -a5jS1z8kdbunnwit8Di0OxXHxbjoIUAEpyP9fakGRcUD4LRZOUkHiR2Dci4hpzb3 -6Xd4BtL0Va9uj//vcRQ+5nnO1PshOde6sQ7Kup2B4OmwyDPcm8Af3nViYQOt1hCc -5vO61aRQN6YmLO5i4CD+kjaurBn8ddTzbGJaaA== ------END CERTIFICATE----- diff --git a/idk/testenv/certs/pilosa-tls.csr b/idk/testenv/certs/pilosa-tls.csr deleted file mode 100644 index 1392027c8..000000000 --- a/idk/testenv/certs/pilosa-tls.csr +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIICgjCCAWoCAQAwFTETMBEGA1UEAxMKcGlsb3NhLXRsczCCASIwDQYJKoZIhvcN -AQEBBQADggEPADCCAQoCggEBAN++mmirorKBY7HNe+obmh/1od/5INgjIMobQ6BI -LGzKeWIH0BpEVR9wdTUtGM2z/kct8Oi6RibOl99Lj0d/nseKn9kjqMXdJEnoyooQ -BI++QrWwyYHZ76ag9H1gmpCqUQILibFGUy9WLRuJbbLAGYfFsb2aiISEIFwbhFg2 -uFFD8W7VGzOHCXfAS+oiYSFP3E9pddN4bkurmeuiL+lXxFBTL+RhssdBNreiS4pJ -21vbPJw0xpwU7RVB2aSNVqfdVzXIMwnjPX9zqeGUcvJAcI+9kcMLwGmynjaZ1idV -PbpmShhAHJqR/R/1r20i32UE6l5SHBWeW+n/2Wb5ZXHT6lkCAwEAAaAoMCYGCSqG -SIb3DQEJDjEZMBcwFQYDVR0RBA4wDIIKcGlsb3NhLXRsczANBgkqhkiG9w0BAQsF -AAOCAQEAauULC7xyYwTWpeM7b4I3LXMHAR3Q9/kQqyvBYkMUacKZRftzGZ2TwTwZ -6PXa3TI6zFQSL7Nb+Y7ybFhKWZ6jy8TQ8iXXLERxlk//Mg7+0EKNFIACfF7+iiuB -kOyfRSIYYQ3YhdoDUHAxe44eStPlvbMK+DR1SI96gC75Q3fxN73Tj45VCvvglSYt -tx3xPx6kQjseXodjzElYPEnjTSBADY0Ep8QPCZH1Q0fCWfh4xm/nScxNvvdlhc2q -uBV5mmciUrIbJycIcYKnlcUiWz0JkEPjEVu4LORlReFrKsVlTt7JYAuFAhOHxxP9 -eroL8R2Fc5vQ/c/hM97oU2xdOrulTQ== ------END CERTIFICATE REQUEST----- diff --git a/idk/testenv/certs/pilosa-tls.key b/idk/testenv/certs/pilosa-tls.key deleted file mode 100644 index aa872e19f..000000000 --- a/idk/testenv/certs/pilosa-tls.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEA376aaKuisoFjsc176huaH/Wh3/kg2CMgyhtDoEgsbMp5YgfQ -GkRVH3B1NS0YzbP+Ry3w6LpGJs6X30uPR3+ex4qf2SOoxd0kSejKihAEj75CtbDJ -gdnvpqD0fWCakKpRAguJsUZTL1YtG4ltssAZh8WxvZqIhIQgXBuEWDa4UUPxbtUb -M4cJd8BL6iJhIU/cT2l103huS6uZ66Iv6VfEUFMv5GGyx0E2t6JLiknbW9s8nDTG -nBTtFUHZpI1Wp91XNcgzCeM9f3Op4ZRy8kBwj72RwwvAabKeNpnWJ1U9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rf7DxEop/IXc2DHcwyGGsbZYz5+SpWiO3Jm2l2DjrY1UFPFkf -WY8KdQKBgQCtsRcM9Yhpid/wljem283Ea418nrIAY7zw4/JY4XRbaqxOW/YptQq3 -YHQP/jQb1eFeszLwNAorczdXbms/bie2u1+S+vG13z4IgmMtUVXMn8OMN9XYRGXk -UZOtUsJtD8jEEivLoeUN2vdq4oQXWimjVPlh7KS4Qu/W2r0CO2VPBg== ------END RSA PRIVATE KEY----- diff --git a/idk/testenv/certs/theclient.crt b/idk/testenv/certs/theclient.crt deleted file mode 100644 index c0387738f..000000000 --- a/idk/testenv/certs/theclient.crt +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIENjCCAh6gAwIBAgIQSrfnXrPnUTXzmeGaoP31NjANBgkqhkiG9w0BAQsFADAN -MQswCQYDVQQDEwJjYTAgFw0yMjA3MjIxOTUxNDVaGA8yMTIyMDcyMjE5NTE0Mlow -FDESMBAGA1UEAxMJdGhlY2xpZW50MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAudP6EFxKU3gcyd3NYIS7n5drg8Dwg6FyngyHsQM8l+EROAXep45iIJvu -QNiorUo+dUg5YlxRc1ElqpLi7oSrTZtRZ6EO7pyR44RJtZ9tJ6QjLSh9QaGFq0/2 -GbWQKJJlPT4ftftTdk8ioe3TTDlSmZEGBY1+6Z3c8xxk98VoYJkB86KsLtC9b8q9 -m4D3LWI4+J4echhM6x9YlHiq8HXsPHyBg51Kla3Q3jl1aDHfXuuvEiOVqxJEVx8e -11GPhYmFqQ561id9/S6uBc+u4DnNJUZ4xdA/uEo6PP4XgKBviAtaZvQGGBgtoKAr -tGBFF1QCDkq0QXvv65aArZnXyo+0ewIDAQABo4GIMIGFMA4GA1UdDwEB/wQEAwID -uDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwHQYDVR0OBBYEFN7YKblI -oBtbbLrJaa4XNWrnykw3MB8GA1UdIwQYMBaAFPjbQzymtVM3npTWBLoQ+bJzlfmq -MBQGA1UdEQQNMAuCCXRoZWNsaWVudDANBgkqhkiG9w0BAQsFAAOCAgEA0usMDZ0b -Ktazcxfd7yDgmuIXy06R6fyt/wJjRdPo8oi96a0b9Zj0+BTP2HjkM8/lPO5F8HkX -Ct5tBvuVtwHiTK5fHVsAsSH9H/G9JbX+q7EF3JWx1DDYgXyhU25mcegEkyRZ+hUe -2T3nItwUYjntVoaw4zBS8awTKc78eDZQ3UV3GlGvY3nejYdhpMkGg9dJ4y4M/HGC -P1VuzEpvT7il0cCGMDpuXcdMKNvljmcZYUEC0LCAADTpgfBPGP6lZaB0kU0mpP+e -Lhl6gwZm/toT3u+MGBECUrzHhNvav9LHHBFkquhVopNEEfpBHPtMD8pYm8ULDd5w -2cy53B9m+p3a6jjB85SL9kYudrjMOCbKbABiLxUABfH+5cV9lITNm9GdwuqqtBqL -H4lBAe8wVTf+u4v14diIJXSIjw+mSf7+4htSTTB8BdBmNShmwlCfJA/PXmJqRkVl -I8KE0OTFxHM0rndawXJjFCeNpbHYlTmVW1jtgu3Oz3tqKNwZgHd8kFCwCEkJtno5 -OkKamF1AAzAQELOqzIksIxRPde7egqQ3BfsHkOBbAdybBnUKGRhKf5/rA9SZFfe4 -ncujFadlq+sUk60TTCZaCyMIxDgbb1vQk+7pf3RoB2BDLsfNCqo8rdAhcrB9/8sQ -04HBTyQF+FSJH4bStq5Zm+jMDcb9tx3EAVs= ------END CERTIFICATE----- diff --git a/idk/testenv/certs/theclient.csr b/idk/testenv/certs/theclient.csr deleted file mode 100644 index 66d84c022..000000000 --- a/idk/testenv/certs/theclient.csr +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIICgDCCAWgCAQAwFDESMBAGA1UEAxMJdGhlY2xpZW50MIIBIjANBgkqhkiG9w0B -AQEFAAOCAQ8AMIIBCgKCAQEAudP6EFxKU3gcyd3NYIS7n5drg8Dwg6FyngyHsQM8 -l+EROAXep45iIJvuQNiorUo+dUg5YlxRc1ElqpLi7oSrTZtRZ6EO7pyR44RJtZ9t -J6QjLSh9QaGFq0/2GbWQKJJlPT4ftftTdk8ioe3TTDlSmZEGBY1+6Z3c8xxk98Vo -YJkB86KsLtC9b8q9m4D3LWI4+J4echhM6x9YlHiq8HXsPHyBg51Kla3Q3jl1aDHf -XuuvEiOVqxJEVx8e11GPhYmFqQ561id9/S6uBc+u4DnNJUZ4xdA/uEo6PP4XgKBv -iAtaZvQGGBgtoKArtGBFF1QCDkq0QXvv65aArZnXyo+0ewIDAQABoCcwJQYJKoZI -hvcNAQkOMRgwFjAUBgNVHREEDTALggl0aGVjbGllbnQwDQYJKoZIhvcNAQELBQAD -ggEBAAqCJIhdEa+y7/KwjLWdHeG4+kE0ergbmIEab4rswrUxCNq/8wedAASXGJ/O -Fj3WgxnpNnIV8MazGDbiRke498EiTiUnGQ20t0o8NXYxYxkk9SWW+DzOTojRBRjx -0HLFCImymdu8B7S/pBdzLO3RcCpa6iRdwGd/9TJgxhKf0NBC/fyZJ+fHhYGZNdt9 -U4g60/hJAD1XGBC3Ry0p8DfTpC3beb6RP0cJNT8YX4qMjq27nuQuaRKcdIV4jZa1 -rms2VspHpOPt+w+XoGFul1lfUut/nFlu5X2aTgnFNHTPZ7eDBVTBCdX1puvTvslg -gzN8dqH97Qyg3lOLYtHUii9dm5M= ------END CERTIFICATE REQUEST----- diff --git a/idk/testenv/certs/theclient.key b/idk/testenv/certs/theclient.key deleted file mode 100644 index 4fa7c43c6..000000000 --- a/idk/testenv/certs/theclient.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEogIBAAKCAQEAudP6EFxKU3gcyd3NYIS7n5drg8Dwg6FyngyHsQM8l+EROAXe -p45iIJvuQNiorUo+dUg5YlxRc1ElqpLi7oSrTZtRZ6EO7pyR44RJtZ9tJ6QjLSh9 -QaGFq0/2GbWQKJJlPT4ftftTdk8ioe3TTDlSmZEGBY1+6Z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IXcWl9EJ1cwKBgGl9uOtpaGE9/Gd3NwyhuFFdOhLj2iDkkc8MxftS -Pj7ytYqLv4gTfGDQmKG8epWjjXmm8kE4wuZFvM9CNnjeZNyD+tAQVR3DS2qDF+5c -jkRbq8CBmLq4MKaSvFZHYLKVgLJfJMphig7wPpM8kQLqj+IkH7JdS8NyvloUqSEu -Ly0BAoGATwLAQ5bZ1zT+ul4zxR3vkIS7YgTcEHa5OzszKVQ6iDArRDa7NWC8R06j -1R2Ur+T3UVINVFsChDsbebb6AUoSCzM48ZDvnX6C12T0vx+wLziw29hN84gAa+1f -kgFJZ+uena+ZZc8MLyOcM6E1nW0BpAXE0yVF4Vn2Df/wNzm9cGY= ------END RSA PRIVATE KEY----- From f5e141ba965cb2eac246a16bf2c2e37ab3a2dd7c Mon Sep 17 00:00:00 2001 From: Pranitha-malae <56414132+Pranitha-malae@users.noreply.github.com> Date: Wed, 19 Oct 2022 12:16:38 -0500 Subject: [PATCH 04/10] changes to add bool support in idk (#2240) * initial changes to add bool support in idk * modifying some default parameters for testing, will revert them later * adding support for bool in making fragments function * boolean values implementation without supporting empty or null values at this point * Implement bool support in batch using a map (and a slice for nulls) (#2247) * Implement bool support in batch using a map (and a slice for nulls) * Keep the PackBools default for now But set it explicity in the ingest tests which rely on it. * Modify batch to construct bool update like mutex The code in API.ImportRoaringShard has a switch statement which causes bool fields to be handled like mutex fields. This means, that the viewUpdate.Clear value should only contain data in the first "row" of the fragment, which it will treat as records to clear for *all* rows. This makes more sense for mutex fields; for bool fields, there's only one other row to clear. But since the code is currently handling them the same, we need to construct viewUpdate.Clear such that it conforms to that pattern. This commit also adds a test which covers this logic. * Remove commented code; revert config for testing This commit also removes the DELETE_SENTINEL case for non-packed bools, since that isn't supported anyway. * Revert default setting * remove inconsistent type scope * correcting the logic of string converstion to bool * resolving an error in a test * adding tests to cover code related to bool support in batch.go file and interface.go files * modifying interfaces test * added one more test case Co-authored-by: Travis Turner Co-authored-by: Travis Turner --- client/batch.go | 145 ++++++++++++++++++++++++++++------- client/batch_test.go | 43 +++++++++++ idk/ingest.go | 12 ++- idk/ingest_test.go | 132 +++++++++++++++++++++++++++++-- idk/interfaces.go | 9 ++- idk/interfaces_test.go | 23 ++++++ idk/kafka/cmd_delete_test.go | 1 + 7 files changed, 328 insertions(+), 37 deletions(-) diff --git a/client/batch.go b/client/batch.go index 265c52733..71b0ea171 100644 --- a/client/batch.go +++ b/client/batch.go @@ -87,6 +87,7 @@ type agedTranslation struct { // | uint64 | set | any | // | int64 | int | any | // | float64| decimal | scale | +// | bool | bool | any | // | nil | any | | // // nil values are ignored. @@ -124,6 +125,15 @@ type Batch struct { // values holds the values for each record of an int field values map[string][]int64 + // boolValues is a map[fieldName][idsIndex]bool, which holds the values for + // each record of a bool field. It is a map of maps in order to accomodate + // nil values (they just aren't recorded in the map[int]). + boolValues map[string]map[int]bool + + // boolNulls holds a slice of indices into b.ids for each bool field which + // has nil values. + boolNulls map[string][]uint64 + // times holds a time for each record. (if any of the fields are time fields) times []QuantizedTime @@ -233,6 +243,8 @@ func NewBatch(client *Client, size int, index *Index, fields []*Field, opts ...B headerMap := make(map[string]*Field, len(fields)) rowIDs := make(map[int][]uint64, len(fields)) values := make(map[string][]int64) + boolValues := make(map[string]map[int]bool) + boolNulls := make(map[string][]uint64) tt := make(map[int]map[string][]int, len(fields)) ttSets := make(map[string]map[string][]int) hasTime := false @@ -257,6 +269,8 @@ func NewBatch(client *Client, size int, index *Index, fields []*Field, opts ...B tt[i] = make(map[string][]int) } rowIDs[i] = make([]uint64, 0, size) + case FieldTypeBool: + boolValues[field.Name()] = make(map[int]bool) default: return nil, errors.Errorf("field type '%s' is not currently supported through Batch", typ) } @@ -273,6 +287,8 @@ func NewBatch(client *Client, size int, index *Index, fields []*Field, opts ...B clearRowIDs: make(map[int]map[int]uint64), rowIDSets: make(map[string][][]uint64), values: values, + boolValues: boolValues, + boolNulls: boolNulls, nullIndices: make(map[string][]uint64), toTranslate: tt, toTranslateClear: make(map[int]map[string][]int), @@ -480,28 +496,8 @@ func (b *Batch) Add(rec Row) error { field := b.header[i] switch val := rec.Values[i].(type) { case string: - if field.Opts().Type() != FieldTypeInt { - // nil-extend - for len(b.rowIDs[i]) < curPos { - b.rowIDs[i] = append(b.rowIDs[i], nilSentinel) - } - rowIDs := b.rowIDs[i] - // empty string is not a valid value at this point (Pilosa refuses to translate it) - if val == "" { // - b.rowIDs[i] = append(rowIDs, nilSentinel) - - } else if rowID, ok := b.getRowTranslation(field.Name(), val); ok { - b.rowIDs[i] = append(rowIDs, rowID) - } else { - ints, ok := b.toTranslate[i][val] - if !ok { - ints = make([]int, 0) - } - ints = append(ints, curPos) - b.toTranslate[i][val] = ints - b.rowIDs[i] = append(rowIDs, 0) - } - } else if field.Opts().Type() == FieldTypeInt { + switch field.Opts().Type() { + case FieldTypeInt: if val == "" { // copied from the `case nil:` section for ints and decimals b.values[field.Name()] = append(b.values[field.Name()], 0) @@ -522,6 +518,30 @@ func (b *Batch) Add(rec Row) error { b.toTranslate[i][val] = ints b.values[field.Name()] = append(b.values[field.Name()], 0) } + case FieldTypeBool: + // If we want to support bools as string values, we would do + // that here. + default: + // nil-extend + for len(b.rowIDs[i]) < curPos { + b.rowIDs[i] = append(b.rowIDs[i], nilSentinel) + } + rowIDs := b.rowIDs[i] + // empty string is not a valid value at this point (Pilosa refuses to translate it) + if val == "" { // + b.rowIDs[i] = append(rowIDs, nilSentinel) + + } else if rowID, ok := b.getRowTranslation(field.Name(), val); ok { + b.rowIDs[i] = append(rowIDs, rowID) + } else { + ints, ok := b.toTranslate[i][val] + if !ok { + ints = make([]int, 0) + } + ints = append(ints, curPos) + b.toTranslate[i][val] = ints + b.rowIDs[i] = append(rowIDs, 0) + } } case uint64: // nil-extend @@ -579,8 +599,8 @@ func (b *Batch) Add(rec Row) error { } b.rowIDSets[field.Name()] = append(rowIDSets, val) case nil: - t := field.Opts().Type() - if t == FieldTypeInt || t == FieldTypeDecimal || t == FieldTypeTimestamp { + switch field.Opts().Type() { + case FieldTypeInt, FieldTypeDecimal, FieldTypeTimestamp: b.values[field.Name()] = append(b.values[field.Name()], 0) nullIndices, ok := b.nullIndices[field.Name()] if !ok { @@ -589,7 +609,15 @@ func (b *Batch) Add(rec Row) error { nullIndices = append(nullIndices, uint64(curPos)) b.nullIndices[field.Name()] = nullIndices - } else { + case FieldTypeBool: + boolNulls, ok := b.boolNulls[field.Name()] + if !ok { + boolNulls = make([]uint64, 0) + } + boolNulls = append(boolNulls, uint64(curPos)) + b.boolNulls[field.Name()] = boolNulls + + default: // only append nil to rowIDs if this field already has // rowIDs. Otherwise, this could be a []string or // []uint64 field where we've only seen nil values so @@ -600,6 +628,10 @@ func (b *Batch) Add(rec Row) error { b.rowIDs[i] = append(rowIDs, nilSentinel) } } + + case bool: + b.boolValues[field.Name()][curPos] = val + default: return errors.Errorf("Val %v Type %[1]T is not currently supported. Use string, uint64 (row id), or int64 (integer value)", val) } @@ -712,7 +744,6 @@ func (b *Batch) Import() error { return errors.Wrap(err, "making fragments (flush)") } if b.useShardTransactionalEndpoint { - // TODO handle bool? frags, clearFrags, err = b.makeSingleValFragments(frags, clearFrags) if err != nil { return errors.Wrap(err, "making single val fragments") @@ -1478,6 +1509,60 @@ func (b *Batch) makeSingleValFragments(frags, clearFrags fragments) (fragments, } } } + // ------------------------- + // Boolean fields + // ------------------------- + falseRowOffset := 0 * shardWidth // fragment row 0 + trueRowOffset := 1 * shardWidth // fragment row 1 + + // For bools which have been set to null, clear both the true and false + // values for the record. Because this ends up going through the + // API.ImportRoaringShard() method (which handles `bool` fields the same as + // `mutex` fields), we don't actually set the true and false rows of the + // boolean fragment; rather, we just set the first row to indicate which + // records (for all rows) to clear. + for fieldname, boolNulls := range b.boolNulls { + field := b.headerMap[fieldname] + if field.Opts().Type() != featurebase.FieldTypeBool { + continue + } + for _, pos := range boolNulls { + recID := b.ids[pos] + shard := recID / shardWidth + clearBM := clearFrags.GetOrCreate(shard, field.Name(), "standard") + + fragmentColumn := recID % shardWidth + clearBM.Add(fragmentColumn) + } + } + + // For bools which have been set to a non-nil value, set the appropriate + // value for the record, and unset the opposing values. For example, if the + // bool is set to `false`, then set the bit in the "false" row, and clear + // the bit in the "true" row. + for fieldname, boolMap := range b.boolValues { + field := b.headerMap[fieldname] + if field.Opts().Type() != featurebase.FieldTypeBool { + continue + } + + for pos, boolVal := range boolMap { + recID := b.ids[pos] + + shard := recID / shardWidth + bitmap := frags.GetOrCreate(shard, field.Name(), "standard") + clearBM := clearFrags.GetOrCreate(shard, field.Name(), "standard") + + fragmentColumn := recID % shardWidth + clearBM.Add(fragmentColumn) + + if boolVal { + bitmap.Add(trueRowOffset + fragmentColumn) + } else { + bitmap.Add(falseRowOffset + fragmentColumn) + } + } + } return frags, clearFrags, nil } @@ -1700,6 +1785,14 @@ func (b *Batch) reset() { delete(clearMap, k) } } + for _, boolsMap := range b.boolValues { + for k := range boolsMap { + delete(boolsMap, k) + } + } + for k := range b.boolNulls { + delete(b.boolNulls, k) // TODO pool these slices + } for i := range b.toTranslateID { b.toTranslateID[i] = "" } diff --git a/client/batch_test.go b/client/batch_test.go index b78f7a616..ed893963e 100644 --- a/client/batch_test.go +++ b/client/batch_test.go @@ -33,6 +33,7 @@ func TestAgainstCluster(t *testing.T) { client := NewTestClient(t, c) t.Run("string-slice-combos", func(t *testing.T) { testStringSliceCombos(t, c, client) }) t.Run("import-batch-ints", func(t *testing.T) { testImportBatchInts(t, c, client) }) + t.Run("import-batch-bools", func(t *testing.T) { testImportBatchBools(t, c, client) }) t.Run("import-batch-sorting", func(t *testing.T) { testImportBatchSorting(t, c, client) }) t.Run("test-trim-null", func(t *testing.T) { testTrimNull(t, c, client) }) t.Run("test-string-slice-empty-and-nil", func(t *testing.T) { testStringSliceEmptyAndNil(t, c, client) }) @@ -1842,3 +1843,45 @@ func mutexNilClearKey(t *testing.T, c *test.Cluster, client *Client) { } errorIfNotEqual(t, resp.Result().Row().Keys, []string{"0"}) } + +func testImportBatchBools(t *testing.T, c *test.Cluster, client *Client) { + schema := NewSchema() + idx := schema.Index("test-import-batch-bools") + field := idx.Field("boolcol", OptFieldTypeBool()) + err := client.SyncSchema(schema) + if err != nil { + t.Fatalf("syncing schema: %v", err) + } + + b, err := NewBatch(client, 3, idx, []*Field{field}, OptUseShardTransactionalEndpoint(true)) + if err != nil { + t.Fatalf("getting batch: %v", err) + } + r := Row{Values: make([]interface{}, 1)} + + r.ID = uint64(0) + r.Values[0] = bool(false) + err = b.Add(r) + if err != nil { + t.Fatalf("adding after import: %v", err) + } + r.ID = uint64(1) + r.Values[0] = bool(true) + err = b.Add(r) + if err != nil { + t.Fatalf("adding second after import: %v", err) + } + + err = b.Import() + if err != nil { + t.Fatalf("second import: %v", err) + } + + resp, err := client.Query(idx.RawQuery("Count(All())")) + if err != nil { + t.Fatalf("querying: %v", err) + } + if res := resp.Results()[0]; res.Count() != 2 { + t.Fatalf("unexpected result: %+v", res) + } +} diff --git a/idk/ingest.go b/idk/ingest.go index f359f0c09..ccccb5aab 100644 --- a/idk/ingest.go +++ b/idk/ingest.go @@ -1531,6 +1531,9 @@ func (m *Main) batchFromSchema(schema []Field) ([]Recordizer, pilosaclient.Recor if hasMutex { //need to clear the mutex rec.Clears[valIdx] = nil //? maybe } + // else { //TODO(twg) set fields not supported + + // } default: rec.Values[valIdx], err = idkField.PilosafyVal(rawRec[i]) } @@ -1602,10 +1605,15 @@ func (m *Main) batchFromSchema(schema []Field) ([]Recordizer, pilosaclient.Recor fields = append(fields, m.index.Field(fld.DestName(), pilosaclient.OptFieldTypeBool())) valIdx := len(fields) - 1 recordizers = append(recordizers, func(rawRec []interface{}, rec *pilosaclient.Row) (err error) { - rec.Values[valIdx], err = idkField.PilosafyVal(rawRec[i]) + val, err := idkField.PilosafyVal(rawRec[i]) + if err != nil { + return errors.Wrapf(err, "booling '%v' of %[1]T", val) + } + if b, ok := val.(bool); ok { + rec.Values[valIdx] = b + } return errors.Wrapf(err, "converting field %d:%+v, val:%+v", i, idkField, rawRec[i]) }) - // TODO, unpacked bools aren't actually supported by importbatch } else { fields = append(fields, boolField, boolFieldExists) fieldIdx := len(fields) - 2 diff --git a/idk/ingest_test.go b/idk/ingest_test.go index ae9eb0005..fffdea486 100644 --- a/idk/ingest_test.go +++ b/idk/ingest_test.go @@ -20,6 +20,7 @@ import ( "github.com/featurebasedb/featurebase/v3/logger" "github.com/golang-jwt/jwt" "github.com/pkg/errors" + "github.com/stretchr/testify/assert" ) func configureTestFlags(main *Main) { @@ -269,6 +270,7 @@ func TestSingleBoolClear(t *testing.T) { ingester.Index = fmt.Sprintf("single_bool_clear%d", rand.Intn(100000)) ingester.BatchSize = 1 ingester.IDField = "id" + ingester.PackBools = "bools" if err := ingester.Run(); err != nil { t.Fatalf("%s: %v", idktest.ErrRunningIngest, err) @@ -300,6 +302,7 @@ func TestSingleBoolClear(t *testing.T) { ingester2.NewSource = func() (Source, error) { return ts2, nil } ingester2.Index = ingester.Index ingester2.IDField = "id" + ingester2.PackBools = "bools" if err := ingester2.Run(); err != nil { t.Fatalf("running ingester2: %v", err) @@ -566,6 +569,7 @@ func TestDelete(t *testing.T) { deleter := NewMain() configureTestFlags(deleter) deleter.Delete = true + deleter.PackBools = "bools" deleter.NewSource = func() (Source, error) { return tsDelete, nil } deleter.Index = indexName deleter.BatchSize = 5 @@ -579,6 +583,7 @@ func TestDelete(t *testing.T) { ingester := NewMain() configureTestFlags(ingester) + ingester.PackBools = "bools" ingester.NewSource = func() (Source, error) { return tsWrite, nil } ingester.PrimaryKeyFields = primaryKeyFields ingester.Index = indexName @@ -874,7 +879,6 @@ func TestBatchFromSchema(t *testing.T) { rawRec: []interface{}{true, uint64(7), false}, rowID: uint64(7), rowVals: []interface{}{true, false}, - err: "field type 'bool' is not currently supported through Batch", }, { name: "mutex field", @@ -1429,6 +1433,7 @@ func TestNilIngest(t *testing.T) { err string batchErr string rdzErrs []string + packBools string } runTest := func(t *testing.T, test testcase, removeIndex bool, server serverInfo, rawRec []interface{}, clearmap map[int]interface{}, values []interface{}) { m := NewMain() @@ -1437,6 +1442,7 @@ func TestNilIngest(t *testing.T) { m.PrimaryKeyFields = test.pkFields m.BatchSize = 2 m.Pprof = "" + m.PackBools = test.packBools m.NewSource = func() (Source, error) { return nil, nil } if server.AuthToken != "" { m.AuthToken = server.AuthToken @@ -1522,12 +1528,13 @@ func TestNilIngest(t *testing.T) { Vals2: []interface{}{nil, nil}, Vals3: []interface{}{nil, nil}, }, { - name: "bools null", - pkFields: []string{"user_id"}, - rawRec1: []interface{}{"1a", true}, // bool and bool-exists - rawRec2: []interface{}{"1a", DELETE_SENTINEL}, - rawRec3: []interface{}{"1a", nil}, - rowID: "1a", + name: "bools null", + packBools: "bools", + pkFields: []string{"user_id"}, + rawRec1: []interface{}{"1a", true}, // bool and bool-exists + rawRec2: []interface{}{"1a", DELETE_SENTINEL}, + rawRec3: []interface{}{"1a", nil}, + rowID: "1a", schema: []Field{ StringField{NameVal: "user_id"}, BoolField{NameVal: "bool_val_1"}, @@ -1587,3 +1594,114 @@ func TestNilIngest(t *testing.T) { } } + +func TestBoolIngest(t *testing.T) { + rand.Seed(time.Now().UTC().UnixNano()) + indexName := fmt.Sprintf("boolingest%d", rand.Intn(100000)) + primaryKeyFields := []string{"user_id"} + + tests := []struct { + src *testSource + expTrue []string + expFalse []string + expNull []string + }{ + { + src: newTestSource( + []Field{ + StringField{NameVal: "user_id"}, + BoolField{NameVal: "bool_val"}, + }, + [][]interface{}{ + {"a1", true}, + }, + ), + expTrue: []string{"a1"}, + expFalse: nil, + expNull: nil, + }, + { + src: newTestSource( + []Field{ + StringField{NameVal: "user_id"}, + BoolField{NameVal: "bool_val"}, + }, + [][]interface{}{ + {"a1", false}, + }, + ), + expTrue: nil, + expFalse: []string{"a1"}, + expNull: nil, + }, + { + src: newTestSource( + []Field{ + StringField{NameVal: "user_id"}, + BoolField{NameVal: "bool_val"}, + }, + [][]interface{}{ + {"a1", nil}, + }, + ), + expTrue: nil, + expFalse: nil, + expNull: []string{"a1"}, + }, + } + + var ing *Main + defer func() { + ing := ing + if err := ing.PilosaClient().DeleteIndexByName(ing.Index); err != nil { + t.Logf("%s for index %s: %v", idktest.ErrDeletingIndex, ing.Index, err) + } + }() + + for i, test := range tests { + t.Run(fmt.Sprintf("test-%d", i), func(t *testing.T) { + ingester := NewMain() + configureTestFlags(ingester) + ingester.PackBools = "" + ingester.NewSource = func() (Source, error) { return test.src, nil } + ingester.PrimaryKeyFields = primaryKeyFields + ingester.Index = indexName + ingester.BatchSize = 1 + ingester.UseShardTransactionalEndpoint = true + + // Set ing so the defer can do cleanup. + if i == 0 { + ing = ingester + } + + if err := ingester.Run(); err != nil { + t.Fatalf("%s: %v", idktest.ErrRunningIngest, err) + } + + client := ingester.PilosaClient() + idx := ingester.index + fld := ingester.index.Field("bool_val") + + // Check true. + { + resp, err := client.Query(fld.Row(true)) + assert.NoError(t, err) + assert.Equal(t, test.expTrue, resp.Result().Row().Keys) + } + + // Check false. + { + resp, err := client.Query(fld.Row(false)) + assert.NoError(t, err) + assert.Equal(t, test.expFalse, resp.Result().Row().Keys) + } + + // Check null. + { + resp, err := client.Query(idx.Difference(idx.All(), idx.Union(fld.Row(true), fld.Row(false)))) + assert.NoError(t, err) + assert.Equal(t, test.expNull, resp.Result().Row().Keys) + } + }) + } +} diff --git a/idk/interfaces.go b/idk/interfaces.go index 82b4b6c46..c1454cfa4 100644 --- a/idk/interfaces.go +++ b/idk/interfaces.go @@ -1131,11 +1131,16 @@ func toBool(val interface{}) (bool, error) { } return vt != 0, nil case string: - switch strings.ToLower(vt) { + vt = strings.ToLower(vt) + vt = strings.TrimSpace(vt) + switch vt { case "", "0", "f", "false": return false, nil + case "1", "t", "true": + return true, nil } - return true, nil + return false, errors.Errorf("couldn't convert %v of %[1]T to bool", vt) + default: if vint, err := toInt64(val); err == nil { return vint != 0, nil diff --git a/idk/interfaces_test.go b/idk/interfaces_test.go index 069cc54ae..b7ab73362 100644 --- a/idk/interfaces_test.go +++ b/idk/interfaces_test.go @@ -15,6 +15,29 @@ func TestDecimalFieldPilosafy(t *testing.T) { } +func TestBoolFieldPilosafy(t *testing.T) { + f := BoolField{NameVal: "boolcol"} + validTrue := []interface{}{true, 1, "t", "true", " T ", " True"} + validFalse := []interface{}{false, 0, "f", "false", " F ", " False"} + invalid := []interface{}{"boat", " test "} + + for i, v := range validTrue { + if ret, err := f.PilosafyVal(v); err != nil || ret != true { + t.Errorf("test: %d, got: %v of %[1]T, err: %v", i, ret, err) + } + } + for i, v := range validFalse { + if ret, err := f.PilosafyVal(v); err != nil || ret != false { + t.Errorf("test: %d, got: %v of %[1]T, err: %v", i, ret, err) + } + } + for i, v := range invalid { + if ret, err := f.PilosafyVal(v); err == nil { + t.Errorf("test: %d, got: %v of %[1]T, err: %v", i, ret, err) + } + } +} + func TestPilosafyVal(t *testing.T) { tests := []struct { field Field diff --git a/idk/kafka/cmd_delete_test.go b/idk/kafka/cmd_delete_test.go index 7ca359f34..f2512addf 100644 --- a/idk/kafka/cmd_delete_test.go +++ b/idk/kafka/cmd_delete_test.go @@ -56,6 +56,7 @@ func TestDeleteConsumerCompoundStringKey(t *testing.T) { m.Index = fmt.Sprintf("cmd_del_comp_indexij%s", topic) m.PrimaryKeyFields = []string{"abc", "db", "user_id"} m.Topics = []string{topic} + m.PackBools = "bools" defer func() { // TODO: for some reason (which I didn't dig into), From 731693a65a39394df79eebe788af8f62bd478c7e Mon Sep 17 00:00:00 2001 From: Pranitha-malae <56414132+Pranitha-malae@users.noreply.github.com> Date: Thu, 20 Oct 2022 16:51:21 -0500 Subject: [PATCH 05/10] resolving bool null field ingestion error (#2254) * resolving bool null field ingestion error * testing issues * adding null support for bools * updating the null bool field ingestion * trying to resolve issue when ingesting null value for bool type * adding a clearing support for bool type * resolving issues with bool null value ingestion * updating the jwt go package version and removing changes made in docker compose file * reverting jwt go version * removing v4 of jwt * adding a comment in test file to see if sonar cloud accepts this file --- client/batch.go | 1 - idk/ingest.go | 27 +++++++++++++++++++++------ idk/ingest_test.go | 16 +++++++++++++++- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/client/batch.go b/client/batch.go index 71b0ea171..1827aad2a 100644 --- a/client/batch.go +++ b/client/batch.go @@ -669,7 +669,6 @@ func (b *Batch) Add(rec Row) error { } b.rowIDs[i][len(b.rowIDs[i])-1] = clearSentinel } - default: return errors.Errorf("Clearing a value '%v' Type %[1]T is not currently supported (field '%s')", val, field.Name()) } diff --git a/idk/ingest.go b/idk/ingest.go index ccccb5aab..4d1faf65a 100644 --- a/idk/ingest.go +++ b/idk/ingest.go @@ -1539,6 +1539,16 @@ func (m *Main) batchFromSchema(schema []Field) ([]Recordizer, pilosaclient.Recor } return errors.Wrapf(err, "converting field %d:%+v, val:%+v", i, idkField, rawRec[i]) }) + case BoolField: + recordizers = append(recordizers, func(rawRec []interface{}, rec *pilosaclient.Row) (err error) { + switch rawRec[i].(type) { + case DeleteSentinel: + rec.Values[valIdx] = nil + default: + rec.Values[valIdx], err = idkField.PilosafyVal(rawRec[i]) + } + return errors.Wrapf(err, "converting field %d:%+v, val:%+v", i, idkField, rawRec[i]) + }) default: recordizers = append(recordizers, func(rawRec []interface{}, rec *pilosaclient.Row) (err error) { rec.Values[valIdx], err = idkField.PilosafyVal(rawRec[i]) @@ -1605,12 +1615,17 @@ func (m *Main) batchFromSchema(schema []Field) ([]Recordizer, pilosaclient.Recor fields = append(fields, m.index.Field(fld.DestName(), pilosaclient.OptFieldTypeBool())) valIdx := len(fields) - 1 recordizers = append(recordizers, func(rawRec []interface{}, rec *pilosaclient.Row) (err error) { - val, err := idkField.PilosafyVal(rawRec[i]) - if err != nil { - return errors.Wrapf(err, "booling '%v' of %[1]T", val) - } - if b, ok := val.(bool); ok { - rec.Values[valIdx] = b + switch rawRec[i].(type) { + case DeleteSentinel: + rec.Values[valIdx] = nil + default: + val, err := idkField.PilosafyVal(rawRec[i]) + if err != nil { + return errors.Wrapf(err, "booling '%v' of %[1]T", val) + } + if b, ok := val.(bool); ok { + rec.Values[valIdx] = b + } } return errors.Wrapf(err, "converting field %d:%+v, val:%+v", i, idkField, rawRec[i]) }) diff --git a/idk/ingest_test.go b/idk/ingest_test.go index fffdea486..8a7aa1f79 100644 --- a/idk/ingest_test.go +++ b/idk/ingest_test.go @@ -1648,6 +1648,20 @@ func TestBoolIngest(t *testing.T) { expFalse: nil, expNull: []string{"a1"}, }, + { + src: newTestSource( + []Field{ + StringField{NameVal: "user_id"}, + BoolField{NameVal: "bool_val"}, + }, + [][]interface{}{ + {"a1", DELETE_SENTINEL}, + }, + ), + expTrue: nil, + expFalse: nil, + expNull: []string{"a1"}, + }, } var ing *Main @@ -1696,7 +1710,7 @@ func TestBoolIngest(t *testing.T) { assert.Equal(t, test.expFalse, resp.Result().Row().Keys) } - // Check null. + // Check nil. This is used to test the ingestion of nil and null. { resp, err := client.Query(idx.Difference(idx.All(), idx.Union(fld.Row(true), fld.Row(false)))) assert.NoError(t, err) From 7e39f0634d7e684ae5274b45edb43968d29107cc Mon Sep 17 00:00:00 2001 From: Seebs Date: Tue, 25 Oct 2022 13:12:18 -0500 Subject: [PATCH 06/10] don't obtain stack traces on rbf.Tx creation We thought stack traces were mildly expensive. We were very wrong. Due to a complicated issue in the Go runtime, simultaneous requests for stack traces end up contending on a lock even when they're not actually contending on any resources. I've filed a ticket in the Go issue tracker for this: https://github.com/golang/go/issues/56400 In the mean time: Under some workloads, we were seeing 85% of all CPU time go into the stack backtraces, of which 81% went into the contention on those locks. But even if you take away the contention, that leaves us with 4/19 of all CPU time in our code going into building those stack backtraces. That's a lot of overhead for a feature we virtually never use. We might consider adding a backtrace functionality here, possibly using `runtime.Callers` which is much lower overhead, and allows us to generate a backtrace on demand (no argument values available, but then, we never read those because they're unformatted hex values), but I don't think it's actually very informative to know what the stack traces were of the Tx; they don't necessarily reflect the current state of any ongoing use of the Tx, so we can't necessarily correlate them to goroutine stack dumps, and so on. --- rbf/db.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/rbf/db.go b/rbf/db.go index ed374deb3..bd4b633d3 100644 --- a/rbf/db.go +++ b/rbf/db.go @@ -7,7 +7,6 @@ import ( "io" "os" "path/filepath" - "runtime/debug" "sort" "sync" "syscall" @@ -669,7 +668,6 @@ func (db *DB) Begin(writable bool) (_ *Tx, err error) { pageMap: db.pageMap, walPageN: db.walPageN, writable: writable, - stack: debug.Stack(), // DEBUG DeleteEmptyContainer: true, } From 334d17af76d7d4cbf9fcb117ab635d02a8a671d9 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula <85502298+pokeeffe-molecula@users.noreply.github.com> Date: Wed, 26 Oct 2022 11:23:40 -0500 Subject: [PATCH 07/10] fb-1729 Enriched Table Metadata (#2255) enriched metadata for tables added support for the concept of a table and field owners in metadata; mechanism to derive owner from http request metadata; metadata for table description --- Makefile | 8 +- api.go | 27 +- api_test.go | 4 +- cluster.go | 5 +- dbshard_internal_test.go | 4 +- disco/disco.go | 26 +- encoding/proto/proto.go | 6 + etcd/embed.go | 35 +- executor.go | 2 +- executor_internal_test.go | 10 +- executor_test.go | 196 +-- field.go | 2 + field_test.go | 20 +- fragment_internal_test.go | 6 +- go.mod | 2 +- holder.go | 33 +- holder_internal_test.go | 4 +- holder_test.go | 26 +- http_handler.go | 81 +- http_translator_test.go | 2 +- index.go | 57 +- index_internal_test.go | 2 +- index_test.go | 20 +- internal_client_test.go | 10 +- pb/private.pb.go | 370 ++-- pb/private.proto | 3 + pb/public.pb.go | 2 + proto/pilosa.pb.go | 2327 ++++++++++++++++--------- proto/pilosa.proto | 7 +- server.go | 1 + server/handler_test.go | 90 +- sql3/planner/executionplanner_test.go | 110 +- sql3/planner/opcreatetable.go | 1 + test/holder.go | 16 +- test/index.go | 10 +- 35 files changed, 2239 insertions(+), 1286 deletions(-) diff --git a/Makefile b/Makefile index 305cd549f..112791f83 100644 --- a/Makefile +++ b/Makefile @@ -205,12 +205,8 @@ generate-pql: require-peg generate-proto-grpc: require-protoc require-protoc-gen-go protoc -I proto proto/pilosa.proto --go_out=plugins=grpc:proto - protoc -I proto proto/vdsm/vdsm.proto --go_out=plugins=grpc:proto - # TODO: Modify above commands and remove the below mv if possible. - # See https://go-review.googlesource.com/c/protobuf/+/219298/ for info on --go-opt - # I couldn't get it to work during development - Cody - cp -r proto/github.com/featurebasedb/featurebase/v3/proto/ proto/ - rm -rf proto/github.com +# address re-generation here only if we need to +# protoc -I proto proto/vdsm.proto --go_out=plugins=grpc:proto # `go generate` all needed packages generate: generate-protoc generate-statik generate-stringer generate-pql diff --git a/api.go b/api.go index dacd90ef9..57f40419a 100644 --- a/api.go +++ b/api.go @@ -224,14 +224,23 @@ func (api *API) CreateIndex(ctx context.Context, indexName string, options Index span, _ := tracing.StartSpanFromContext(ctx, "API.CreateIndex") defer span.Finish() + // get the requestUserID from the context -- assumes the http handler has populated this from + // authN/Z info + requestUserID, ok := ctx.Value(ContextRequestUserIdKey).(string) + if !ok { + requestUserID = "" + } + if err := api.validate(apiCreateIndex); err != nil { return nil, errors.Wrap(err, "validating api method") } // Populate the create index message. + ts := timestamp() cim := &CreateIndexMessage{ Index: indexName, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: options, } @@ -307,6 +316,13 @@ func (api *API) CreateField(ctx context.Context, indexName string, fieldName str return nil, errors.Wrap(err, "validating api method") } + // get the requestUserID from the context -- assumes the http handler has populated this from + // authN/Z info + requestUserID, ok := ctx.Value(ContextRequestUserIdKey).(string) + if !ok { + requestUserID = "" + } + // Apply and validate functional options. fo, err := newFieldOptions(opts...) if err != nil { @@ -324,11 +340,12 @@ func (api *API) CreateField(ctx context.Context, indexName string, fieldName str Index: indexName, Field: fieldName, CreatedAt: timestamp(), + Owner: requestUserID, Meta: fo, } // Create field. - field, err := index.CreateField(fieldName, opts...) + field, err := index.CreateField(fieldName, requestUserID, opts...) if err != nil { return nil, errors.Wrap(err, "creating field") } @@ -358,7 +375,11 @@ func (api *API) UpdateField(ctx context.Context, indexName, fieldName string, up return newNotFoundError(ErrIndexNotFound, indexName) } - cfm, err := index.UpdateField(ctx, fieldName, update) + // get the requestUserID from the context -- assumes the http handler has populated this from + // authN/Z info + requestUserID, _ := ctx.Value(ContextRequestUserIdKey).(string) + + cfm, err := index.UpdateField(ctx, fieldName, requestUserID, update) if err != nil { return errors.Wrap(err, "updating field") } diff --git a/api_test.go b/api_test.go index 632768e37..f6179a6fc 100644 --- a/api_test.go +++ b/api_test.go @@ -1388,11 +1388,11 @@ func TestVariousApiTranslateCalls(t *testing.T) { // this should never actually get used because we're testing for errors here r := strings.NewReader("") // test index - idx, err := api.Holder().CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := api.Holder().CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatalf("%v: could not create test index", err) } - if _, err = idx.CreateFieldIfNotExistsWithOptions("field", &pilosa.FieldOptions{Keys: false}); err != nil { + if _, err = idx.CreateFieldIfNotExistsWithOptions("field", "", &pilosa.FieldOptions{Keys: false}); err != nil { t.Fatalf("creating field: %v", err) } t.Run("translateIndexDbOnNilIndex", diff --git a/cluster.go b/cluster.go index 40193415a..2864b43b6 100644 --- a/cluster.go +++ b/cluster.go @@ -879,7 +879,9 @@ type CreateShardMessage struct { type CreateIndexMessage struct { Index string CreatedAt int64 - Meta IndexOptions + Owner string + + Meta IndexOptions } // DeleteIndexMessage is an internal message indicating index deletion. @@ -892,6 +894,7 @@ type CreateFieldMessage struct { Index string Field string CreatedAt int64 + Owner string Meta *FieldOptions } diff --git a/dbshard_internal_test.go b/dbshard_internal_test.go index 208b8fe0d..a481817c0 100644 --- a/dbshard_internal_test.go +++ b/dbshard_internal_test.go @@ -188,7 +188,7 @@ func makeSampleRoaringDir(t *testing.T, root, index, backend string, minBytes in } func helperCreateDBShard(h *Holder, index string, shard uint64) *Index { - idx, err := h.CreateIndexIfNotExists(index, IndexOptions{}) + idx, err := h.CreateIndexIfNotExists(index, "", IndexOptions{}) PanicOn(err) // TODO: It's not clear that this is actually doing anything. dbs, err := h.txf.dbPerShard.GetDBShard(index, shard, idx) @@ -253,7 +253,7 @@ func Test_DBPerShard_GetFieldView2Shards_map_from_RBF(t *testing.T) { index := "rick" field := "f" - idx, err := holder.CreateIndex(index, IndexOptions{}) + idx, err := holder.CreateIndex(index, "", IndexOptions{}) if err != nil { t.Fatalf("creating index: %v", err) } diff --git a/disco/disco.go b/disco/disco.go index 4921f43c1..88933f002 100644 --- a/disco/disco.go +++ b/disco/disco.go @@ -101,8 +101,8 @@ type Schemator interface { CreateIndex(ctx context.Context, name string, val []byte) error DeleteIndex(ctx context.Context, name string) error Field(ctx context.Context, index, field string) ([]byte, error) - CreateField(ctx context.Context, index, field string, val []byte) error - UpdateField(ctx context.Context, index, field string, val []byte) error + CreateField(ctx context.Context, index, field string, fieldVal []byte) error + UpdateField(ctx context.Context, index, field string, fieldVal []byte) error DeleteField(ctx context.Context, index, field string) error View(ctx context.Context, index, field, view string) (bool, error) CreateView(ctx context.Context, index, field, view string) error @@ -186,23 +186,27 @@ func (*nopSchemator) Index(ctx context.Context, name string) ([]byte, error) { r func (*nopSchemator) CreateIndex(ctx context.Context, name string, val []byte) error { return nil } // DeleteIndex is a no-op implementation of the Schemator DeleteIndex method. -func (*nopSchemator) DeleteIndex(ctx context.Context, name string) error { return nil } +func (*nopSchemator) DeleteIndex(ctx context.Context, name string) error { + return nil +} // Field is a no-op implementation of the Schemator Field method. func (*nopSchemator) Field(ctx context.Context, index, field string) ([]byte, error) { return nil, nil } // CreateField is a no-op implementation of the Schemator CreateField method. -func (*nopSchemator) CreateField(ctx context.Context, index, field string, val []byte) error { +func (*nopSchemator) CreateField(ctx context.Context, index, field string, fieldVal []byte) error { return nil } // UpdateField is a no-op implementation of the Schemator UpdateField method. -func (*nopSchemator) UpdateField(ctx context.Context, index, field string, val []byte) error { +func (*nopSchemator) UpdateField(ctx context.Context, index, field string, fieldVal []byte) error { return nil } // DeleteField is a no-op implementation of the Schemator DeleteField method. -func (*nopSchemator) DeleteField(ctx context.Context, index, field string) error { return nil } +func (*nopSchemator) DeleteField(ctx context.Context, index, field string) error { + return nil +} // View is a no-op implementation of the Schemator View method. func (*nopSchemator) View(ctx context.Context, index, field, view string) (bool, error) { @@ -296,7 +300,7 @@ func (s *inMemSchemator) Field(ctx context.Context, index, field string) ([]byte } // CreateField is an in-memory implementation of the Schemator CreateField method. -func (s *inMemSchemator) CreateField(ctx context.Context, index, field string, val []byte) error { +func (s *inMemSchemator) CreateField(ctx context.Context, index, field string, fieldVal []byte) error { s.mu.Lock() defer s.mu.Unlock() idx, ok := s.schema[index] @@ -307,17 +311,17 @@ func (s *inMemSchemator) CreateField(ctx context.Context, index, field string, v // The current logic in pilosa doesn't allow us to return ErrFieldExists // here, so for now we just update the Data value if the field already // exists. - fld.Data = val + fld.Data = fieldVal return nil } idx.Fields[field] = &Field{ - Data: val, + Data: fieldVal, Views: make(map[string]struct{}), } return nil } -func (s *inMemSchemator) UpdateField(ctx context.Context, index, field string, val []byte) error { +func (s *inMemSchemator) UpdateField(ctx context.Context, index, field string, fieldVal []byte) error { s.mu.Lock() defer s.mu.Unlock() idx, ok := s.schema[index] @@ -328,7 +332,7 @@ func (s *inMemSchemator) UpdateField(ctx context.Context, index, field string, v // The current logic in pilosa doesn't allow us to return ErrFieldExists // here, so for now we just update the Data value if the field already // exists. - fld.Data = val + fld.Data = fieldVal return nil } else { return ErrFieldDoesNotExist diff --git a/encoding/proto/proto.go b/encoding/proto/proto.go index dad34da40..37766d8ad 100644 --- a/encoding/proto/proto.go +++ b/encoding/proto/proto.go @@ -681,12 +681,14 @@ func (s Serializer) encodeCreateIndexMessage(m *pilosa.CreateIndexMessage) *pb.C return &pb.CreateIndexMessage{ Index: m.Index, CreatedAt: m.CreatedAt, + Owner: m.Owner, Meta: s.encodeIndexMeta(&m.Meta), } } func (s Serializer) encodeIndexMeta(m *pilosa.IndexOptions) *pb.IndexMeta { return &pb.IndexMeta{ + Description: m.Description, Keys: m.Keys, TrackExistence: m.TrackExistence, } @@ -703,6 +705,7 @@ func (s Serializer) encodeCreateFieldMessage(m *pilosa.CreateFieldMessage) *pb.C Index: m.Index, Field: m.Field, CreatedAt: m.CreatedAt, + Owner: m.Owner, Meta: s.encodeFieldOptions(m.Meta), } } @@ -1057,12 +1060,14 @@ func (s Serializer) decodeCreateShardMessage(pb *pb.CreateShardMessage, m *pilos func (s Serializer) decodeCreateIndexMessage(pb *pb.CreateIndexMessage, m *pilosa.CreateIndexMessage) { m.Index = pb.Index m.CreatedAt = pb.CreatedAt + m.Owner = pb.Owner m.Meta = pilosa.IndexOptions{} s.decodeIndexMeta(pb.Meta, &m.Meta) } func (s Serializer) decodeIndexMeta(pb *pb.IndexMeta, m *pilosa.IndexOptions) { if pb != nil { + m.Description = pb.Description m.Keys = pb.Keys m.TrackExistence = pb.TrackExistence } @@ -1076,6 +1081,7 @@ func (s Serializer) decodeCreateFieldMessage(pb *pb.CreateFieldMessage, m *pilos m.Index = pb.Index m.Field = pb.Field m.CreatedAt = pb.CreatedAt + m.Owner = pb.Owner m.Meta = &pilosa.FieldOptions{} s.decodeFieldOptions(pb.Meta, m.Meta) } diff --git a/etcd/embed.go b/etcd/embed.go index e681f8090..11162fd3b 100644 --- a/etcd/embed.go +++ b/etcd/embed.go @@ -869,19 +869,20 @@ func (e *Etcd) Field(ctx context.Context, indexName string, name string) ([]byte return e.getKeyBytes(ctx, key) } -func (e *Etcd) CreateField(ctx context.Context, indexName string, name string, val []byte) error { +func (e *Etcd) CreateField(ctx context.Context, indexName string, name string, fieldVal []byte) error { key := schemaPrefix + indexName + "/" + name // Set up Op to write field value as bytes. op := clientv3.OpPut(key, "") - op.WithValueBytes(val) + op.WithValueBytes(fieldVal) // Check for key existence, and execute Op within a transaction. var resp *clientv3.TxnResponse err := e.retryClient(func(cli *clientv3.Client) (err error) { resp, err = cli.Txn(ctx). - If(clientv3util.KeyMissing(key)). + If( + clientv3util.KeyMissing(key)). Then(op). Commit() return err @@ -897,19 +898,20 @@ func (e *Etcd) CreateField(ctx context.Context, indexName string, name string, v return nil } -func (e *Etcd) UpdateField(ctx context.Context, indexName string, name string, val []byte) error { +func (e *Etcd) UpdateField(ctx context.Context, indexName string, name string, fieldVal []byte) error { key := schemaPrefix + indexName + "/" + name // Set up Op to write field value as bytes. op := clientv3.OpPut(key, "") - op.WithValueBytes(val) + op.WithValueBytes(fieldVal) // Check for key existence, and execute Op within a transaction. var resp *clientv3.TxnResponse err := e.retryClient(func(cli *clientv3.Client) (err error) { resp, err = cli.Txn(ctx). - If(clientv3util.KeyExists(key)). + If( + clientv3util.KeyExists(key)). Then(op). Commit() return err @@ -924,20 +926,31 @@ func (e *Etcd) UpdateField(ctx context.Context, indexName string, name string, v return nil } -func (e *Etcd) DeleteField(ctx context.Context, indexname string, name string) (err error) { - key := schemaPrefix + indexname + "/" + name +func (e *Etcd) DeleteField(ctx context.Context, indexName string, name string) (err error) { + key := schemaPrefix + indexName + "/" + name + + var resp *clientv3.TxnResponse + // Deleting field and views in one transaction. err = e.retryClient(func(cli *clientv3.Client) (err error) { - _, err = cli.Txn(ctx). - If(clientv3.Compare(clientv3.Version(key), ">", -1)). + resp, err = cli.Txn(ctx). + If( + clientv3.Compare(clientv3.Version(key), ">", -1)). Then( clientv3.OpDelete(key+"/", clientv3.WithPrefix()), // deleting field views clientv3.OpDelete(key), // deleting field ).Commit() return err }) + if err != nil { + return errors.Wrap(err, "executing transaction") + } - return errors.Wrap(err, "DeleteField") + if !resp.Succeeded { + return errors.New("deleting field from etcd failed") + } + + return nil } func (e *Etcd) View(ctx context.Context, indexName, fieldName, name string) (bool, error) { diff --git a/executor.go b/executor.go index a5026b565..9ccb0ee0e 100644 --- a/executor.go +++ b/executor.go @@ -6547,7 +6547,7 @@ func (e *executor) collectCallKeys(dst *keyCollector, c *pql.Call, index string) if keyed { opts = append(opts, OptFieldKeys()) } - if _, err := idx.CreateField(field, opts...); err != nil { + if _, err := idx.CreateField(field, "", opts...); err != nil { // We wrap these because we want to indicate that it wasn't found, // but also the problem we encountered trying to create it. return newNotFoundError(errors.Wrap(err, "creating field"), field) diff --git a/executor_internal_test.go b/executor_internal_test.go index 9db7d253c..2d20d553e 100644 --- a/executor_internal_test.go +++ b/executor_internal_test.go @@ -47,7 +47,7 @@ func TestExecutor_TranslateRowsOnBool(t *testing.T) { Cluster: NewTestCluster(t, 1), } - idx, err := e.Holder.CreateIndex("i", IndexOptions{}) + idx, err := e.Holder.CreateIndex("i", "", IndexOptions{}) if err != nil { t.Fatalf("creating index: %v", err) } @@ -55,8 +55,8 @@ func TestExecutor_TranslateRowsOnBool(t *testing.T) { qcx := holder.Txf().NewWritableQcx() defer qcx.Abort() - fb, errb := idx.CreateField("b", OptFieldTypeBool()) - _, errbk := idx.CreateField("bk", OptFieldTypeBool(), OptFieldKeys()) + fb, errb := idx.CreateField("b", "", OptFieldTypeBool()) + _, errbk := idx.CreateField("bk", "", OptFieldTypeBool(), OptFieldKeys()) if errb != nil || errbk != nil { t.Fatalf("creating fields %v, %v", errb, errbk) } @@ -563,12 +563,12 @@ func TestDistinctTimestampUnion(t *testing.T) { func TestExecutor_DeleteRows(t *testing.T) { holder := newTestHolder(t) - idx, err := holder.CreateIndex("i", IndexOptions{TrackExistence: true}) + idx, err := holder.CreateIndex("i", "", IndexOptions{TrackExistence: true}) if err != nil { t.Fatalf("creating index: %v", err) } - f, err := idx.CreateField("f") + f, err := idx.CreateField("f", "") if err != nil { t.Fatalf("creating field: %v", err) } diff --git a/executor_test.go b/executor_test.go index a620dda11..34dc612d9 100644 --- a/executor_test.go +++ b/executor_test.go @@ -1155,11 +1155,11 @@ func runCallTest(c *test.Cluster, t *testing.T, writeQuery string, readQueries [ } hldr := c.GetHolder(0) - index, err := hldr.CreateIndex(indexName, *indexOptions) + index, err := hldr.CreateIndex(indexName, "", *indexOptions) if err != nil { t.Fatal(err) } - _, err = index.CreateField("f", fieldOption...) + _, err = index.CreateField("f", "", fieldOption...) if err != nil { t.Fatal(err) } @@ -1445,7 +1445,7 @@ func TestExecutor_Execute_Set(t *testing.T) { t.Fatal(err) } - if _, err := idx.CreateField("f"); err != nil { + if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) } @@ -1462,7 +1462,7 @@ func TestExecutor_Execute_Set(t *testing.T) { t.Run("ErrInvalidRowValueType", func(t *testing.T) { idx := hldr.MustCreateIndexIfNotExists(c.Idx("inokey"), pilosa.IndexOptions{}) - if _, err := idx.CreateField("f", pilosa.OptFieldKeys()); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } if _, err := cmd.API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx("inokey"), Query: `Set(2, f=1.2)`}); err == nil || !strings.Contains(err.Error(), "invalid value") { @@ -1488,7 +1488,7 @@ func TestExecutor_Execute_SetBool(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeBool()); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeBool()); err != nil { t.Fatal(err) } @@ -1534,7 +1534,7 @@ func TestExecutor_Execute_SetBool(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeBool()); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeBool()); err != nil { t.Fatal(err) } @@ -1560,7 +1560,7 @@ func TestExecutor_Execute_SetDecimal(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeDecimal(2)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeDecimal(2)); err != nil { t.Fatal(err) } @@ -1597,7 +1597,7 @@ func TestExecutor_Execute_SetDecimal(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeDecimal(2)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeDecimal(2)); err != nil { t.Fatal(err) } @@ -1631,9 +1631,9 @@ func TestExecutor_Execute_SetValue(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) - } else if _, err := index.CreateFieldIfNotExists("xxx"); err != nil { + } else if _, err := index.CreateFieldIfNotExists("xxx", ""); err != nil { t.Fatal(err) } @@ -1672,7 +1672,7 @@ func TestExecutor_Execute_SetValue(t *testing.T) { hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } @@ -1702,9 +1702,9 @@ func TestExecutor_Execute_SetValue(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, pilosa.TimeUnitSeconds)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, pilosa.TimeUnitSeconds)); err != nil { t.Fatal(err) - } else if _, err := index.CreateFieldIfNotExists("xxx"); err != nil { + } else if _, err := index.CreateFieldIfNotExists("xxx", ""); err != nil { t.Fatal(err) } @@ -1841,11 +1841,11 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Set columns for rows 0, 10, & 20 across two shards. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f"); err != nil { + } else if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("other"); err != nil { + } else if _, err := idx.CreateField("other", ""); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set(0, f=0) @@ -1885,11 +1885,11 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Set columns for rows 0, 10, & 20 across two shards. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{Keys: true}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{Keys: true}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f"); err != nil { + } else if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("other"); err != nil { + } else if _, err := idx.CreateField("other", ""); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set("zero", f=0) @@ -1929,11 +1929,11 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Set columns for rows 0, 10, & 20 across two shards. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{Keys: true}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{Keys: true}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f", pilosa.OptFieldKeys()); err != nil { + } else if _, err := idx.CreateField("f", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("other", pilosa.OptFieldKeys()); err != nil { + } else if _, err := idx.CreateField("other", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set("zero", f="zero") @@ -1975,11 +1975,11 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Set columns for rows 0, 10, & 20 across two shards. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{Keys: true}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{Keys: true}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f", pilosa.OptFieldKeys()); err != nil { + } else if _, err := idx.CreateField("f", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("other", pilosa.OptFieldKeys()); err != nil { + } else if _, err := idx.CreateField("other", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set("a", f="foo") @@ -2021,9 +2021,9 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Set data on the "f" field. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f"); err != nil { + } else if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set(0, f=0) @@ -2046,9 +2046,9 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Create BSI "f" field. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(0, 100)); err != nil { + } else if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(0, 100)); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: `TopN(f, n=2)`}); err == nil || !strings.Contains(err.Error(), `finding top results: mapping on primary node: cannot compute TopN() on integer, decimal, or timestamp field: "f"`) { t.Fatalf("unexpected error: %v", err) @@ -2060,9 +2060,9 @@ func TestExecutor_Execute_TopN(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f", pilosa.OptFieldTypeSet(pilosa.CacheTypeNone, 0)); err != nil { + } else if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeSet(pilosa.CacheTypeNone, 0)); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set(0, f=0) @@ -2187,7 +2187,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } @@ -2205,7 +2205,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { for i, test := range tests { fld := fmt.Sprintf("f%d", i) t.Run("MinMaxField_"+fld, func(t *testing.T) { - if _, err := idx.CreateField(fld, pilosa.OptFieldTypeInt(test.min, test.max)); err != nil { + if _, err := idx.CreateField(fld, "", pilosa.OptFieldTypeInt(test.min, test.max)); err != nil { t.Fatal(err) } @@ -2279,7 +2279,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } @@ -2323,7 +2323,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { // This extra field exists to make there be shards which are present, // but have no decimal values set, to make sure they don't break // the results. - if _, err := idx.CreateFieldIfNotExists("z"); err != nil { + if _, err := idx.CreateFieldIfNotExists("z", ""); err != nil { t.Fatal(err) } if res, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: `Set(1, z=0)`}); err != nil { @@ -2355,7 +2355,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { for i, test := range tests { fld := fmt.Sprintf("f%d", i) t.Run("MinMaxField_"+fld, func(t *testing.T) { - if _, err := idx.CreateField(fld, pilosa.OptFieldTypeDecimal(test.scale, test.min, test.max)); err != nil { + if _, err := idx.CreateField(fld, "", pilosa.OptFieldTypeDecimal(test.scale, test.min, test.max)); err != nil { t.Fatal(err) } @@ -2411,7 +2411,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } @@ -2428,7 +2428,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { for i, test := range tests { fld := fmt.Sprintf("f%d", i) t.Run("MinMaxField_"+fld, func(t *testing.T) { - if _, err := idx.CreateField(fld, pilosa.OptFieldTypeTimestamp(test.epoch, pilosa.TimeUnitSeconds)); err != nil { + if _, err := idx.CreateField(fld, "", pilosa.OptFieldTypeTimestamp(test.epoch, pilosa.TimeUnitSeconds)); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: fmt.Sprintf(`Set(10, %s="%s")`, fld, test.set.Format(time.RFC3339))}); err != nil { t.Fatal(err) @@ -2499,16 +2499,16 @@ func TestExecutor_Execute_MinMax(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("x"); err != nil { + if _, err := idx.CreateField("x", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { t.Fatal(err) } @@ -2563,16 +2563,16 @@ func TestExecutor_Execute_MinMax(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{Keys: true}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{Keys: true}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("x"); err != nil { + if _, err := idx.CreateField("x", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(-1110, 1000)); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(-1110, 1000)); err != nil { t.Fatal(err) } @@ -2656,12 +2656,12 @@ func TestExecutor_Execute_MinMaxRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f"); err != nil { + if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) } @@ -2720,12 +2720,12 @@ func TestExecutor_Execute_MinMaxRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldKeys()); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } @@ -2776,28 +2776,28 @@ func TestExecutor_Execute_Sum(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("x"); err != nil { + if _, err := idx.CreateField("x", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { + if _, err := idx.CreateField("foo", "", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("other", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("dec", pilosa.OptFieldTypeDecimal(3)); err != nil { + if _, err := idx.CreateField("dec", "", pilosa.OptFieldTypeDecimal(3)); err != nil { t.Fatal(err) } @@ -2910,24 +2910,24 @@ func TestExecutor_Execute_Sum(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{Keys: true}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{Keys: true}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("x"); err != nil { + if _, err := idx.CreateField("x", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { + if _, err := idx.CreateField("foo", "", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("other", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } @@ -2970,7 +2970,7 @@ func TestExecutor_DecimalArgs(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } @@ -2984,7 +2984,7 @@ func TestExecutor_DecimalArgs(t *testing.T) { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldTypeDecimal(2, min, max)); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeDecimal(2, min, max)); err != nil { t.Fatal(err) } @@ -3001,28 +3001,28 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f"); err != nil { + if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { + if _, err := idx.CreateField("foo", "", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("other", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("edge", pilosa.OptFieldTypeInt(-900, 1000)); err != nil { + if _, err := idx.CreateField("edge", "", pilosa.OptFieldTypeInt(-900, 1000)); err != nil { t.Fatal(err) } @@ -3214,13 +3214,13 @@ func TestExecutor_Execute_Row_BSIGroupEdge(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } t.Run("LT", func(t *testing.T) { - if _, err := idx.CreateField("f1", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { + if _, err := idx.CreateField("f1", "", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { t.Fatal(err) } @@ -3241,7 +3241,7 @@ func TestExecutor_Execute_Row_BSIGroupEdge(t *testing.T) { }) t.Run("GT", func(t *testing.T) { - if _, err := idx.CreateField("f2", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { + if _, err := idx.CreateField("f2", "", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { t.Fatal(err) } @@ -3262,7 +3262,7 @@ func TestExecutor_Execute_Row_BSIGroupEdge(t *testing.T) { }) t.Run("BTWN_LT_LT", func(t *testing.T) { - if _, err := idx.CreateField("f3", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { + if _, err := idx.CreateField("f3", "", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { t.Fatal(err) } @@ -3301,28 +3301,28 @@ func TestExecutor_Execute_Range_BSIGroup_Deprecated(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f"); err != nil { + if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { + if _, err := idx.CreateField("foo", "", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("other", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("edge", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { + if _, err := idx.CreateField("edge", "", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { t.Fatal(err) } @@ -3849,7 +3849,7 @@ func TestExecutor_Time_Clear_Quantums(t *testing.T) { indexName := c.Idx(strings.ToLower(string(tt.quantum))) index := hldr.MustCreateIndexIfNotExists(indexName, pilosa.IndexOptions{}) // Create field. - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeTime(tt.quantum, "0")); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeTime(tt.quantum, "0")); err != nil { t.Fatal(err) } // Populate @@ -3933,7 +3933,7 @@ func TestExecutor_Execute_Existence(t *testing.T) { hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4335,7 +4335,7 @@ func TestExecutor_Execute_All(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - fld, err := index.CreateField("f") + fld, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4427,7 +4427,7 @@ func TestExecutor_Execute_All(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true, Keys: true}) - fld, err := index.CreateField("f") + fld, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4492,7 +4492,7 @@ func TestExecutor_Execute_All(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4520,7 +4520,7 @@ func TestExecutor_Execute_ClearRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + _, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } @@ -4536,7 +4536,7 @@ func TestExecutor_Execute_ClearRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4616,10 +4616,10 @@ func TestExecutor_Execute_SetRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - if _, err := index.CreateField("f"); err != nil { + if _, err := index.CreateField("f", ""); err != nil { t.Fatal(err) } - if _, err := index.CreateField("tmp"); err != nil { + if _, err := index.CreateField("tmp", ""); err != nil { t.Fatal(err) } @@ -4671,7 +4671,7 @@ func TestExecutor_Execute_SetRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) idx := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := idx.CreateField("f") + _, err := idx.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4724,7 +4724,7 @@ func TestExecutor_Execute_SetRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4765,7 +4765,7 @@ func TestExecutor_Execute_SetRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - if _, err := index.CreateField("f", pilosa.OptFieldKeys()); err != nil { + if _, err := index.CreateField("f", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } @@ -4829,7 +4829,7 @@ func benchmarkExistence(nn bool, b *testing.B) { index := hldr.MustCreateIndexIfNotExists(indexName, pilosa.IndexOptions{TrackExistence: nn}) // Create field. - if _, err := index.CreateFieldIfNotExists(fieldName); err != nil { + if _, err := index.CreateFieldIfNotExists(fieldName, ""); err != nil { b.Fatal(err) } @@ -6630,7 +6630,7 @@ func TestExecutor_Execute_IncludesColumn(t *testing.T) { cmd := c.GetNode(0) hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{Keys: true}) - if _, err := index.CreateField("general", pilosa.OptFieldKeys()); err != nil { + if _, err := index.CreateField("general", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } @@ -6696,20 +6696,20 @@ func TestExecutor_Execute_MinMaxCountEqual(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("x"); err != nil { + if _, err := idx.CreateField("x", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("dec", pilosa.OptFieldTypeDecimal(3)); err != nil { + if _, err := idx.CreateField("dec", "", pilosa.OptFieldTypeDecimal(3)); err != nil { t.Fatal(err) } @@ -6869,7 +6869,7 @@ func TestExecutor_Execute_NoIndex(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), *indexOptions) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal("should work") } @@ -9684,11 +9684,11 @@ func TestExecutorTimeRange(t *testing.T) { } indexName := c.Idx(t.Name()) hldr := c.GetHolder(0) - index, err := hldr.CreateIndex(indexName, pilosa.IndexOptions{}) + index, err := hldr.CreateIndex(indexName, "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - _, err = index.CreateField("f") + _, err = index.CreateField("f", "") if err != nil { t.Fatal(err) } diff --git a/field.go b/field.go index 1037cf877..34e22ae95 100644 --- a/field.go +++ b/field.go @@ -73,6 +73,7 @@ var availableShardFileFlushDuration = &protected{ type Field struct { mu sync.RWMutex createdAt int64 + owner string path string index string name string @@ -1972,6 +1973,7 @@ func (p fieldSlice) Less(i, j int) bool { return p[i].Name() < p[j].Name() } type FieldInfo struct { Name string `json:"name"` CreatedAt int64 `json:"createdAt,omitempty"` + Owner string `json:"owner"` Options FieldOptions `json:"options"` Cardinality *uint64 `json:"cardinality,omitempty"` Views []*ViewInfo `json:"views,omitempty"` diff --git a/field_test.go b/field_test.go index 4e26d4902..e972e483a 100644 --- a/field_test.go +++ b/field_test.go @@ -22,7 +22,7 @@ func TestField_SetValue(t *testing.T) { t.Run("OK", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } @@ -63,7 +63,7 @@ func TestField_SetValue(t *testing.T) { t.Run("Overwrite", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } @@ -98,7 +98,7 @@ func TestField_SetValue(t *testing.T) { t.Run("ErrBSIGroupNotFound", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f") + f, err := idx.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -115,7 +115,7 @@ func TestField_SetValue(t *testing.T) { t.Run("ErrBSIGroupValueTooLow", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(20, 30)) + f, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(20, 30)) if err != nil { t.Fatal(err) } @@ -130,7 +130,7 @@ func TestField_SetValue(t *testing.T) { t.Run("ErrBSIGroupValueTooHigh", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(20, 30)) + f, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(20, 30)) if err != nil { t.Fatal(err) } @@ -170,13 +170,13 @@ func TestField_NameValidation(t *testing.T) { _, idx := test.MustOpenIndex(t) for _, name := range validFieldNames { - _, err := idx.CreateField(name) + _, err := idx.CreateField(name, "") if err != nil { t.Fatalf("unexpected field name: %s %s", name, err) } } for _, name := range invalidFieldNames { - _, err := idx.CreateField(name) + _, err := idx.CreateField(name, "") if err == nil { t.Fatalf("expected error on field name: %s", name) } @@ -189,7 +189,7 @@ const includeRemote = false // for calls to Index.AvailableShards(localOnly bool func TestField_AvailableShards(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("fld-shards") + f, err := idx.CreateField("fld-shards", "") if err != nil { t.Fatal(err) } @@ -230,7 +230,7 @@ func TestField_ClearValue(t *testing.T) { t.Run("OK", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } @@ -291,7 +291,7 @@ func TestFieldInfoMarshal(t *testing.T) { if err != nil { t.Fatalf("unexpected error marshalling index info, %v", err) } - expected := []byte(`{"name":"timestamp","createdAt":1649270079233541000,"options":{"type":"timestamp","epoch":"1970-01-01T00:00:00Z","bitDepth":0,"min":-4294967296,"max":4294967296,"timeUnit":"s"}}`) + expected := []byte(`{"name":"timestamp","createdAt":1649270079233541000,"owner":"","options":{"type":"timestamp","epoch":"1970-01-01T00:00:00Z","bitDepth":0,"min":-4294967296,"max":4294967296,"timeUnit":"s"}}`) if !bytes.Equal(a, expected) { t.Fatalf("expected %s, got %s", expected, a) } diff --git a/fragment_internal_test.go b/fragment_internal_test.go index fa053bbb6..e39cfc0dc 100644 --- a/fragment_internal_test.go +++ b/fragment_internal_test.go @@ -1331,7 +1331,7 @@ func TestFragment_TopN_CacheSize(t *testing.T) { index := mustOpenIndex(t, IndexOptions{}) // Create field. - field, err := index.CreateFieldIfNotExists("f", OptFieldTypeSet(CacheTypeRanked, cacheSize)) + field, err := index.CreateFieldIfNotExists("f", "", OptFieldTypeSet(CacheTypeRanked, cacheSize)) if err != nil { t.Fatal(err) } @@ -3087,11 +3087,11 @@ func newTestField(tb testing.TB, fieldOpts ...FieldOption) (*Holder, *Index, *Fi fieldOpts = []FieldOption{OptFieldTypeDefault()} } h := newTestHolder(tb) - idx, err := h.CreateIndex("i", IndexOptions{}) + idx, err := h.CreateIndex("i", "", IndexOptions{}) if err != nil { tb.Fatalf("creating test index: %v", err) } - fld, err := idx.CreateField("f", fieldOpts...) + fld, err := idx.CreateField("f", "", fieldOpts...) if err != nil { tb.Fatalf("creating test field: %v", err) } diff --git a/go.mod b/go.mod index a82844842..dc38dafbb 100644 --- a/go.mod +++ b/go.mod @@ -82,6 +82,7 @@ require ( github.com/jaffee/commandeer v0.5.0 github.com/linkedin/goavro/v2 v2.11.1 google.golang.org/grpc v1.46.0 + google.golang.org/protobuf v1.28.0 ) require ( @@ -166,7 +167,6 @@ require ( golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20220503193339-ba3ae3f07e29 // indirect - google.golang.org/protobuf v1.28.0 // indirect gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/holder.go b/holder.go index c9993b081..78009e104 100644 --- a/holder.go +++ b/holder.go @@ -436,14 +436,17 @@ func (h *Holder) Open() error { return errors.Wrap(err, "opening index") } - // Since we don't have createdAt stored on disk within the data + // Since we don't have createdAt and the other metadata stored on disk within the data // directory, we need to populate it from the etcd schema data. + // TODO: we may no longer need the createdAt value stored in memory on // the index struct; it may only be needed in the schema return value // from the API, which already comes from etcd. In that case, this logic // could be removed, and the createdAt on the index struct could be // removed. index.createdAt = cim.CreatedAt + index.owner = cim.Owner + index.description = cim.Meta.Description err = index.OpenWithSchema(idx) if err != nil { @@ -678,10 +681,13 @@ func (h *Holder) schema(ctx context.Context, includeViews bool) ([]*IndexInfo, e di := &IndexInfo{ Name: cim.Index, CreatedAt: cim.CreatedAt, + Owner: cim.Owner, Options: cim.Meta, ShardWidth: ShardWidth, Fields: make([]*FieldInfo, 0, len(index.Fields)), } + updatedAt := cim.CreatedAt + lastUpdateUser := cim.Owner for fieldName, field := range index.Fields { if fieldName == existenceFieldName { continue @@ -690,9 +696,14 @@ func (h *Holder) schema(ctx context.Context, includeViews bool) ([]*IndexInfo, e if err != nil { return nil, errors.Wrap(err, "decoding CreateFieldMessage") } + if cfm.CreatedAt > updatedAt { + updatedAt = cfm.CreatedAt + lastUpdateUser = cfm.Owner + } fi := &FieldInfo{ Name: cfm.Field, CreatedAt: cfm.CreatedAt, + Owner: cfm.Owner, Options: *cfm.Meta, } if includeViews { @@ -703,6 +714,8 @@ func (h *Holder) schema(ctx context.Context, includeViews bool) ([]*IndexInfo, e } di.Fields = append(di.Fields, fi) } + di.UpdatedAt = updatedAt + di.LastUpdateUser = lastUpdateUser sort.Sort(fieldInfoSlice(di.Fields)) a = append(a, di) } @@ -716,14 +729,14 @@ func (h *Holder) applySchema(schema *Schema) error { // We use h.CreateIndex() instead of h.CreateIndexIfNotExists() because we // want to limit the use of this method for now to only new indexes. for _, i := range schema.Indexes { - idx, err := h.CreateIndex(i.Name, i.Options) + idx, err := h.CreateIndex(i.Name, i.Owner, i.Options) if err != nil { return errors.Wrap(err, "creating index") } // Create fields that don't exist. for _, f := range i.Fields { - fld, err := idx.CreateFieldIfNotExistsWithOptions(f.Name, &f.Options) + fld, err := idx.CreateFieldIfNotExistsWithOptions(f.Name, "", &f.Options) if err != nil { return errors.Wrap(err, "creating field") } @@ -775,7 +788,7 @@ func (h *Holder) Indexes() []*Index { // CreateIndex creates an index. // An error is returned if the index already exists. -func (h *Holder) CreateIndex(name string, opt IndexOptions) (*Index, error) { +func (h *Holder) CreateIndex(name string, requestUserID string, opt IndexOptions) (*Index, error) { h.mu.Lock() defer h.mu.Unlock() @@ -784,9 +797,11 @@ func (h *Holder) CreateIndex(name string, opt IndexOptions) (*Index, error) { return nil, newConflictError(ErrIndexExists) } + ts := timestamp() cim := &CreateIndexMessage{ Index: name, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: opt, } @@ -874,13 +889,15 @@ func (h *Holder) CreateIndexAndBroadcast(ctx context.Context, cim *CreateIndexMe // CreateIndexIfNotExists returns an index by name. // The index is created if it does not already exist. -func (h *Holder) CreateIndexIfNotExists(name string, opt IndexOptions) (*Index, error) { +func (h *Holder) CreateIndexIfNotExists(name string, requestUserID string, opt IndexOptions) (*Index, error) { h.mu.Lock() defer h.mu.Unlock() + ts := timestamp() cim := &CreateIndexMessage{ Index: name, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: opt, } @@ -931,6 +948,8 @@ func (h *Holder) createIndex(cim *CreateIndexMessage, broadcast bool) (*Index, e index.keys = cim.Meta.Keys index.trackExistence = cim.Meta.TrackExistence index.createdAt = cim.CreatedAt + index.owner = cim.Owner + index.description = cim.Meta.Description if err = index.Open(); err != nil { return nil, errors.Wrap(err, "opening") diff --git a/holder_internal_test.go b/holder_internal_test.go index e9faa3a12..314bffe61 100644 --- a/holder_internal_test.go +++ b/holder_internal_test.go @@ -7,11 +7,11 @@ import ( ) func setupTest(t *testing.T, h *Holder, rowCol []rowCols, indexName string) (*Index, *Field) { - idx, err := h.CreateIndexIfNotExists(indexName, IndexOptions{TrackExistence: true}) + idx, err := h.CreateIndexIfNotExists(indexName, "", IndexOptions{TrackExistence: true}) if err != nil { t.Fatalf("failed to create index %v: %v", indexName, err) } - f, err := idx.CreateFieldIfNotExists("f") + f, err := idx.CreateFieldIfNotExists("f", "") if err != nil { t.Fatalf("failed to create field in index %v: %v", indexName, err) } diff --git a/holder_test.go b/holder_test.go index ead88e2c8..0e99958ae 100644 --- a/holder_test.go +++ b/holder_test.go @@ -32,7 +32,7 @@ func TestHolder_Open(t *testing.T) { // no automatic close here, because we manually close this, and then // *fail* to reopen it. - if _, err := h.CreateIndex("test", pilosa.IndexOptions{}); err != nil { + if _, err := h.CreateIndex("test", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) } else if err := h.Close(); err != nil { t.Fatal(err) @@ -51,10 +51,10 @@ func TestHolder_Open(t *testing.T) { t.Run("ErrForeignIndexNotFound", func(t *testing.T) { h := test.MustOpenHolder(t) - if idx, err := h.CreateIndex("foo", pilosa.IndexOptions{}); err != nil { + if idx, err := h.CreateIndex("foo", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) } else { - _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("nonexistent")) + _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("nonexistent")) if err == nil { t.Fatalf("expected error: %s", pilosa.ErrForeignIndexNotFound) } else if errors.Cause(err) != pilosa.ErrForeignIndexNotFound { @@ -67,11 +67,11 @@ func TestHolder_Open(t *testing.T) { t.Run("ForeignIndexNotOpenYet", func(t *testing.T) { h := test.MustOpenHolder(t) - if _, err := h.CreateIndex("zzz", pilosa.IndexOptions{}); err != nil { + if _, err := h.CreateIndex("zzz", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if idx, err := h.CreateIndex("foo", pilosa.IndexOptions{}); err != nil { + } else if idx, err := h.CreateIndex("foo", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("zzz")); err != nil { + } else if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("zzz")); err != nil { t.Fatal(err) } else if err := h.Holder.Close(); err != nil { t.Fatal(err) @@ -86,11 +86,11 @@ func TestHolder_Open(t *testing.T) { t.Run("ForeignIndexIsOpen", func(t *testing.T) { h := test.MustOpenHolder(t) - if _, err := h.CreateIndex("aaa", pilosa.IndexOptions{}); err != nil { + if _, err := h.CreateIndex("aaa", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if idx, err := h.CreateIndex("foo", pilosa.IndexOptions{}); err != nil { + } else if idx, err := h.CreateIndex("foo", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("aaa")); err != nil { + } else if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("aaa")); err != nil { t.Fatal(err) } else if err := h.Holder.Close(); err != nil { t.Fatal(err) @@ -105,18 +105,18 @@ func TestHolder_Open(t *testing.T) { t.Run("CreateIndexIfNotExists", func(t *testing.T) { h := test.MustOpenHolder(t) - idx1, err := h.CreateIndexIfNotExists("aaa", pilosa.IndexOptions{}) + idx1, err := h.CreateIndexIfNotExists("aaa", "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err = h.CreateIndex("aaa", pilosa.IndexOptions{}); err == nil { + if _, err = h.CreateIndex("aaa", "", pilosa.IndexOptions{}); err == nil { t.Fatalf("expected: ConflictError, got: nil") } else if _, ok := err.(pilosa.ConflictError); !ok { t.Fatalf("expected: ConflictError, got: %s", err) } - idx2, err := h.CreateIndexIfNotExists("aaa", pilosa.IndexOptions{}) + idx2, err := h.CreateIndexIfNotExists("aaa", "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } @@ -136,7 +136,7 @@ func TestHolder_HasData(t *testing.T) { t.Fatal("expected HasData to return false, no err, but", ok, err) } - if _, err := h.CreateIndex("test", pilosa.IndexOptions{}); err != nil { + if _, err := h.CreateIndex("test", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) } diff --git a/http_handler.go b/http_handler.go index 95e85f71e..b5261d9e8 100644 --- a/http_handler.go +++ b/http_handler.go @@ -49,6 +49,18 @@ import ( "github.com/zeebo/blake3" ) +type ContextRequestUserIdKeyType string + +const ( + // ContextRequestUserIdKey is request userid key for a request ctx + ContextRequestUserIdKey = ContextRequestUserIdKeyType("request-user-id") +) + +const ( + // HeaderRequestUserID is request userid header + HeaderRequestUserID = "X-Request-Userid" +) + // Handler represents an HTTP handler. type Handler struct { Handler http.Handler @@ -692,34 +704,52 @@ func (h *Handler) chkAllowedNetworks(r *http.Request) (bool, context.Context) { func (h *Handler) chkAuthN(handler http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { ctx := r.Context() - if h.auth != nil { - // if IP is in allowed networks, then serve the request - allowedNetwork, ctx := h.chkAllowedNetworks(r) - if allowedNetwork { - handler.ServeHTTP(w, r.WithContext(ctx)) - return - } - access, refresh := getTokens(r) - uinfo, err := h.auth.Authenticate(access, refresh) - if err != nil { - http.Error(w, errors.Wrap(err, "authenticating").Error(), http.StatusUnauthorized) - return - } - // just in case it got refreshed - ctx = context.WithValue(ctx, authn.ContextValueAccessToken, "Bearer "+access) - ctx = context.WithValue(ctx, authn.ContextValueRefreshToken, refresh) - h.auth.SetCookie(w, uinfo.Token, uinfo.RefreshToken, uinfo.Expiry) + //if the request is unauthenticated and we have the appropriate header get the userid from the header + requestUserID := r.Header.Get(HeaderRequestUserID) + ctx = context.WithValue(ctx, ContextRequestUserIdKey, requestUserID) + + if h.auth == nil { + handler.ServeHTTP(w, r.WithContext(ctx)) + return + } + + // if IP is in allowed networks, then serve the request + allowedNetwork, ctx := h.chkAllowedNetworks(r) + if allowedNetwork { + handler.ServeHTTP(w, r.WithContext(ctx)) + return } + + access, refresh := getTokens(r) + uinfo, err := h.auth.Authenticate(access, refresh) + if err != nil { + http.Error(w, errors.Wrap(err, "authenticating").Error(), http.StatusUnauthorized) + return + } + // prefer the user id from an authenticated request over one in a header + ctx = context.WithValue(ctx, ContextRequestUserIdKey, uinfo.UserID) + + // just in case it got refreshed + ctx = context.WithValue(ctx, authn.ContextValueAccessToken, "Bearer "+access) + ctx = context.WithValue(ctx, authn.ContextValueRefreshToken, refresh) + h.auth.SetCookie(w, uinfo.Token, uinfo.RefreshToken, uinfo.Expiry) + handler.ServeHTTP(w, r.WithContext(ctx)) } } func (h *Handler) chkAuthZ(handler http.HandlerFunc, perm authz.Permission) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - // if auth isn't turned on, just serve the request + ctx := r.Context() + + //if the request is unauthenticated and we have the appropriate header get the userid from the header + requestUserID := r.Header.Get(HeaderRequestUserID) + ctx = context.WithValue(ctx, ContextRequestUserIdKey, requestUserID) + + // handle the case when auth is not turned on if h.auth == nil { - handler.ServeHTTP(w, r) + handler.ServeHTTP(w, r.WithContext(ctx)) return } @@ -738,16 +768,22 @@ func (h *Handler) chkAuthZ(handler http.HandlerFunc, perm authz.Permission) http access, refresh := getTokens(r) uinfo, err := h.auth.Authenticate(access, refresh) - if err != nil { http.Error(w, errors.Wrap(err, "authenticating").Error(), http.StatusForbidden) return } + + // prefer the user id from an authenticated request over one in a header + ctx = context.WithValue(ctx, ContextRequestUserIdKey, uinfo.UserID) + + ctx = context.WithValue(ctx, authn.ContextValueAccessToken, "Bearer "+access) + ctx = context.WithValue(ctx, authn.ContextValueRefreshToken, refresh) + // just in case it got refreshed h.auth.SetCookie(w, uinfo.Token, uinfo.RefreshToken, uinfo.Expiry) // put the user's authN/Z info in the context - ctx = context.WithValue(r.Context(), contextKeyGroupMembership, uinfo.Groups) + ctx = context.WithValue(ctx, contextKeyGroupMembership, uinfo.Groups) ctx = context.WithValue(ctx, authn.ContextValueAccessToken, "Bearer "+uinfo.Token) ctx = context.WithValue(ctx, authn.ContextValueRefreshToken, uinfo.RefreshToken) // unlikely h.permissions will be nil, but we'll check to be safe @@ -825,7 +861,6 @@ func (h *Handler) chkAuthZ(handler http.HandlerFunc, perm authz.Permission) http } } handler.ServeHTTP(w, r.WithContext(ctx)) - } } @@ -1700,6 +1735,7 @@ func (p *postIndexRequest) UnmarshalJSON(b []byte) error { // Unmarshal expected values. _p := _postIndexRequest{ Options: IndexOptions{ + Description: "", Keys: false, TrackExistence: true, }, @@ -1785,6 +1821,7 @@ func (h *Handler) handlePostIndex(w http.ResponseWriter, r *http.Request) { // Decode request. req := postIndexRequest{ Options: IndexOptions{ + Description: "", Keys: false, TrackExistence: true, }, diff --git a/http_translator_test.go b/http_translator_test.go index 739bedef9..1b17d4dd4 100644 --- a/http_translator_test.go +++ b/http_translator_test.go @@ -26,7 +26,7 @@ func TestTranslateStore_EntryReader(t *testing.T) { hldr := test.Holder{Holder: primary.Server.Holder()} index := hldr.MustCreateIndexIfNotExists("i", pilosa.IndexOptions{Keys: true}) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } diff --git a/index.go b/index.go index 557983ec0..be377d6c5 100644 --- a/index.go +++ b/index.go @@ -24,8 +24,11 @@ import ( // Index represents a container for fields. type Index struct { - mu sync.RWMutex - createdAt int64 + mu sync.RWMutex + createdAt int64 + owner string + description string + path string name string qualifiedName string @@ -148,6 +151,7 @@ func (i *Index) Options() IndexOptions { func (i *Index) options() IndexOptions { return IndexOptions{ + Description: i.description, Keys: i.keys, TrackExistence: i.trackExistence, } @@ -348,6 +352,7 @@ func (i *Index) openExistenceField() error { cfm := &CreateFieldMessage{ Index: i.name, Field: existenceFieldName, + Owner: "", CreatedAt: 0, Meta: &FieldOptions{Type: FieldTypeSet, CacheType: CacheTypeNone, CacheSize: 0}, } @@ -524,7 +529,7 @@ func (i *Index) recalculateCaches() { } // CreateField creates a field. -func (i *Index) CreateField(name string, opts ...FieldOption) (*Field, error) { +func (i *Index) CreateField(name string, requestUserID string, opts ...FieldOption) (*Field, error) { err := ValidateName(name) if err != nil { return nil, errors.Wrap(err, "validating name") @@ -553,10 +558,12 @@ func (i *Index) CreateField(name string, opts ...FieldOption) (*Field, error) { return nil, errors.Wrap(err, "applying option") } + ts := timestamp() cfm := &CreateFieldMessage{ Index: i.name, Field: name, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: fo, } @@ -585,7 +592,7 @@ func (i *Index) CreateField(name string, opts ...FieldOption) (*Field, error) { } // CreateFieldIfNotExists creates a field with the given options if it doesn't exist. -func (i *Index) CreateFieldIfNotExists(name string, opts ...FieldOption) (*Field, error) { +func (i *Index) CreateFieldIfNotExists(name string, requestUserID string, opts ...FieldOption) (*Field, error) { err := ValidateName(name) if err != nil { return nil, errors.Wrap(err, "validating name") @@ -605,10 +612,12 @@ func (i *Index) CreateFieldIfNotExists(name string, opts ...FieldOption) (*Field return nil, errors.Wrap(err, "applying option") } + ts := timestamp() cfm := &CreateFieldMessage{ Index: i.name, Field: name, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: fo, } @@ -629,7 +638,7 @@ func (i *Index) CreateFieldIfNotExists(name string, opts ...FieldOption) (*Field // function options, taking a *FieldOptions struct. TODO: This should // definintely be refactored so we don't have these virtually equivalent // methods, but I'm puttin this here for now just to see if it works. -func (i *Index) CreateFieldIfNotExistsWithOptions(name string, opt *FieldOptions) (*Field, error) { +func (i *Index) CreateFieldIfNotExistsWithOptions(name string, requestUserID string, opt *FieldOptions) (*Field, error) { err := ValidateName(name) if err != nil { return nil, errors.Wrap(err, "validating name") @@ -680,10 +689,12 @@ func (i *Index) CreateFieldIfNotExistsWithOptions(name string, opt *FieldOptions } } + ts := timestamp() cfm := &CreateFieldMessage{ Index: i.name, Field: name, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: opt, } @@ -712,7 +723,7 @@ func (i *Index) persistField(ctx context.Context, cfm *CreateFieldMessage) error } if b, err := i.serializer.Marshal(cfm); err != nil { - return errors.Wrap(err, "marshaling") + return errors.Wrap(err, "marshaling field") } else if err := i.holder.Schemator.CreateField(ctx, cfm.Index, cfm.Field, b); errors.Cause(err) == disco.ErrFieldExists { return ErrFieldExists } else if err != nil { @@ -729,7 +740,7 @@ func (i *Index) persistUpdateField(ctx context.Context, cfm *CreateFieldMessage) } if b, err := i.serializer.Marshal(cfm); err != nil { - return errors.Wrap(err, "marshaling") + return errors.Wrap(err, "marshaling field") } else if err := i.holder.Schemator.UpdateField(ctx, cfm.Index, cfm.Field, b); errors.Cause(err) == disco.ErrFieldDoesNotExist { return ErrFieldNotFound } else if err != nil { @@ -738,7 +749,7 @@ func (i *Index) persistUpdateField(ctx context.Context, cfm *CreateFieldMessage) return nil } -func (i *Index) UpdateField(ctx context.Context, name string, update FieldUpdate) (*CreateFieldMessage, error) { +func (i *Index) UpdateField(ctx context.Context, name string, requestUserID string, update FieldUpdate) (*CreateFieldMessage, error) { // Get field from etcd buf, err := i.holder.Schemator.Field(ctx, i.name, name) if err != nil { @@ -783,6 +794,9 @@ func (i *Index) UpdateField(ctx context.Context, name string, update FieldUpdate return nil, errors.Wrap(err, "persisting updated field") } + i.mu.Lock() + defer i.mu.Unlock() + return cfm, nil } @@ -843,6 +857,7 @@ func (i *Index) createField(cfm *CreateFieldMessage) (*Field, error) { return nil, errors.Wrap(err, "initializing") } f.createdAt = cfm.CreatedAt + f.owner = cfm.Owner // Pass holder through to the field for use in looking // up a foreign index. @@ -928,11 +943,14 @@ func (p indexSlice) Less(i, j int) bool { return p[i].Name() < p[j].Name() } // IndexInfo represents schema information for an index. type IndexInfo struct { - Name string `json:"name"` - CreatedAt int64 `json:"createdAt,omitempty"` - Options IndexOptions `json:"options"` - Fields []*FieldInfo `json:"fields"` - ShardWidth uint64 `json:"shardWidth"` + Name string `json:"name"` + CreatedAt int64 `json:"createdAt,omitempty"` + UpdatedAt int64 `json:"updatedAt"` + Owner string `json:"owner"` + LastUpdateUser string `json:"lastUpdatedUser"` + Options IndexOptions `json:"options"` + Fields []*FieldInfo `json:"fields"` + ShardWidth uint64 `json:"shardWidth"` } // Field returns the FieldInfo the provided field name. If the field does not @@ -954,9 +972,10 @@ func (p indexInfoSlice) Less(i, j int) bool { return p[i].Name < p[j].Name } // IndexOptions represents options to set when initializing an index. type IndexOptions struct { - Keys bool `json:"keys"` - TrackExistence bool `json:"trackExistence"` - PartitionN int `json:"partitionN"` + Keys bool `json:"keys"` + TrackExistence bool `json:"trackExistence"` + PartitionN int `json:"partitionN"` + Description string `json:"description"` } type importData struct { diff --git a/index_internal_test.go b/index_internal_test.go index e275069cf..4919b1793 100644 --- a/index_internal_test.go +++ b/index_internal_test.go @@ -9,7 +9,7 @@ import ( // mustOpenIndex returns a new, opened index at a temporary path. Panic on error. func mustOpenIndex(tb testing.TB, opt IndexOptions) *Index { h := newTestHolder(tb) - index, err := h.CreateIndex("i", opt) + index, err := h.CreateIndex("i", "", opt) if err != nil { panic(err) diff --git a/index_test.go b/index_test.go index b291165e6..15addd338 100644 --- a/index_test.go +++ b/index_test.go @@ -26,7 +26,7 @@ func TestIndex_CreateFieldIfNotExists(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field. - f, err := index.CreateFieldIfNotExists("f") + f, err := index.CreateFieldIfNotExists("f", "") if err != nil { t.Fatal(err) } else if f == nil { @@ -34,7 +34,7 @@ func TestIndex_CreateFieldIfNotExists(t *testing.T) { } // Retrieve existing field. - other, err := index.CreateFieldIfNotExists("f") + other, err := index.CreateFieldIfNotExists("f", "") if err != nil { t.Fatal(err) } else if f.Field != other.Field { @@ -53,7 +53,7 @@ func TestIndex_CreateField(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field with explicit quantum. - f, err := index.CreateField("f", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0")) + f, err := index.CreateField("f", "", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0")) if err != nil { t.Fatal(err) } else if q := f.TimeQuantum(); q != pilosa.TimeQuantum("YMDH") { @@ -68,7 +68,7 @@ func TestIndex_CreateField(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field with explicit quantum with no standard view - f, err := index.CreateField("f", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0", true)) + f, err := index.CreateField("f", "", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0", true)) if err != nil { t.Fatal(err) } else if q := f.TimeQuantum(); q != pilosa.TimeQuantum("YMDH") { @@ -83,7 +83,7 @@ func TestIndex_CreateField(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field with schema and verify it exists. - if f, err := index.CreateField("f", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { + if f, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } else if !reflect.DeepEqual(f.Type(), pilosa.FieldTypeInt) { t.Fatalf("unexpected type: %#v", f.Type()) @@ -101,7 +101,7 @@ func TestIndex_CreateField(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field with schema and verify it exists. - if f, err := index.CreateField("f", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, pilosa.TimeUnitSeconds)); err != nil { + if f, err := index.CreateField("f", "", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, pilosa.TimeUnitSeconds)); err != nil { t.Fatal(err) } else if !reflect.DeepEqual(f.Type(), pilosa.FieldTypeTimestamp) { t.Fatalf("unexpected type: %#v", f.Type()) @@ -193,7 +193,7 @@ func TestIndex_CreateField(t *testing.T) { t.Run("IntField", func(t *testing.T) { _, index := test.MustOpenIndex(t) - _, err := index.CreateField("f", pilosa.OptFieldTypeInt(-1, 1), pilosa.OptFieldKeys()) + _, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(-1, 1), pilosa.OptFieldKeys()) if errors.Cause(err) != pilosa.ErrIntFieldWithKeys { t.Fatal("int field cannot be created with keys=true") } @@ -203,7 +203,7 @@ func TestIndex_CreateField(t *testing.T) { t.Run("DecimalField", func(t *testing.T) { _, index := test.MustOpenIndex(t) - _, err := index.CreateField("f", pilosa.OptFieldTypeDecimal(1, pql.NewDecimal(-1, 0), pql.NewDecimal(1, 0)), pilosa.OptFieldKeys()) + _, err := index.CreateField("f", "", pilosa.OptFieldTypeDecimal(1, pql.NewDecimal(-1, 0), pql.NewDecimal(1, 0)), pilosa.OptFieldKeys()) if errors.Cause(err) != pilosa.ErrDecimalFieldWithKeys { t.Fatal("decimal field cannot be created with keys=true") } @@ -216,7 +216,7 @@ func TestIndex_DeleteField(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field. - if _, err := index.CreateFieldIfNotExists("f"); err != nil { + if _, err := index.CreateFieldIfNotExists("f", ""); err != nil { t.Fatal(err) } @@ -263,7 +263,7 @@ func TestIndex_RecreateFieldOnRestart(t *testing.T) { // create index indexName := fmt.Sprintf("idx_%d", rand.Uint64()) holder := c.GetHolder(0) - _, err := holder.CreateIndex(indexName, pilosa.IndexOptions{ + _, err := holder.CreateIndex(indexName, "", pilosa.IndexOptions{ Keys: false, }) if err != nil { diff --git a/internal_client_test.go b/internal_client_test.go index 445a6d3fb..dc61b1881 100644 --- a/internal_client_test.go +++ b/internal_client_test.go @@ -854,7 +854,7 @@ func TestClient_ImportKeys(t *testing.T) { // Load bitmap into cache to ensure cache gets updated. index := hldr.MustCreateIndexIfNotExists(cluster.Idx(), pilosa.IndexOptions{Keys: true}) - _, err := index.CreateFieldIfNotExists(fldName, pilosa.OptFieldTypeInt(-100, 100)) + _, err := index.CreateFieldIfNotExists(fldName, "", pilosa.OptFieldTypeInt(-100, 100)) if err != nil { t.Fatal(err) } @@ -933,7 +933,7 @@ func TestClient_ImportIDs(t *testing.T) { // Load bitmap into cache to ensure cache gets updated. index := hldr.MustCreateIndexIfNotExists(idxName, pilosa.IndexOptions{Keys: false}) - _, err := index.CreateFieldIfNotExists(fldName, pilosa.OptFieldTypeInt(-10000, 10000)) + _, err := index.CreateFieldIfNotExists(fldName, "", pilosa.OptFieldTypeInt(-10000, 10000)) if err != nil { t.Fatal(err) } @@ -1001,7 +1001,7 @@ func TestClient_ImportValue(t *testing.T) { // Load bitmap into cache to ensure cache gets updated. index := hldr.MustCreateIndexIfNotExists(cluster.Idx(), pilosa.IndexOptions{}) - _, err := index.CreateFieldIfNotExists(fldName, pilosa.OptFieldTypeInt(-100, 100)) + _, err := index.CreateFieldIfNotExists(fldName, "", pilosa.OptFieldTypeInt(-100, 100)) if err != nil { t.Fatal(err) } @@ -1112,7 +1112,7 @@ func TestClient_ImportExistence(t *testing.T) { fldName := "fset" index := hldr.MustCreateIndexIfNotExists(idxName, pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateFieldIfNotExists(fldName) + _, err := index.CreateFieldIfNotExists(fldName, "") if err != nil { t.Fatal(err) } @@ -1148,7 +1148,7 @@ func TestClient_ImportExistence(t *testing.T) { fldName := "fint" index := hldr.MustCreateIndexIfNotExists(idxName, pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateFieldIfNotExists(fldName, pilosa.OptFieldTypeInt(-100, 100)) + _, err := index.CreateFieldIfNotExists(fldName, "", pilosa.OptFieldTypeInt(-100, 100)) if err != nil { t.Fatal(err) } diff --git a/pb/private.pb.go b/pb/private.pb.go index 1a19dab20..79f87afae 100644 --- a/pb/private.pb.go +++ b/pb/private.pb.go @@ -25,6 +25,7 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type IndexMeta struct { Keys bool `protobuf:"varint,3,opt,name=Keys,proto3" json:"Keys,omitempty"` TrackExistence bool `protobuf:"varint,4,opt,name=TrackExistence,proto3" json:"TrackExistence,omitempty"` + Description string `protobuf:"bytes,5,opt,name=Description,proto3" json:"Description,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -77,6 +78,13 @@ func (m *IndexMeta) GetTrackExistence() bool { return false } +func (m *IndexMeta) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + type FieldOptions struct { Type string `protobuf:"bytes,8,opt,name=Type,proto3" json:"Type,omitempty"` CacheType string `protobuf:"bytes,3,opt,name=CacheType,proto3" json:"CacheType,omitempty"` @@ -633,6 +641,7 @@ type CreateIndexMessage struct { Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` Meta *IndexMeta `protobuf:"bytes,2,opt,name=Meta,proto3" json:"Meta,omitempty"` CreatedAt int64 `protobuf:"varint,3,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=Owner,proto3" json:"Owner,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -692,11 +701,19 @@ func (m *CreateIndexMessage) GetCreatedAt() int64 { return 0 } +func (m *CreateIndexMessage) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + type CreateFieldMessage struct { Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` Meta *FieldOptions `protobuf:"bytes,3,opt,name=Meta,proto3" json:"Meta,omitempty"` CreatedAt int64 `protobuf:"varint,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=Owner,proto3" json:"Owner,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -763,6 +780,13 @@ func (m *CreateFieldMessage) GetCreatedAt() int64 { return 0 } +func (m *CreateFieldMessage) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + type UpdateFieldMessage struct { CreateFieldMessage *CreateFieldMessage `protobuf:"bytes,1,opt,name=CreateFieldMessage,proto3" json:"CreateFieldMessage,omitempty"` Update *FieldUpdate `protobuf:"bytes,2,opt,name=Update,proto3" json:"Update,omitempty"` @@ -2879,114 +2903,115 @@ func init() { func init() { proto.RegisterFile("private.proto", fileDescriptor_d2a91b51c7bdc125) } var fileDescriptor_d2a91b51c7bdc125 = []byte{ - // 1701 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4b, 0x6f, 0x23, 0x4b, - 0x15, 0xa6, 0x1f, 0xf1, 0xe3, 0x38, 0xce, 0x38, 0x75, 0xc3, 0xd0, 0x93, 0x3b, 0x44, 0x9e, 0x02, - 0xcd, 0x98, 0x91, 0x08, 0x22, 0x77, 0x71, 0x11, 0x77, 0x73, 0x27, 0x76, 0x66, 0x30, 0xf7, 0xce, - 0xe3, 0x56, 0x1e, 0x4b, 0x50, 0xa5, 0x5d, 0x4a, 0x5a, 0x69, 0x77, 0x9b, 0xee, 0x76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, 0x00, 0x00, + // 1728 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4f, 0x6f, 0x23, 0x49, + 0x15, 0xa7, 0xff, 0xc4, 0x7f, 0x9e, 0xe3, 0x8c, 0x53, 0x1b, 0x86, 0x9e, 0xec, 0x10, 0x79, 0x0a, + 0x34, 0x63, 0x46, 0x22, 0x88, 0xec, 0x61, 0x11, 0x7b, 0xd9, 0x89, 0x9d, 0x59, 0xcc, 0xee, 0xcc, + 0x64, 0x2b, 0x7f, 0x8e, 0xa0, 0x4a, 0xbb, 0x94, 0xb4, 0xd2, 0xee, 0x36, 0xdd, 0xed, 0xc4, 0xde, + 0x03, 0x12, 0x48, 0x08, 0x2e, 0xdc, 0x11, 0x07, 0xbe, 0x05, 0x5f, 0x80, 0x13, 0x17, 0x24, 0x3e, + 0x02, 0x1a, 0xbe, 0x08, 0xaa, 0x57, 0x55, 0xdd, 0x65, 0xc7, 0x49, 0x86, 0x68, 0x6f, 0xfd, 0x7e, + 0xaf, 0xfa, 0xd5, 0xef, 0xfd, 0xa9, 0x57, 0xaf, 0x1b, 0xda, 0x93, 0x2c, 0xba, 0xe2, 0x85, 0xd8, + 0x9d, 0x64, 0x69, 0x91, 0x12, 0x77, 0x72, 0xb6, 0xbd, 0x3e, 0x99, 0x9e, 0xc5, 0x51, 0xa8, 0x10, + 0x1a, 0x41, 0x73, 0x98, 0x8c, 0xc4, 0xec, 0x8d, 0x28, 0x38, 0x21, 0xe0, 0x7f, 0x29, 0xe6, 0x79, + 0xe0, 0x75, 0x9d, 0x5e, 0x83, 0xe1, 0x33, 0x79, 0x0e, 0x1b, 0xc7, 0x19, 0x0f, 0x2f, 0x0f, 0x66, + 0x51, 0x5e, 0x88, 0x24, 0x14, 0x81, 0x8f, 0xda, 0x25, 0x94, 0x74, 0xa1, 0x35, 0x10, 0x79, 0x98, + 0x45, 0x93, 0x22, 0x4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x99, 0xda, 0x0a, 0x58, 0x9d, 0x5d, 0xb2, 0x03, 0x6b, 0x32, 0xe2, 0xea, 0x70, + 0xdb, 0x89, 0x50, 0xb0, 0x95, 0x09, 0xff, 0xb6, 0x4c, 0xd0, 0x53, 0x68, 0xec, 0x1f, 0x0d, 0xbf, + 0xc8, 0xd2, 0xe9, 0x64, 0xa5, 0xc7, 0x66, 0xac, 0x75, 0xad, 0xb1, 0xb6, 0xa3, 0x46, 0x34, 0xe5, + 0x15, 0x4e, 0x65, 0x1d, 0x35, 0x95, 0xf9, 0x1a, 0xe1, 0x33, 0x7a, 0x04, 0x9b, 0xca, 0x5d, 0xd9, + 0x71, 0x1e, 0xd2, 0x16, 0xcd, 0xdc, 0xe4, 0x55, 0x73, 0x93, 0x34, 0xaa, 0xba, 0xee, 0xb7, 0x69, + 0xf4, 0x5f, 0x2e, 0x6c, 0x32, 0x91, 0x47, 0xdf, 0x88, 0x61, 0x92, 0x17, 0xd9, 0x34, 0x34, 0x17, + 0xc7, 0x2f, 0xd3, 0x33, 0x9d, 0x0b, 0x8f, 0x29, 0xe1, 0xee, 0x53, 0x42, 0x28, 0xd4, 0xed, 0x26, + 0x60, 0x2f, 0x30, 0x0a, 0xf2, 0x12, 0xea, 0x47, 0xe9, 0x34, 0x0b, 0xcb, 0xca, 0xc7, 0xce, 0xad, + 0xf6, 0x57, 0x0a, 0x66, 0x16, 0x90, 0x2f, 0x81, 0x1c, 0x67, 0x3c, 0xc9, 0x63, 0x2e, 0x29, 0x99, + 0xd7, 0x1a, 0xd5, 0x40, 0x66, 0x69, 0x17, 0x2c, 0xac, 0x78, 0x8d, 0xec, 0xda, 0x47, 0x38, 0xa8, + 0x23, 0xbf, 0x0d, 0xc3, 0x4f, 0x9f, 0x13, 0xfb, 0x90, 0x7f, 0xba, 0x54, 0xa1, 0x41, 0x0d, 0x5f, + 0xd9, 0xc4, 0xcb, 0xdc, 0x56, 0xb0, 0xc5, 0x75, 0xf4, 0xf7, 0x0e, 0x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x18, 0x0e, 0x6e, 0x23, 0xca, 0xe4, 0x22, 0xfa, + 0x37, 0x47, 0x07, 0x55, 0x68, 0xbd, 0xf9, 0x7b, 0xf0, 0x89, 0x6d, 0xe4, 0x59, 0x69, 0x64, 0x69, + 0xd9, 0x6e, 0xe9, 0xa8, 0x5c, 0xbd, 0xfd, 0x35, 0x34, 0x56, 0xb9, 0xe7, 0x2b, 0xf7, 0x7e, 0xb2, + 0xe8, 0xde, 0x93, 0xdb, 0x98, 0xe5, 0x96, 0x97, 0xfb, 0x9d, 0x7f, 0xbe, 0xdf, 0x71, 0xfe, 0xfd, + 0x7e, 0xc7, 0xf9, 0xcf, 0xfb, 0x1d, 0xe7, 0x2f, 0xff, 0xdd, 0xf9, 0xce, 0x59, 0x0d, 0x7f, 0xa3, + 0x7d, 0xf2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa1, 0xcf, 0xef, 0xf0, 0x69, 0x13, 0x00, 0x00, } func (m *IndexMeta) Marshal() (dAtA []byte, err error) { @@ -3013,6 +3038,13 @@ func (m *IndexMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x2a + } if m.TrackExistence { i-- if m.TrackExistence { @@ -3537,6 +3569,13 @@ func (m *CreateIndexMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x2a + } if m.CreatedAt != 0 { i = encodeVarintPrivate(dAtA, i, uint64(m.CreatedAt)) i-- @@ -3588,6 +3627,13 @@ func (m *CreateFieldMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x2a + } if m.CreatedAt != 0 { i = encodeVarintPrivate(dAtA, i, uint64(m.CreatedAt)) i-- @@ -5435,6 +5481,10 @@ func (m *IndexMeta) Size() (n int) { if m.TrackExistence { n += 2 } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -5676,6 +5726,10 @@ func (m *CreateIndexMessage) Size() (n int) { if m.CreatedAt != 0 { n += 1 + sovPrivate(uint64(m.CreatedAt)) } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -5703,6 +5757,10 @@ func (m *CreateFieldMessage) Size() (n int) { if m.CreatedAt != 0 { n += 1 + sovPrivate(uint64(m.CreatedAt)) } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -6597,6 +6655,38 @@ func (m *IndexMeta) Unmarshal(dAtA []byte) error { } } m.TrackExistence = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPrivate(dAtA[iNdEx:]) @@ -8183,6 +8273,38 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPrivate(dAtA[iNdEx:]) @@ -8353,6 +8475,38 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPrivate(dAtA[iNdEx:]) diff --git a/pb/private.proto b/pb/private.proto index e830956ab..b278464b9 100644 --- a/pb/private.proto +++ b/pb/private.proto @@ -7,6 +7,7 @@ import "public.proto"; message IndexMeta { bool Keys = 3; bool TrackExistence = 4; + string Description = 5; } message FieldOptions { @@ -67,6 +68,7 @@ message CreateIndexMessage { string Index = 1; IndexMeta Meta = 2; int64 CreatedAt = 3; + string Owner = 5; } message CreateFieldMessage { @@ -74,6 +76,7 @@ message CreateFieldMessage { string Field = 2; FieldOptions Meta = 3; int64 CreatedAt = 4; + string Owner = 5; } message UpdateFieldMessage { diff --git a/pb/public.pb.go b/pb/public.pb.go index 835a68c83..6cf86878a 100644 --- a/pb/public.pb.go +++ b/pb/public.pb.go @@ -465,6 +465,7 @@ func (m *KeyList) GetKeys() []string { type ExtractedTableValue struct { // Types that are valid to be assigned to Value: + // // *ExtractedTableValue_IDs // *ExtractedTableValue_Keys // *ExtractedTableValue_BSIValue @@ -605,6 +606,7 @@ func (*ExtractedTableValue) XXX_OneofWrappers() []interface{} { type ExtractedTableColumn struct { // Types that are valid to be assigned to KeyOrID: + // // *ExtractedTableColumn_Key // *ExtractedTableColumn_ID KeyOrID isExtractedTableColumn_KeyOrID `protobuf_oneof:"KeyOrID"` diff --git a/proto/pilosa.pb.go b/proto/pilosa.pb.go index e28570b7d..290ed8cc2 100644 --- a/proto/pilosa.pb.go +++ b/proto/pilosa.pb.go @@ -1,376 +1,437 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1-devel +// protoc v3.21.8 // source: pilosa.proto package proto import ( context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type QueryPQLRequest struct { - Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` - Pql string `protobuf:"bytes,2,opt,name=pql,proto3" json:"pql,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *QueryPQLRequest) Reset() { *m = QueryPQLRequest{} } -func (m *QueryPQLRequest) String() string { return proto.CompactTextString(m) } -func (*QueryPQLRequest) ProtoMessage() {} -func (*QueryPQLRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{0} + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` + Pql string `protobuf:"bytes,2,opt,name=pql,proto3" json:"pql,omitempty"` } -func (m *QueryPQLRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryPQLRequest.Unmarshal(m, b) -} -func (m *QueryPQLRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryPQLRequest.Marshal(b, m, deterministic) -} -func (m *QueryPQLRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPQLRequest.Merge(m, src) +func (x *QueryPQLRequest) Reset() { + *x = QueryPQLRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *QueryPQLRequest) XXX_Size() int { - return xxx_messageInfo_QueryPQLRequest.Size(m) + +func (x *QueryPQLRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *QueryPQLRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPQLRequest.DiscardUnknown(m) + +func (*QueryPQLRequest) ProtoMessage() {} + +func (x *QueryPQLRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_QueryPQLRequest proto.InternalMessageInfo +// Deprecated: Use QueryPQLRequest.ProtoReflect.Descriptor instead. +func (*QueryPQLRequest) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{0} +} -func (m *QueryPQLRequest) GetIndex() string { - if m != nil { - return m.Index +func (x *QueryPQLRequest) GetIndex() string { + if x != nil { + return x.Index } return "" } -func (m *QueryPQLRequest) GetPql() string { - if m != nil { - return m.Pql +func (x *QueryPQLRequest) GetPql() string { + if x != nil { + return x.Pql } return "" } type QuerySQLRequest struct { - Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *QuerySQLRequest) Reset() { *m = QuerySQLRequest{} } -func (m *QuerySQLRequest) String() string { return proto.CompactTextString(m) } -func (*QuerySQLRequest) ProtoMessage() {} -func (*QuerySQLRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{1} + Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` } -func (m *QuerySQLRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QuerySQLRequest.Unmarshal(m, b) -} -func (m *QuerySQLRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QuerySQLRequest.Marshal(b, m, deterministic) -} -func (m *QuerySQLRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuerySQLRequest.Merge(m, src) +func (x *QuerySQLRequest) Reset() { + *x = QuerySQLRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *QuerySQLRequest) XXX_Size() int { - return xxx_messageInfo_QuerySQLRequest.Size(m) + +func (x *QuerySQLRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *QuerySQLRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QuerySQLRequest.DiscardUnknown(m) + +func (*QuerySQLRequest) ProtoMessage() {} + +func (x *QuerySQLRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_QuerySQLRequest proto.InternalMessageInfo +// Deprecated: Use QuerySQLRequest.ProtoReflect.Descriptor instead. +func (*QuerySQLRequest) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{1} +} -func (m *QuerySQLRequest) GetSql() string { - if m != nil { - return m.Sql +func (x *QuerySQLRequest) GetSql() string { + if x != nil { + return x.Sql } return "" } type StatusError struct { - Code uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StatusError) Reset() { *m = StatusError{} } -func (m *StatusError) String() string { return proto.CompactTextString(m) } -func (*StatusError) ProtoMessage() {} -func (*StatusError) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{2} + Code uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"` } -func (m *StatusError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StatusError.Unmarshal(m, b) -} -func (m *StatusError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StatusError.Marshal(b, m, deterministic) -} -func (m *StatusError) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusError.Merge(m, src) +func (x *StatusError) Reset() { + *x = StatusError{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StatusError) XXX_Size() int { - return xxx_messageInfo_StatusError.Size(m) + +func (x *StatusError) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StatusError) XXX_DiscardUnknown() { - xxx_messageInfo_StatusError.DiscardUnknown(m) + +func (*StatusError) ProtoMessage() {} + +func (x *StatusError) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StatusError proto.InternalMessageInfo +// Deprecated: Use StatusError.ProtoReflect.Descriptor instead. +func (*StatusError) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{2} +} -func (m *StatusError) GetCode() uint32 { - if m != nil { - return m.Code +func (x *StatusError) GetCode() uint32 { + if x != nil { + return x.Code } return 0 } -func (m *StatusError) GetMessage() string { - if m != nil { - return m.Message +func (x *StatusError) GetMessage() string { + if x != nil { + return x.Message } return "" } type RowResponse struct { - Headers []*ColumnInfo `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` - Columns []*ColumnResponse `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"` - StatusError *StatusError `protobuf:"bytes,3,opt,name=StatusError,proto3" json:"StatusError,omitempty"` - Duration int64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RowResponse) Reset() { *m = RowResponse{} } -func (m *RowResponse) String() string { return proto.CompactTextString(m) } -func (*RowResponse) ProtoMessage() {} -func (*RowResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{3} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RowResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RowResponse.Unmarshal(m, b) + Headers []*ColumnInfo `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` + Columns []*ColumnResponse `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"` + StatusError *StatusError `protobuf:"bytes,3,opt,name=StatusError,proto3" json:"StatusError,omitempty"` + Duration int64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` } -func (m *RowResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RowResponse.Marshal(b, m, deterministic) -} -func (m *RowResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RowResponse.Merge(m, src) + +func (x *RowResponse) Reset() { + *x = RowResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RowResponse) XXX_Size() int { - return xxx_messageInfo_RowResponse.Size(m) + +func (x *RowResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RowResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RowResponse.DiscardUnknown(m) + +func (*RowResponse) ProtoMessage() {} + +func (x *RowResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RowResponse proto.InternalMessageInfo +// Deprecated: Use RowResponse.ProtoReflect.Descriptor instead. +func (*RowResponse) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{3} +} -func (m *RowResponse) GetHeaders() []*ColumnInfo { - if m != nil { - return m.Headers +func (x *RowResponse) GetHeaders() []*ColumnInfo { + if x != nil { + return x.Headers } return nil } -func (m *RowResponse) GetColumns() []*ColumnResponse { - if m != nil { - return m.Columns +func (x *RowResponse) GetColumns() []*ColumnResponse { + if x != nil { + return x.Columns } return nil } -func (m *RowResponse) GetStatusError() *StatusError { - if m != nil { - return m.StatusError +func (x *RowResponse) GetStatusError() *StatusError { + if x != nil { + return x.StatusError } return nil } -func (m *RowResponse) GetDuration() int64 { - if m != nil { - return m.Duration +func (x *RowResponse) GetDuration() int64 { + if x != nil { + return x.Duration } return 0 } type Row struct { - Columns []*ColumnResponse `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Row) Reset() { *m = Row{} } -func (m *Row) String() string { return proto.CompactTextString(m) } -func (*Row) ProtoMessage() {} -func (*Row) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{4} + Columns []*ColumnResponse `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` } -func (m *Row) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Row.Unmarshal(m, b) -} -func (m *Row) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Row.Marshal(b, m, deterministic) -} -func (m *Row) XXX_Merge(src proto.Message) { - xxx_messageInfo_Row.Merge(m, src) +func (x *Row) Reset() { + *x = Row{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Row) XXX_Size() int { - return xxx_messageInfo_Row.Size(m) + +func (x *Row) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Row) XXX_DiscardUnknown() { - xxx_messageInfo_Row.DiscardUnknown(m) + +func (*Row) ProtoMessage() {} + +func (x *Row) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Row proto.InternalMessageInfo +// Deprecated: Use Row.ProtoReflect.Descriptor instead. +func (*Row) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{4} +} -func (m *Row) GetColumns() []*ColumnResponse { - if m != nil { - return m.Columns +func (x *Row) GetColumns() []*ColumnResponse { + if x != nil { + return x.Columns } return nil } type TableResponse struct { - Headers []*ColumnInfo `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` - Rows []*Row `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"` - StatusError *StatusError `protobuf:"bytes,3,opt,name=StatusError,proto3" json:"StatusError,omitempty"` - Duration int64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TableResponse) Reset() { *m = TableResponse{} } -func (m *TableResponse) String() string { return proto.CompactTextString(m) } -func (*TableResponse) ProtoMessage() {} -func (*TableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{5} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TableResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TableResponse.Unmarshal(m, b) -} -func (m *TableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TableResponse.Marshal(b, m, deterministic) + Headers []*ColumnInfo `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` + Rows []*Row `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"` + StatusError *StatusError `protobuf:"bytes,3,opt,name=StatusError,proto3" json:"StatusError,omitempty"` + Duration int64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` } -func (m *TableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TableResponse.Merge(m, src) + +func (x *TableResponse) Reset() { + *x = TableResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TableResponse) XXX_Size() int { - return xxx_messageInfo_TableResponse.Size(m) + +func (x *TableResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TableResponse.DiscardUnknown(m) + +func (*TableResponse) ProtoMessage() {} + +func (x *TableResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TableResponse proto.InternalMessageInfo +// Deprecated: Use TableResponse.ProtoReflect.Descriptor instead. +func (*TableResponse) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{5} +} -func (m *TableResponse) GetHeaders() []*ColumnInfo { - if m != nil { - return m.Headers +func (x *TableResponse) GetHeaders() []*ColumnInfo { + if x != nil { + return x.Headers } return nil } -func (m *TableResponse) GetRows() []*Row { - if m != nil { - return m.Rows +func (x *TableResponse) GetRows() []*Row { + if x != nil { + return x.Rows } return nil } -func (m *TableResponse) GetStatusError() *StatusError { - if m != nil { - return m.StatusError +func (x *TableResponse) GetStatusError() *StatusError { + if x != nil { + return x.StatusError } return nil } -func (m *TableResponse) GetDuration() int64 { - if m != nil { - return m.Duration +func (x *TableResponse) GetDuration() int64 { + if x != nil { + return x.Duration } return 0 } type ColumnInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Datatype string `protobuf:"bytes,2,opt,name=datatype,proto3" json:"datatype,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ColumnInfo) Reset() { *m = ColumnInfo{} } -func (m *ColumnInfo) String() string { return proto.CompactTextString(m) } -func (*ColumnInfo) ProtoMessage() {} -func (*ColumnInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{6} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Datatype string `protobuf:"bytes,2,opt,name=datatype,proto3" json:"datatype,omitempty"` } -func (m *ColumnInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ColumnInfo.Unmarshal(m, b) -} -func (m *ColumnInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ColumnInfo.Marshal(b, m, deterministic) -} -func (m *ColumnInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ColumnInfo.Merge(m, src) +func (x *ColumnInfo) Reset() { + *x = ColumnInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ColumnInfo) XXX_Size() int { - return xxx_messageInfo_ColumnInfo.Size(m) + +func (x *ColumnInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ColumnInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ColumnInfo.DiscardUnknown(m) + +func (*ColumnInfo) ProtoMessage() {} + +func (x *ColumnInfo) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ColumnInfo proto.InternalMessageInfo +// Deprecated: Use ColumnInfo.ProtoReflect.Descriptor instead. +func (*ColumnInfo) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{6} +} -func (m *ColumnInfo) GetName() string { - if m != nil { - return m.Name +func (x *ColumnInfo) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *ColumnInfo) GetDatatype() string { - if m != nil { - return m.Datatype +func (x *ColumnInfo) GetDatatype() string { + if x != nil { + return x.Datatype } return "" } type ColumnResponse struct { - // Types that are valid to be assigned to ColumnVal: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ColumnVal: + // // *ColumnResponse_StringVal // *ColumnResponse_Uint64Val // *ColumnResponse_Int64Val @@ -381,36 +442,117 @@ type ColumnResponse struct { // *ColumnResponse_Float64Val // *ColumnResponse_DecimalVal // *ColumnResponse_TimestampVal - ColumnVal isColumnResponse_ColumnVal `protobuf_oneof:"columnVal"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ColumnVal isColumnResponse_ColumnVal `protobuf_oneof:"columnVal"` +} + +func (x *ColumnResponse) Reset() { + *x = ColumnResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ColumnResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnResponse) ProtoMessage() {} + +func (x *ColumnResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ColumnResponse) Reset() { *m = ColumnResponse{} } -func (m *ColumnResponse) String() string { return proto.CompactTextString(m) } -func (*ColumnResponse) ProtoMessage() {} +// Deprecated: Use ColumnResponse.ProtoReflect.Descriptor instead. func (*ColumnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{7} + return file_pilosa_proto_rawDescGZIP(), []int{7} } -func (m *ColumnResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ColumnResponse.Unmarshal(m, b) +func (m *ColumnResponse) GetColumnVal() isColumnResponse_ColumnVal { + if m != nil { + return m.ColumnVal + } + return nil } -func (m *ColumnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ColumnResponse.Marshal(b, m, deterministic) + +func (x *ColumnResponse) GetStringVal() string { + if x, ok := x.GetColumnVal().(*ColumnResponse_StringVal); ok { + return x.StringVal + } + return "" } -func (m *ColumnResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ColumnResponse.Merge(m, src) + +func (x *ColumnResponse) GetUint64Val() uint64 { + if x, ok := x.GetColumnVal().(*ColumnResponse_Uint64Val); ok { + return x.Uint64Val + } + return 0 } -func (m *ColumnResponse) XXX_Size() int { - return xxx_messageInfo_ColumnResponse.Size(m) + +func (x *ColumnResponse) GetInt64Val() int64 { + if x, ok := x.GetColumnVal().(*ColumnResponse_Int64Val); ok { + return x.Int64Val + } + return 0 } -func (m *ColumnResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ColumnResponse.DiscardUnknown(m) + +func (x *ColumnResponse) GetBoolVal() bool { + if x, ok := x.GetColumnVal().(*ColumnResponse_BoolVal); ok { + return x.BoolVal + } + return false } -var xxx_messageInfo_ColumnResponse proto.InternalMessageInfo +func (x *ColumnResponse) GetBlobVal() []byte { + if x, ok := x.GetColumnVal().(*ColumnResponse_BlobVal); ok { + return x.BlobVal + } + return nil +} + +func (x *ColumnResponse) GetUint64ArrayVal() *Uint64Array { + if x, ok := x.GetColumnVal().(*ColumnResponse_Uint64ArrayVal); ok { + return x.Uint64ArrayVal + } + return nil +} + +func (x *ColumnResponse) GetStringArrayVal() *StringArray { + if x, ok := x.GetColumnVal().(*ColumnResponse_StringArrayVal); ok { + return x.StringArrayVal + } + return nil +} + +func (x *ColumnResponse) GetFloat64Val() float64 { + if x, ok := x.GetColumnVal().(*ColumnResponse_Float64Val); ok { + return x.Float64Val + } + return 0 +} + +func (x *ColumnResponse) GetDecimalVal() *Decimal { + if x, ok := x.GetColumnVal().(*ColumnResponse_DecimalVal); ok { + return x.DecimalVal + } + return nil +} + +func (x *ColumnResponse) GetTimestampVal() string { + if x, ok := x.GetColumnVal().(*ColumnResponse_TimestampVal); ok { + return x.TimestampVal + } + return "" +} type isColumnResponse_ColumnVal interface { isColumnResponse_ColumnVal() @@ -476,354 +618,286 @@ func (*ColumnResponse_DecimalVal) isColumnResponse_ColumnVal() {} func (*ColumnResponse_TimestampVal) isColumnResponse_ColumnVal() {} -func (m *ColumnResponse) GetColumnVal() isColumnResponse_ColumnVal { - if m != nil { - return m.ColumnVal - } - return nil -} +type Decimal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ColumnResponse) GetStringVal() string { - if x, ok := m.GetColumnVal().(*ColumnResponse_StringVal); ok { - return x.StringVal - } - return "" + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + Scale int64 `protobuf:"varint,2,opt,name=scale,proto3" json:"scale,omitempty"` } -func (m *ColumnResponse) GetUint64Val() uint64 { - if x, ok := m.GetColumnVal().(*ColumnResponse_Uint64Val); ok { - return x.Uint64Val +func (x *Decimal) Reset() { + *x = Decimal{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (m *ColumnResponse) GetInt64Val() int64 { - if x, ok := m.GetColumnVal().(*ColumnResponse_Int64Val); ok { - return x.Int64Val - } - return 0 +func (x *Decimal) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ColumnResponse) GetBoolVal() bool { - if x, ok := m.GetColumnVal().(*ColumnResponse_BoolVal); ok { - return x.BoolVal - } - return false -} +func (*Decimal) ProtoMessage() {} -func (m *ColumnResponse) GetBlobVal() []byte { - if x, ok := m.GetColumnVal().(*ColumnResponse_BlobVal); ok { - return x.BlobVal +func (x *Decimal) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *ColumnResponse) GetUint64ArrayVal() *Uint64Array { - if x, ok := m.GetColumnVal().(*ColumnResponse_Uint64ArrayVal); ok { - return x.Uint64ArrayVal - } - return nil +// Deprecated: Use Decimal.ProtoReflect.Descriptor instead. +func (*Decimal) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{8} } -func (m *ColumnResponse) GetStringArrayVal() *StringArray { - if x, ok := m.GetColumnVal().(*ColumnResponse_StringArrayVal); ok { - return x.StringArrayVal +func (x *Decimal) GetValue() int64 { + if x != nil { + return x.Value } - return nil + return 0 } -func (m *ColumnResponse) GetFloat64Val() float64 { - if x, ok := m.GetColumnVal().(*ColumnResponse_Float64Val); ok { - return x.Float64Val +func (x *Decimal) GetScale() int64 { + if x != nil { + return x.Scale } return 0 } -func (m *ColumnResponse) GetDecimalVal() *Decimal { - if x, ok := m.GetColumnVal().(*ColumnResponse_DecimalVal); ok { - return x.DecimalVal - } - return nil -} +type InspectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ColumnResponse) GetTimestampVal() string { - if x, ok := m.GetColumnVal().(*ColumnResponse_TimestampVal); ok { - return x.TimestampVal - } - return "" + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` + Columns *IdsOrKeys `protobuf:"bytes,2,opt,name=columns,proto3" json:"columns,omitempty"` + FilterFields []string `protobuf:"bytes,3,rep,name=filterFields,proto3" json:"filterFields,omitempty"` + Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` + Offset uint64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` + Query string `protobuf:"bytes,6,opt,name=query,proto3" json:"query,omitempty"` } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ColumnResponse) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ColumnResponse_StringVal)(nil), - (*ColumnResponse_Uint64Val)(nil), - (*ColumnResponse_Int64Val)(nil), - (*ColumnResponse_BoolVal)(nil), - (*ColumnResponse_BlobVal)(nil), - (*ColumnResponse_Uint64ArrayVal)(nil), - (*ColumnResponse_StringArrayVal)(nil), - (*ColumnResponse_Float64Val)(nil), - (*ColumnResponse_DecimalVal)(nil), - (*ColumnResponse_TimestampVal)(nil), +func (x *InspectRequest) Reset() { + *x = InspectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -type Decimal struct { - Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` - Scale int64 `protobuf:"varint,2,opt,name=scale,proto3" json:"scale,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *InspectRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Decimal) Reset() { *m = Decimal{} } -func (m *Decimal) String() string { return proto.CompactTextString(m) } -func (*Decimal) ProtoMessage() {} -func (*Decimal) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{8} -} +func (*InspectRequest) ProtoMessage() {} -func (m *Decimal) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Decimal.Unmarshal(m, b) -} -func (m *Decimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Decimal.Marshal(b, m, deterministic) -} -func (m *Decimal) XXX_Merge(src proto.Message) { - xxx_messageInfo_Decimal.Merge(m, src) -} -func (m *Decimal) XXX_Size() int { - return xxx_messageInfo_Decimal.Size(m) -} -func (m *Decimal) XXX_DiscardUnknown() { - xxx_messageInfo_Decimal.DiscardUnknown(m) -} - -var xxx_messageInfo_Decimal proto.InternalMessageInfo - -func (m *Decimal) GetValue() int64 { - if m != nil { - return m.Value - } - return 0 -} - -func (m *Decimal) GetScale() int64 { - if m != nil { - return m.Scale +func (x *InspectRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -type InspectRequest struct { - Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` - Columns *IdsOrKeys `protobuf:"bytes,2,opt,name=columns,proto3" json:"columns,omitempty"` - FilterFields []string `protobuf:"bytes,3,rep,name=filterFields,proto3" json:"filterFields,omitempty"` - Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - Offset uint64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - Query string `protobuf:"bytes,6,opt,name=query,proto3" json:"query,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InspectRequest) Reset() { *m = InspectRequest{} } -func (m *InspectRequest) String() string { return proto.CompactTextString(m) } -func (*InspectRequest) ProtoMessage() {} +// Deprecated: Use InspectRequest.ProtoReflect.Descriptor instead. func (*InspectRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{9} + return file_pilosa_proto_rawDescGZIP(), []int{9} } -func (m *InspectRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InspectRequest.Unmarshal(m, b) -} -func (m *InspectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InspectRequest.Marshal(b, m, deterministic) -} -func (m *InspectRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InspectRequest.Merge(m, src) -} -func (m *InspectRequest) XXX_Size() int { - return xxx_messageInfo_InspectRequest.Size(m) -} -func (m *InspectRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InspectRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_InspectRequest proto.InternalMessageInfo - -func (m *InspectRequest) GetIndex() string { - if m != nil { - return m.Index +func (x *InspectRequest) GetIndex() string { + if x != nil { + return x.Index } return "" } -func (m *InspectRequest) GetColumns() *IdsOrKeys { - if m != nil { - return m.Columns +func (x *InspectRequest) GetColumns() *IdsOrKeys { + if x != nil { + return x.Columns } return nil } -func (m *InspectRequest) GetFilterFields() []string { - if m != nil { - return m.FilterFields +func (x *InspectRequest) GetFilterFields() []string { + if x != nil { + return x.FilterFields } return nil } -func (m *InspectRequest) GetLimit() uint64 { - if m != nil { - return m.Limit +func (x *InspectRequest) GetLimit() uint64 { + if x != nil { + return x.Limit } return 0 } -func (m *InspectRequest) GetOffset() uint64 { - if m != nil { - return m.Offset +func (x *InspectRequest) GetOffset() uint64 { + if x != nil { + return x.Offset } return 0 } -func (m *InspectRequest) GetQuery() string { - if m != nil { - return m.Query +func (x *InspectRequest) GetQuery() string { + if x != nil { + return x.Query } return "" } type Uint64Array struct { - Vals []uint64 `protobuf:"varint,1,rep,packed,name=vals,proto3" json:"vals,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Uint64Array) Reset() { *m = Uint64Array{} } -func (m *Uint64Array) String() string { return proto.CompactTextString(m) } -func (*Uint64Array) ProtoMessage() {} -func (*Uint64Array) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{10} + Vals []uint64 `protobuf:"varint,1,rep,packed,name=vals,proto3" json:"vals,omitempty"` } -func (m *Uint64Array) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Uint64Array.Unmarshal(m, b) -} -func (m *Uint64Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Uint64Array.Marshal(b, m, deterministic) -} -func (m *Uint64Array) XXX_Merge(src proto.Message) { - xxx_messageInfo_Uint64Array.Merge(m, src) +func (x *Uint64Array) Reset() { + *x = Uint64Array{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Uint64Array) XXX_Size() int { - return xxx_messageInfo_Uint64Array.Size(m) + +func (x *Uint64Array) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Uint64Array) XXX_DiscardUnknown() { - xxx_messageInfo_Uint64Array.DiscardUnknown(m) + +func (*Uint64Array) ProtoMessage() {} + +func (x *Uint64Array) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Uint64Array proto.InternalMessageInfo +// Deprecated: Use Uint64Array.ProtoReflect.Descriptor instead. +func (*Uint64Array) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{10} +} -func (m *Uint64Array) GetVals() []uint64 { - if m != nil { - return m.Vals +func (x *Uint64Array) GetVals() []uint64 { + if x != nil { + return x.Vals } return nil } type StringArray struct { - Vals []string `protobuf:"bytes,1,rep,name=vals,proto3" json:"vals,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StringArray) Reset() { *m = StringArray{} } -func (m *StringArray) String() string { return proto.CompactTextString(m) } -func (*StringArray) ProtoMessage() {} -func (*StringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{11} + Vals []string `protobuf:"bytes,1,rep,name=vals,proto3" json:"vals,omitempty"` } -func (m *StringArray) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StringArray.Unmarshal(m, b) -} -func (m *StringArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StringArray.Marshal(b, m, deterministic) -} -func (m *StringArray) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringArray.Merge(m, src) +func (x *StringArray) Reset() { + *x = StringArray{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StringArray) XXX_Size() int { - return xxx_messageInfo_StringArray.Size(m) + +func (x *StringArray) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StringArray) XXX_DiscardUnknown() { - xxx_messageInfo_StringArray.DiscardUnknown(m) + +func (*StringArray) ProtoMessage() {} + +func (x *StringArray) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StringArray proto.InternalMessageInfo +// Deprecated: Use StringArray.ProtoReflect.Descriptor instead. +func (*StringArray) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{11} +} -func (m *StringArray) GetVals() []string { - if m != nil { - return m.Vals +func (x *StringArray) GetVals() []string { + if x != nil { + return x.Vals } return nil } type IdsOrKeys struct { - // Types that are valid to be assigned to Type: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // // *IdsOrKeys_Ids // *IdsOrKeys_Keys - Type isIdsOrKeys_Type `protobuf_oneof:"type"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Type isIdsOrKeys_Type `protobuf_oneof:"type"` } -func (m *IdsOrKeys) Reset() { *m = IdsOrKeys{} } -func (m *IdsOrKeys) String() string { return proto.CompactTextString(m) } -func (*IdsOrKeys) ProtoMessage() {} -func (*IdsOrKeys) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{12} +func (x *IdsOrKeys) Reset() { + *x = IdsOrKeys{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *IdsOrKeys) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IdsOrKeys.Unmarshal(m, b) -} -func (m *IdsOrKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IdsOrKeys.Marshal(b, m, deterministic) +func (x *IdsOrKeys) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *IdsOrKeys) XXX_Merge(src proto.Message) { - xxx_messageInfo_IdsOrKeys.Merge(m, src) -} -func (m *IdsOrKeys) XXX_Size() int { - return xxx_messageInfo_IdsOrKeys.Size(m) -} -func (m *IdsOrKeys) XXX_DiscardUnknown() { - xxx_messageInfo_IdsOrKeys.DiscardUnknown(m) -} - -var xxx_messageInfo_IdsOrKeys proto.InternalMessageInfo -type isIdsOrKeys_Type interface { - isIdsOrKeys_Type() -} +func (*IdsOrKeys) ProtoMessage() {} -type IdsOrKeys_Ids struct { - Ids *Uint64Array `protobuf:"bytes,1,opt,name=ids,proto3,oneof"` +func (x *IdsOrKeys) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type IdsOrKeys_Keys struct { - Keys *StringArray `protobuf:"bytes,2,opt,name=keys,proto3,oneof"` +// Deprecated: Use IdsOrKeys.ProtoReflect.Descriptor instead. +func (*IdsOrKeys) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{12} } -func (*IdsOrKeys_Ids) isIdsOrKeys_Type() {} - -func (*IdsOrKeys_Keys) isIdsOrKeys_Type() {} - func (m *IdsOrKeys) GetType() isIdsOrKeys_Type { if m != nil { return m.Type @@ -831,453 +905,994 @@ func (m *IdsOrKeys) GetType() isIdsOrKeys_Type { return nil } -func (m *IdsOrKeys) GetIds() *Uint64Array { - if x, ok := m.GetType().(*IdsOrKeys_Ids); ok { +func (x *IdsOrKeys) GetIds() *Uint64Array { + if x, ok := x.GetType().(*IdsOrKeys_Ids); ok { return x.Ids } return nil } -func (m *IdsOrKeys) GetKeys() *StringArray { - if x, ok := m.GetType().(*IdsOrKeys_Keys); ok { +func (x *IdsOrKeys) GetKeys() *StringArray { + if x, ok := x.GetType().(*IdsOrKeys_Keys); ok { return x.Keys } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*IdsOrKeys) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*IdsOrKeys_Ids)(nil), - (*IdsOrKeys_Keys)(nil), - } +type isIdsOrKeys_Type interface { + isIdsOrKeys_Type() } -type Index struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type IdsOrKeys_Ids struct { + Ids *Uint64Array `protobuf:"bytes,1,opt,name=ids,proto3,oneof"` } -func (m *Index) Reset() { *m = Index{} } -func (m *Index) String() string { return proto.CompactTextString(m) } -func (*Index) ProtoMessage() {} -func (*Index) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{13} +type IdsOrKeys_Keys struct { + Keys *StringArray `protobuf:"bytes,2,opt,name=keys,proto3,oneof"` } -func (m *Index) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Index.Unmarshal(m, b) -} -func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Index.Marshal(b, m, deterministic) +func (*IdsOrKeys_Ids) isIdsOrKeys_Type() {} + +func (*IdsOrKeys_Keys) isIdsOrKeys_Type() {} + +type Index struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *Index) XXX_Merge(src proto.Message) { - xxx_messageInfo_Index.Merge(m, src) + +func (x *Index) Reset() { + *x = Index{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Index) XXX_Size() int { - return xxx_messageInfo_Index.Size(m) + +func (x *Index) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Index) XXX_DiscardUnknown() { - xxx_messageInfo_Index.DiscardUnknown(m) + +func (*Index) ProtoMessage() {} + +func (x *Index) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Index proto.InternalMessageInfo +// Deprecated: Use Index.ProtoReflect.Descriptor instead. +func (*Index) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{13} +} -func (m *Index) GetName() string { - if m != nil { - return m.Name +func (x *Index) GetName() string { + if x != nil { + return x.Name } return "" } type CreateIndexRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Keys bool `protobuf:"varint,2,opt,name=keys,proto3" json:"keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CreateIndexRequest) Reset() { *m = CreateIndexRequest{} } -func (m *CreateIndexRequest) String() string { return proto.CompactTextString(m) } -func (*CreateIndexRequest) ProtoMessage() {} -func (*CreateIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{14} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Keys bool `protobuf:"varint,2,opt,name=keys,proto3" json:"keys,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` } -func (m *CreateIndexRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateIndexRequest.Unmarshal(m, b) -} -func (m *CreateIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateIndexRequest.Marshal(b, m, deterministic) -} -func (m *CreateIndexRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateIndexRequest.Merge(m, src) +func (x *CreateIndexRequest) Reset() { + *x = CreateIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CreateIndexRequest) XXX_Size() int { - return xxx_messageInfo_CreateIndexRequest.Size(m) + +func (x *CreateIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateIndexRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateIndexRequest.DiscardUnknown(m) + +func (*CreateIndexRequest) ProtoMessage() {} + +func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CreateIndexRequest proto.InternalMessageInfo +// Deprecated: Use CreateIndexRequest.ProtoReflect.Descriptor instead. +func (*CreateIndexRequest) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{14} +} -func (m *CreateIndexRequest) GetName() string { - if m != nil { - return m.Name +func (x *CreateIndexRequest) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *CreateIndexRequest) GetKeys() bool { - if m != nil { - return m.Keys +func (x *CreateIndexRequest) GetKeys() bool { + if x != nil { + return x.Keys } return false } -type CreateIndexResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *CreateIndexRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" } -func (m *CreateIndexResponse) Reset() { *m = CreateIndexResponse{} } -func (m *CreateIndexResponse) String() string { return proto.CompactTextString(m) } -func (*CreateIndexResponse) ProtoMessage() {} -func (*CreateIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{15} +type CreateIndexResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *CreateIndexResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateIndexResponse.Unmarshal(m, b) -} -func (m *CreateIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateIndexResponse.Marshal(b, m, deterministic) -} -func (m *CreateIndexResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateIndexResponse.Merge(m, src) -} -func (m *CreateIndexResponse) XXX_Size() int { - return xxx_messageInfo_CreateIndexResponse.Size(m) +func (x *CreateIndexResponse) Reset() { + *x = CreateIndexResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CreateIndexResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateIndexResponse.DiscardUnknown(m) + +func (x *CreateIndexResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_CreateIndexResponse proto.InternalMessageInfo +func (*CreateIndexResponse) ProtoMessage() {} -type GetIndexRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *CreateIndexResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetIndexRequest) Reset() { *m = GetIndexRequest{} } -func (m *GetIndexRequest) String() string { return proto.CompactTextString(m) } -func (*GetIndexRequest) ProtoMessage() {} -func (*GetIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{16} +// Deprecated: Use CreateIndexResponse.ProtoReflect.Descriptor instead. +func (*CreateIndexResponse) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{15} } -func (m *GetIndexRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetIndexRequest.Unmarshal(m, b) -} -func (m *GetIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetIndexRequest.Marshal(b, m, deterministic) +type GetIndexRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *GetIndexRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetIndexRequest.Merge(m, src) + +func (x *GetIndexRequest) Reset() { + *x = GetIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetIndexRequest) XXX_Size() int { - return xxx_messageInfo_GetIndexRequest.Size(m) + +func (x *GetIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetIndexRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetIndexRequest.DiscardUnknown(m) + +func (*GetIndexRequest) ProtoMessage() {} + +func (x *GetIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetIndexRequest proto.InternalMessageInfo +// Deprecated: Use GetIndexRequest.ProtoReflect.Descriptor instead. +func (*GetIndexRequest) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{16} +} -func (m *GetIndexRequest) GetName() string { - if m != nil { - return m.Name +func (x *GetIndexRequest) GetName() string { + if x != nil { + return x.Name } return "" } type GetIndexResponse struct { - Index *Index `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetIndexResponse) Reset() { *m = GetIndexResponse{} } -func (m *GetIndexResponse) String() string { return proto.CompactTextString(m) } -func (*GetIndexResponse) ProtoMessage() {} -func (*GetIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{17} + Index *Index `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` } -func (m *GetIndexResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetIndexResponse.Unmarshal(m, b) -} -func (m *GetIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetIndexResponse.Marshal(b, m, deterministic) -} -func (m *GetIndexResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetIndexResponse.Merge(m, src) +func (x *GetIndexResponse) Reset() { + *x = GetIndexResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetIndexResponse) XXX_Size() int { - return xxx_messageInfo_GetIndexResponse.Size(m) + +func (x *GetIndexResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetIndexResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetIndexResponse.DiscardUnknown(m) + +func (*GetIndexResponse) ProtoMessage() {} + +func (x *GetIndexResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetIndexResponse proto.InternalMessageInfo +// Deprecated: Use GetIndexResponse.ProtoReflect.Descriptor instead. +func (*GetIndexResponse) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{17} +} -func (m *GetIndexResponse) GetIndex() *Index { - if m != nil { - return m.Index +func (x *GetIndexResponse) GetIndex() *Index { + if x != nil { + return x.Index } return nil } type GetIndexesRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *GetIndexesRequest) Reset() { *m = GetIndexesRequest{} } -func (m *GetIndexesRequest) String() string { return proto.CompactTextString(m) } -func (*GetIndexesRequest) ProtoMessage() {} -func (*GetIndexesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{18} +func (x *GetIndexesRequest) Reset() { + *x = GetIndexesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetIndexesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetIndexesRequest.Unmarshal(m, b) -} -func (m *GetIndexesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetIndexesRequest.Marshal(b, m, deterministic) -} -func (m *GetIndexesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetIndexesRequest.Merge(m, src) -} -func (m *GetIndexesRequest) XXX_Size() int { - return xxx_messageInfo_GetIndexesRequest.Size(m) -} -func (m *GetIndexesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetIndexesRequest.DiscardUnknown(m) +func (x *GetIndexesRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_GetIndexesRequest proto.InternalMessageInfo +func (*GetIndexesRequest) ProtoMessage() {} -type GetIndexesResponse struct { - Indexes []*Index `protobuf:"bytes,1,rep,name=indexes,proto3" json:"indexes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *GetIndexesRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetIndexesResponse) Reset() { *m = GetIndexesResponse{} } -func (m *GetIndexesResponse) String() string { return proto.CompactTextString(m) } -func (*GetIndexesResponse) ProtoMessage() {} -func (*GetIndexesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{19} +// Deprecated: Use GetIndexesRequest.ProtoReflect.Descriptor instead. +func (*GetIndexesRequest) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{18} } -func (m *GetIndexesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetIndexesResponse.Unmarshal(m, b) -} -func (m *GetIndexesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetIndexesResponse.Marshal(b, m, deterministic) +type GetIndexesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Indexes []*Index `protobuf:"bytes,1,rep,name=indexes,proto3" json:"indexes,omitempty"` } -func (m *GetIndexesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetIndexesResponse.Merge(m, src) + +func (x *GetIndexesResponse) Reset() { + *x = GetIndexesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetIndexesResponse) XXX_Size() int { - return xxx_messageInfo_GetIndexesResponse.Size(m) + +func (x *GetIndexesResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetIndexesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetIndexesResponse.DiscardUnknown(m) + +func (*GetIndexesResponse) ProtoMessage() {} + +func (x *GetIndexesResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetIndexesResponse proto.InternalMessageInfo +// Deprecated: Use GetIndexesResponse.ProtoReflect.Descriptor instead. +func (*GetIndexesResponse) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{19} +} -func (m *GetIndexesResponse) GetIndexes() []*Index { - if m != nil { - return m.Indexes +func (x *GetIndexesResponse) GetIndexes() []*Index { + if x != nil { + return x.Indexes } return nil } type DeleteIndexRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *DeleteIndexRequest) Reset() { *m = DeleteIndexRequest{} } -func (m *DeleteIndexRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteIndexRequest) ProtoMessage() {} -func (*DeleteIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{20} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *DeleteIndexRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteIndexRequest.Unmarshal(m, b) -} -func (m *DeleteIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteIndexRequest.Marshal(b, m, deterministic) -} -func (m *DeleteIndexRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteIndexRequest.Merge(m, src) +func (x *DeleteIndexRequest) Reset() { + *x = DeleteIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DeleteIndexRequest) XXX_Size() int { - return xxx_messageInfo_DeleteIndexRequest.Size(m) + +func (x *DeleteIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeleteIndexRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteIndexRequest.DiscardUnknown(m) + +func (*DeleteIndexRequest) ProtoMessage() {} + +func (x *DeleteIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_DeleteIndexRequest proto.InternalMessageInfo +// Deprecated: Use DeleteIndexRequest.ProtoReflect.Descriptor instead. +func (*DeleteIndexRequest) Descriptor() ([]byte, []int) { + return file_pilosa_proto_rawDescGZIP(), []int{20} +} -func (m *DeleteIndexRequest) GetName() string { - if m != nil { - return m.Name +func (x *DeleteIndexRequest) GetName() string { + if x != nil { + return x.Name } return "" } type DeleteIndexResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *DeleteIndexResponse) Reset() { *m = DeleteIndexResponse{} } -func (m *DeleteIndexResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteIndexResponse) ProtoMessage() {} +func (x *DeleteIndexResponse) Reset() { + *x = DeleteIndexResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteIndexResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteIndexResponse) ProtoMessage() {} + +func (x *DeleteIndexResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteIndexResponse.ProtoReflect.Descriptor instead. func (*DeleteIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{21} -} - -func (m *DeleteIndexResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteIndexResponse.Unmarshal(m, b) -} -func (m *DeleteIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteIndexResponse.Marshal(b, m, deterministic) -} -func (m *DeleteIndexResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteIndexResponse.Merge(m, src) -} -func (m *DeleteIndexResponse) XXX_Size() int { - return xxx_messageInfo_DeleteIndexResponse.Size(m) -} -func (m *DeleteIndexResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteIndexResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteIndexResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*QueryPQLRequest)(nil), "pilosa.QueryPQLRequest") - proto.RegisterType((*QuerySQLRequest)(nil), "pilosa.QuerySQLRequest") - proto.RegisterType((*StatusError)(nil), "pilosa.StatusError") - proto.RegisterType((*RowResponse)(nil), "pilosa.RowResponse") - proto.RegisterType((*Row)(nil), "pilosa.Row") - proto.RegisterType((*TableResponse)(nil), "pilosa.TableResponse") - proto.RegisterType((*ColumnInfo)(nil), "pilosa.ColumnInfo") - proto.RegisterType((*ColumnResponse)(nil), "pilosa.ColumnResponse") - proto.RegisterType((*Decimal)(nil), "pilosa.Decimal") - proto.RegisterType((*InspectRequest)(nil), "pilosa.InspectRequest") - proto.RegisterType((*Uint64Array)(nil), "pilosa.Uint64Array") - proto.RegisterType((*StringArray)(nil), "pilosa.StringArray") - proto.RegisterType((*IdsOrKeys)(nil), "pilosa.IdsOrKeys") - proto.RegisterType((*Index)(nil), "pilosa.Index") - proto.RegisterType((*CreateIndexRequest)(nil), "pilosa.CreateIndexRequest") - proto.RegisterType((*CreateIndexResponse)(nil), "pilosa.CreateIndexResponse") - proto.RegisterType((*GetIndexRequest)(nil), "pilosa.GetIndexRequest") - proto.RegisterType((*GetIndexResponse)(nil), "pilosa.GetIndexResponse") - proto.RegisterType((*GetIndexesRequest)(nil), "pilosa.GetIndexesRequest") - proto.RegisterType((*GetIndexesResponse)(nil), "pilosa.GetIndexesResponse") - proto.RegisterType((*DeleteIndexRequest)(nil), "pilosa.DeleteIndexRequest") - proto.RegisterType((*DeleteIndexResponse)(nil), "pilosa.DeleteIndexResponse") -} - -func init() { - proto.RegisterFile("pilosa.proto", fileDescriptor_ef0691a44d1e275c) -} - -var fileDescriptor_ef0691a44d1e275c = []byte{ - // 939 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x5b, 0x73, 0x1b, 0x35, - 0x14, 0xf6, 0x76, 0x37, 0xbe, 0x9c, 0xcd, 0xad, 0x0a, 0x0d, 0x8b, 0xcb, 0x80, 0xab, 0xc0, 0xd4, - 0x0c, 0x4c, 0x5a, 0x0c, 0xa5, 0x03, 0xa4, 0xc3, 0x34, 0x69, 0xc1, 0x19, 0x60, 0x70, 0x55, 0xda, - 0x07, 0xde, 0x64, 0x5b, 0x4e, 0x77, 0x58, 0xaf, 0x9c, 0x95, 0x9c, 0xe0, 0xff, 0xc4, 0x0b, 0xcf, - 0xbc, 0xf0, 0x5b, 0xf8, 0x25, 0x8c, 0x6e, 0x7b, 0xb1, 0x1d, 0x1a, 0x98, 0xe9, 0x93, 0x75, 0xce, - 0xf7, 0x9d, 0xa3, 0xf3, 0x9d, 0x23, 0xc9, 0x0b, 0x9b, 0xb3, 0x38, 0xe1, 0x82, 0x1e, 0xce, 0x32, - 0x2e, 0x39, 0xaa, 0x1b, 0x0b, 0x7f, 0x09, 0x3b, 0xcf, 0xe6, 0x2c, 0x5b, 0x0c, 0x9e, 0xfd, 0x40, - 0xd8, 0xf9, 0x9c, 0x09, 0x89, 0xde, 0x82, 0x8d, 0x38, 0x1d, 0xb3, 0xdf, 0x22, 0xaf, 0xe3, 0x75, - 0x5b, 0xc4, 0x18, 0x68, 0x17, 0xfc, 0xd9, 0x79, 0x12, 0xdd, 0xd0, 0x3e, 0xb5, 0xc4, 0x07, 0x36, - 0xf4, 0x79, 0x11, 0xba, 0x0b, 0xbe, 0x38, 0x4f, 0x6c, 0x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x1a, 0x05, 0x7c, 0x05, 0x0d, 0xfb, 0xf6, 0xa1, 0xfd, 0xe2, 0x30, 0x96, 0x1f, 0xc3, 0x2b, - 0xb7, 0x3f, 0x3e, 0xf8, 0xe5, 0xce, 0x59, 0x2c, 0x5f, 0xcd, 0x87, 0x87, 0x23, 0x3e, 0xbd, 0x67, - 0x48, 0xee, 0xe7, 0xa2, 0x77, 0x4f, 0x7f, 0xd6, 0x0d, 0xeb, 0xfa, 0xe7, 0xb3, 0x7f, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x74, 0xe6, 0x59, 0x2d, 0xed, 0x09, 0x00, 0x00, + return file_pilosa_proto_rawDescGZIP(), []int{21} +} + +var File_pilosa_proto protoreflect.FileDescriptor + +var file_pilosa_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x70, 0x69, 0x6c, 0x6f, 0x73, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x51, + 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, + 0x0a, 0x03, 0x70, 0x71, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x71, 0x6c, + 0x22, 0x23, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x73, 0x71, 0x6c, 0x22, 0x3b, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, + 0x12, 0x34, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x36, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x0d, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x07, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x6f, 0x77, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x34, 0x0a, 0x0b, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x52, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3c, 0x0a, 0x0a, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa9, 0x03, 0x0a, 0x0e, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x09, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x09, + 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x00, 0x52, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x08, + 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x08, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x07, 0x62, 0x6f, + 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x62, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x56, 0x61, + 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x56, + 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x41, 0x72, 0x72, 0x61, + 0x79, 0x56, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x41, 0x72, 0x72, 0x61, 0x79, 0x48, 0x00, + 0x52, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, + 0x12, 0x3c, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, + 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x48, 0x00, 0x52, 0x0e, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x12, 0x20, + 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, + 0x12, 0x30, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x63, + 0x69, 0x6d, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x56, + 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, + 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x56, 0x61, 0x6c, 0x22, 0x35, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x22, 0xba, 0x01, 0x0a, + 0x0e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, + 0x64, 0x73, 0x4f, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x21, 0x0a, 0x0b, 0x55, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x22, 0x21, 0x0a, 0x0b, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x76, + 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x22, + 0x65, 0x0a, 0x09, 0x49, 0x64, 0x73, 0x4f, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x26, 0x0a, 0x03, + 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x41, 0x72, 0x72, 0x61, 0x79, 0x48, 0x00, 0x52, + 0x03, 0x69, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x42, 0x06, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x1b, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6b, 0x65, 0x79, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, + 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x36, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22, 0x28, 0x0a, 0x12, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x04, + 0x0a, 0x06, 0x50, 0x69, 0x6c, 0x6f, 0x73, 0x61, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x18, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x08, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3f, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x51, 0x4c, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x08, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x51, 0x4c, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3f, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x51, + 0x4c, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x07, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x74, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, + 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pilosa_proto_rawDescOnce sync.Once + file_pilosa_proto_rawDescData = file_pilosa_proto_rawDesc +) + +func file_pilosa_proto_rawDescGZIP() []byte { + file_pilosa_proto_rawDescOnce.Do(func() { + file_pilosa_proto_rawDescData = protoimpl.X.CompressGZIP(file_pilosa_proto_rawDescData) + }) + return file_pilosa_proto_rawDescData +} + +var file_pilosa_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_pilosa_proto_goTypes = []interface{}{ + (*QueryPQLRequest)(nil), // 0: proto.QueryPQLRequest + (*QuerySQLRequest)(nil), // 1: proto.QuerySQLRequest + (*StatusError)(nil), // 2: proto.StatusError + (*RowResponse)(nil), // 3: proto.RowResponse + (*Row)(nil), // 4: proto.Row + (*TableResponse)(nil), // 5: proto.TableResponse + (*ColumnInfo)(nil), // 6: proto.ColumnInfo + (*ColumnResponse)(nil), // 7: proto.ColumnResponse + (*Decimal)(nil), // 8: proto.Decimal + (*InspectRequest)(nil), // 9: proto.InspectRequest + (*Uint64Array)(nil), // 10: proto.Uint64Array + (*StringArray)(nil), // 11: proto.StringArray + (*IdsOrKeys)(nil), // 12: proto.IdsOrKeys + (*Index)(nil), // 13: proto.Index + (*CreateIndexRequest)(nil), // 14: proto.CreateIndexRequest + (*CreateIndexResponse)(nil), // 15: proto.CreateIndexResponse + (*GetIndexRequest)(nil), // 16: proto.GetIndexRequest + (*GetIndexResponse)(nil), // 17: proto.GetIndexResponse + (*GetIndexesRequest)(nil), // 18: proto.GetIndexesRequest + (*GetIndexesResponse)(nil), // 19: proto.GetIndexesResponse + (*DeleteIndexRequest)(nil), // 20: proto.DeleteIndexRequest + (*DeleteIndexResponse)(nil), // 21: proto.DeleteIndexResponse +} +var file_pilosa_proto_depIdxs = []int32{ + 6, // 0: proto.RowResponse.headers:type_name -> proto.ColumnInfo + 7, // 1: proto.RowResponse.columns:type_name -> proto.ColumnResponse + 2, // 2: proto.RowResponse.StatusError:type_name -> proto.StatusError + 7, // 3: proto.Row.columns:type_name -> proto.ColumnResponse + 6, // 4: proto.TableResponse.headers:type_name -> proto.ColumnInfo + 4, // 5: proto.TableResponse.rows:type_name -> proto.Row + 2, // 6: proto.TableResponse.StatusError:type_name -> proto.StatusError + 10, // 7: proto.ColumnResponse.uint64ArrayVal:type_name -> proto.Uint64Array + 11, // 8: proto.ColumnResponse.stringArrayVal:type_name -> proto.StringArray + 8, // 9: proto.ColumnResponse.decimalVal:type_name -> proto.Decimal + 12, // 10: proto.InspectRequest.columns:type_name -> proto.IdsOrKeys + 10, // 11: proto.IdsOrKeys.ids:type_name -> proto.Uint64Array + 11, // 12: proto.IdsOrKeys.keys:type_name -> proto.StringArray + 13, // 13: proto.GetIndexResponse.index:type_name -> proto.Index + 13, // 14: proto.GetIndexesResponse.indexes:type_name -> proto.Index + 14, // 15: proto.Pilosa.CreateIndex:input_type -> proto.CreateIndexRequest + 18, // 16: proto.Pilosa.GetIndexes:input_type -> proto.GetIndexesRequest + 16, // 17: proto.Pilosa.GetIndex:input_type -> proto.GetIndexRequest + 20, // 18: proto.Pilosa.DeleteIndex:input_type -> proto.DeleteIndexRequest + 1, // 19: proto.Pilosa.QuerySQL:input_type -> proto.QuerySQLRequest + 1, // 20: proto.Pilosa.QuerySQLUnary:input_type -> proto.QuerySQLRequest + 0, // 21: proto.Pilosa.QueryPQL:input_type -> proto.QueryPQLRequest + 0, // 22: proto.Pilosa.QueryPQLUnary:input_type -> proto.QueryPQLRequest + 9, // 23: proto.Pilosa.Inspect:input_type -> proto.InspectRequest + 15, // 24: proto.Pilosa.CreateIndex:output_type -> proto.CreateIndexResponse + 19, // 25: proto.Pilosa.GetIndexes:output_type -> proto.GetIndexesResponse + 17, // 26: proto.Pilosa.GetIndex:output_type -> proto.GetIndexResponse + 21, // 27: proto.Pilosa.DeleteIndex:output_type -> proto.DeleteIndexResponse + 3, // 28: proto.Pilosa.QuerySQL:output_type -> proto.RowResponse + 5, // 29: proto.Pilosa.QuerySQLUnary:output_type -> proto.TableResponse + 3, // 30: proto.Pilosa.QueryPQL:output_type -> proto.RowResponse + 5, // 31: proto.Pilosa.QueryPQLUnary:output_type -> proto.TableResponse + 3, // 32: proto.Pilosa.Inspect:output_type -> proto.RowResponse + 24, // [24:33] is the sub-list for method output_type + 15, // [15:24] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_pilosa_proto_init() } +func file_pilosa_proto_init() { + if File_pilosa_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pilosa_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPQLRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySQLRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatusError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RowResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Row); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TableResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ColumnInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ColumnResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Decimal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InspectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Uint64Array); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IdsOrKeys); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Index); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateIndexResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIndexResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIndexesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIndexesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteIndexResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_pilosa_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*ColumnResponse_StringVal)(nil), + (*ColumnResponse_Uint64Val)(nil), + (*ColumnResponse_Int64Val)(nil), + (*ColumnResponse_BoolVal)(nil), + (*ColumnResponse_BlobVal)(nil), + (*ColumnResponse_Uint64ArrayVal)(nil), + (*ColumnResponse_StringArrayVal)(nil), + (*ColumnResponse_Float64Val)(nil), + (*ColumnResponse_DecimalVal)(nil), + (*ColumnResponse_TimestampVal)(nil), + } + file_pilosa_proto_msgTypes[12].OneofWrappers = []interface{}{ + (*IdsOrKeys_Ids)(nil), + (*IdsOrKeys_Keys)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pilosa_proto_rawDesc, + NumEnums: 0, + NumMessages: 22, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_pilosa_proto_goTypes, + DependencyIndexes: file_pilosa_proto_depIdxs, + MessageInfos: file_pilosa_proto_msgTypes, + }.Build() + File_pilosa_proto = out.File + file_pilosa_proto_rawDesc = nil + file_pilosa_proto_goTypes = nil + file_pilosa_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. @@ -1313,7 +1928,7 @@ func NewPilosaClient(cc grpc.ClientConnInterface) PilosaClient { func (c *pilosaClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*CreateIndexResponse, error) { out := new(CreateIndexResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/CreateIndex", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/CreateIndex", in, out, opts...) if err != nil { return nil, err } @@ -1322,7 +1937,7 @@ func (c *pilosaClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, func (c *pilosaClient) GetIndexes(ctx context.Context, in *GetIndexesRequest, opts ...grpc.CallOption) (*GetIndexesResponse, error) { out := new(GetIndexesResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/GetIndexes", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/GetIndexes", in, out, opts...) if err != nil { return nil, err } @@ -1331,7 +1946,7 @@ func (c *pilosaClient) GetIndexes(ctx context.Context, in *GetIndexesRequest, op func (c *pilosaClient) GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*GetIndexResponse, error) { out := new(GetIndexResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/GetIndex", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/GetIndex", in, out, opts...) if err != nil { return nil, err } @@ -1340,7 +1955,7 @@ func (c *pilosaClient) GetIndex(ctx context.Context, in *GetIndexRequest, opts . func (c *pilosaClient) DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*DeleteIndexResponse, error) { out := new(DeleteIndexResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/DeleteIndex", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/DeleteIndex", in, out, opts...) if err != nil { return nil, err } @@ -1348,7 +1963,7 @@ func (c *pilosaClient) DeleteIndex(ctx context.Context, in *DeleteIndexRequest, } func (c *pilosaClient) QuerySQL(ctx context.Context, in *QuerySQLRequest, opts ...grpc.CallOption) (Pilosa_QuerySQLClient, error) { - stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[0], "/pilosa.Pilosa/QuerySQL", opts...) + stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[0], "/proto.Pilosa/QuerySQL", opts...) if err != nil { return nil, err } @@ -1381,7 +1996,7 @@ func (x *pilosaQuerySQLClient) Recv() (*RowResponse, error) { func (c *pilosaClient) QuerySQLUnary(ctx context.Context, in *QuerySQLRequest, opts ...grpc.CallOption) (*TableResponse, error) { out := new(TableResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/QuerySQLUnary", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/QuerySQLUnary", in, out, opts...) if err != nil { return nil, err } @@ -1389,7 +2004,7 @@ func (c *pilosaClient) QuerySQLUnary(ctx context.Context, in *QuerySQLRequest, o } func (c *pilosaClient) QueryPQL(ctx context.Context, in *QueryPQLRequest, opts ...grpc.CallOption) (Pilosa_QueryPQLClient, error) { - stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[1], "/pilosa.Pilosa/QueryPQL", opts...) + stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[1], "/proto.Pilosa/QueryPQL", opts...) if err != nil { return nil, err } @@ -1422,7 +2037,7 @@ func (x *pilosaQueryPQLClient) Recv() (*RowResponse, error) { func (c *pilosaClient) QueryPQLUnary(ctx context.Context, in *QueryPQLRequest, opts ...grpc.CallOption) (*TableResponse, error) { out := new(TableResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/QueryPQLUnary", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/QueryPQLUnary", in, out, opts...) if err != nil { return nil, err } @@ -1430,7 +2045,7 @@ func (c *pilosaClient) QueryPQLUnary(ctx context.Context, in *QueryPQLRequest, o } func (c *pilosaClient) Inspect(ctx context.Context, in *InspectRequest, opts ...grpc.CallOption) (Pilosa_InspectClient, error) { - stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[2], "/pilosa.Pilosa/Inspect", opts...) + stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[2], "/proto.Pilosa/Inspect", opts...) if err != nil { return nil, err } @@ -1478,31 +2093,31 @@ type PilosaServer interface { type UnimplementedPilosaServer struct { } -func (*UnimplementedPilosaServer) CreateIndex(ctx context.Context, req *CreateIndexRequest) (*CreateIndexResponse, error) { +func (*UnimplementedPilosaServer) CreateIndex(context.Context, *CreateIndexRequest) (*CreateIndexResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateIndex not implemented") } -func (*UnimplementedPilosaServer) GetIndexes(ctx context.Context, req *GetIndexesRequest) (*GetIndexesResponse, error) { +func (*UnimplementedPilosaServer) GetIndexes(context.Context, *GetIndexesRequest) (*GetIndexesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetIndexes not implemented") } -func (*UnimplementedPilosaServer) GetIndex(ctx context.Context, req *GetIndexRequest) (*GetIndexResponse, error) { +func (*UnimplementedPilosaServer) GetIndex(context.Context, *GetIndexRequest) (*GetIndexResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetIndex not implemented") } -func (*UnimplementedPilosaServer) DeleteIndex(ctx context.Context, req *DeleteIndexRequest) (*DeleteIndexResponse, error) { +func (*UnimplementedPilosaServer) DeleteIndex(context.Context, *DeleteIndexRequest) (*DeleteIndexResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteIndex not implemented") } -func (*UnimplementedPilosaServer) QuerySQL(req *QuerySQLRequest, srv Pilosa_QuerySQLServer) error { +func (*UnimplementedPilosaServer) QuerySQL(*QuerySQLRequest, Pilosa_QuerySQLServer) error { return status.Errorf(codes.Unimplemented, "method QuerySQL not implemented") } -func (*UnimplementedPilosaServer) QuerySQLUnary(ctx context.Context, req *QuerySQLRequest) (*TableResponse, error) { +func (*UnimplementedPilosaServer) QuerySQLUnary(context.Context, *QuerySQLRequest) (*TableResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QuerySQLUnary not implemented") } -func (*UnimplementedPilosaServer) QueryPQL(req *QueryPQLRequest, srv Pilosa_QueryPQLServer) error { +func (*UnimplementedPilosaServer) QueryPQL(*QueryPQLRequest, Pilosa_QueryPQLServer) error { return status.Errorf(codes.Unimplemented, "method QueryPQL not implemented") } -func (*UnimplementedPilosaServer) QueryPQLUnary(ctx context.Context, req *QueryPQLRequest) (*TableResponse, error) { +func (*UnimplementedPilosaServer) QueryPQLUnary(context.Context, *QueryPQLRequest) (*TableResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryPQLUnary not implemented") } -func (*UnimplementedPilosaServer) Inspect(req *InspectRequest, srv Pilosa_InspectServer) error { +func (*UnimplementedPilosaServer) Inspect(*InspectRequest, Pilosa_InspectServer) error { return status.Errorf(codes.Unimplemented, "method Inspect not implemented") } @@ -1520,7 +2135,7 @@ func _Pilosa_CreateIndex_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/CreateIndex", + FullMethod: "/proto.Pilosa/CreateIndex", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).CreateIndex(ctx, req.(*CreateIndexRequest)) @@ -1538,7 +2153,7 @@ func _Pilosa_GetIndexes_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/GetIndexes", + FullMethod: "/proto.Pilosa/GetIndexes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).GetIndexes(ctx, req.(*GetIndexesRequest)) @@ -1556,7 +2171,7 @@ func _Pilosa_GetIndex_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/GetIndex", + FullMethod: "/proto.Pilosa/GetIndex", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).GetIndex(ctx, req.(*GetIndexRequest)) @@ -1574,7 +2189,7 @@ func _Pilosa_DeleteIndex_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/DeleteIndex", + FullMethod: "/proto.Pilosa/DeleteIndex", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).DeleteIndex(ctx, req.(*DeleteIndexRequest)) @@ -1613,7 +2228,7 @@ func _Pilosa_QuerySQLUnary_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/QuerySQLUnary", + FullMethod: "/proto.Pilosa/QuerySQLUnary", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).QuerySQLUnary(ctx, req.(*QuerySQLRequest)) @@ -1652,7 +2267,7 @@ func _Pilosa_QueryPQLUnary_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/QueryPQLUnary", + FullMethod: "/proto.Pilosa/QueryPQLUnary", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).QueryPQLUnary(ctx, req.(*QueryPQLRequest)) @@ -1682,7 +2297,7 @@ func (x *pilosaInspectServer) Send(m *RowResponse) error { } var _Pilosa_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pilosa.Pilosa", + ServiceName: "proto.Pilosa", HandlerType: (*PilosaServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/proto/pilosa.proto b/proto/pilosa.proto index 9443683e6..7c463779e 100644 --- a/proto/pilosa.proto +++ b/proto/pilosa.proto @@ -1,9 +1,7 @@ syntax = "proto3"; -package pilosa; +package proto; -//import "public.proto"; - -option go_package = "github.com/pilosa/pilosa/v2/proto"; +option go_package = "../proto"; message QueryPQLRequest { string index = 1; @@ -93,6 +91,7 @@ message Index { message CreateIndexRequest { string name = 1; bool keys = 2; + string description = 3; } message CreateIndexResponse { diff --git a/server.go b/server.go index cbfaa3fa8..3fc24c077 100644 --- a/server.go +++ b/server.go @@ -1016,6 +1016,7 @@ func (s *Server) receiveMessage(m Message) error { if err := idx.UpdateFieldLocal(&obj.CreateFieldMessage, obj.Update); err != nil { return err } + case *DeleteFieldMessage: idx := s.holder.Index(obj.Index) if err := idx.DeleteField(obj.Field); err != nil { diff --git a/server/handler_test.go b/server/handler_test.go index 18070be4d..b9ac45700 100644 --- a/server/handler_test.go +++ b/server/handler_test.go @@ -180,12 +180,12 @@ func TestHandler_Endpoints(t *testing.T) { const shard = 0 tx0 := holder.Txf().NewWritableQcx() defer tx0.Abort() - if f, err := i0.CreateFieldIfNotExists("f1", pilosa.OptFieldTypeDefault()); err != nil { + if f, err := i0.CreateFieldIfNotExists("f1", "", pilosa.OptFieldTypeDefault()); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx0, 0, 0, nil); err != nil { t.Fatal(err) } - if _, err := i0.CreateFieldIfNotExists("f0", pilosa.OptFieldTypeDefault()); err != nil { + if _, err := i0.CreateFieldIfNotExists("f0", "", pilosa.OptFieldTypeDefault()); err != nil { t.Fatal(err) } if err := tx0.Finish(); err != nil { @@ -195,7 +195,7 @@ func TestHandler_Endpoints(t *testing.T) { i1 := hldr.MustCreateIndexIfNotExists("i1", pilosa.IndexOptions{}) tx1 := holder.Txf().NewWritableQcx() defer tx1.Abort() - if f, err := i1.CreateFieldIfNotExists("f0", pilosa.OptFieldTypeDefault()); err != nil { + if f, err := i1.CreateFieldIfNotExists("f0", "", pilosa.OptFieldTypeDefault()); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx1, 0, 0, nil); err != nil { t.Fatal(err) @@ -216,9 +216,10 @@ func TestHandler_Endpoints(t *testing.T) { &bodySchema); err != nil { t.Fatalf("unexpected unmarshalling error: %v", err) } - // DO NOT COMPARE `CreatedAt` - reset to 0 + // DO NOT COMPARE `CreatedAt` & 'UpdatedAt' - reset to 0 for _, i := range bodySchema.Indexes { i.CreatedAt = 0 + i.UpdatedAt = 0 for _, f := range i.Fields { f.CreatedAt = 0 } @@ -226,8 +227,27 @@ func TestHandler_Endpoints(t *testing.T) { // var targetSchema pilosa.Schema - if err := json.Unmarshal([]byte(fmt.Sprintf(`{"indexes":[{"name":"i0","options":{"keys":false,"trackExistence":false},"fields":[{"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}},{"name":"f1","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}}],"shardWidth":%d},{"name":"i1","options":{"keys":false,"trackExistence":false},"fields":[{"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}}],"shardWidth":%[1]d}]}`, pilosa.ShardWidth)), - &targetSchema); err != nil { + if err := json.Unmarshal([]byte(fmt.Sprintf(`{"indexes":[ + { + "name":"i0", + "options":{"keys":false,"trackExistence":false}, + "updatedAt": 0, + "description": "this is a description", + "fields":[ + {"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}}, + {"name":"f1","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}} + ], + "shardWidth":%d + }, + { + "name":"i1", + "options":{"keys":false,"trackExistence":false}, + "updatedAt": 0, + "description": "this is a description", + "fields":[ + {"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}}],"shardWidth":%[1]d} + ] + }`, pilosa.ShardWidth)), &targetSchema); err != nil { t.Fatalf("unexpected unmarshalling error: %v", err) } @@ -240,13 +260,13 @@ func TestHandler_Endpoints(t *testing.T) { i2 := hldr.MustCreateIndexIfNotExists("i2", pilosa.IndexOptions{}) tx2 := holder.Txf().NewWritableQcx() defer tx2.Abort() - if f, err := i2.CreateFieldIfNotExists("f0", pilosa.OptFieldTypeSet(pilosa.CacheTypeRanked, 1000)); err != nil { + if f, err := i2.CreateFieldIfNotExists("f0", "", pilosa.OptFieldTypeSet(pilosa.CacheTypeRanked, 1000)); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx2, 0, 0, nil); err != nil { t.Fatal(err) } - f, err := i2.CreateFieldIfNotExists("f1", pilosa.OptFieldTypeInt(-100, 100)) + f, err := i2.CreateFieldIfNotExists("f1", "", pilosa.OptFieldTypeInt(-100, 100)) if err != nil { t.Fatal(err) } @@ -257,7 +277,7 @@ func TestHandler_Endpoints(t *testing.T) { } } - f, err = i2.CreateFieldIfNotExists("f2", pilosa.OptFieldTypeDecimal(1, pql.NewDecimal(-10, 0), pql.NewDecimal(10, 0))) + f, err = i2.CreateFieldIfNotExists("f2", "", pilosa.OptFieldTypeDecimal(1, pql.NewDecimal(-10, 0), pql.NewDecimal(10, 0))) if err != nil { t.Fatal(err) } @@ -268,17 +288,17 @@ func TestHandler_Endpoints(t *testing.T) { } } - if f, err := i2.CreateFieldIfNotExists("f3", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0")); err != nil { + if f, err := i2.CreateFieldIfNotExists("f3", "", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0")); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx2, 0, 0, nil); err != nil { t.Fatal(err) } - if f, err := i2.CreateFieldIfNotExists("f4", pilosa.OptFieldTypeMutex(pilosa.CacheTypeRanked, 5000)); err != nil { + if f, err := i2.CreateFieldIfNotExists("f4", "", pilosa.OptFieldTypeMutex(pilosa.CacheTypeRanked, 5000)); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx2, 0, 0, nil); err != nil { t.Fatal(err) } - if f, err := i2.CreateFieldIfNotExists("f5", pilosa.OptFieldTypeBool()); err != nil { + if f, err := i2.CreateFieldIfNotExists("f5", "", pilosa.OptFieldTypeBool()); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx2, 0, 0, nil); err != nil { t.Fatal(err) @@ -299,9 +319,10 @@ func TestHandler_Endpoints(t *testing.T) { if err := json.Unmarshal(w.Body.Bytes(), &bodySchema); err != nil { t.Fatalf("unexpected unmarshalling error: %v", err) } - // DO NOT COMPARE `CreatedAt` - reset to 0 + // DO NOT COMPARE `CreatedAt` & `UpdatedAt`` - reset to 0 for _, i := range bodySchema.Indexes { i.CreatedAt = 0 + i.UpdatedAt = 0 for _, f := range i.Fields { f.CreatedAt = 0 } @@ -309,7 +330,44 @@ func TestHandler_Endpoints(t *testing.T) { // var targetSchema pilosa.Schema - target := fmt.Sprintf(`{"indexes":[{"name":"i0","options":{"keys":false,"trackExistence":false},"fields":[{"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}},{"name":"f1","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false},"views":[{"name":"standard"}]}],"shardWidth":%[1]d},{"name":"i1","options":{"keys":false,"trackExistence":false},"fields":[{"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false},"views":[{"name":"standard"}]}],"shardWidth":%[1]d},{"name":"i2","options":{"keys":false,"trackExistence":false},"fields":[{"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":1000,"keys":false},"views":[{"name":"standard"}]},{"name":"f1","options":{"type":"int","base":0,"bitDepth":0,"min":-100,"max":100,"keys":false,"foreignIndex":""},"views":[{"name":"bsig_f1"}]},{"name":"f2","options":{"type":"decimal","base":0,"scale":1,"bitDepth":0,"min":-10,"max":10,"keys":false},"views":[{"name":"bsig_f2"}]},{"name":"f3","options":{"type":"time","timeQuantum":"YMDH","keys":false,"noStandardView":false},"views":[{"name":"standard"}]},{"name":"f4","options":{"type":"mutex","cacheType":"ranked","cacheSize":5000,"keys":false},"views":[{"name":"standard"}]},{"name":"f5","options":{"type":"bool"},"views":[{"name":"standard"}]}],"shardWidth":%[1]d}]}`, pilosa.ShardWidth) + target := fmt.Sprintf(`{"indexes":[ + { + "name":"i0", + "options":{"keys":false,"trackExistence":false}, + "updatedAt": 0, + "description": "this is a description", + "fields":[ + {"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}}, + {"name":"f1","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false},"views":[{"name":"standard"}]} + ], + "shardWidth":%[1]d + }, + { + "name":"i1", + "options":{"keys":false,"trackExistence":false}, + "updatedAt": 0, + "description": "this is a description", + "fields":[ + {"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false},"views":[{"name":"standard"}]} + ], + "shardWidth":%[1]d + }, + { + "name":"i2", + "options":{"keys":false,"trackExistence":false}, + "updatedAt": 0, + "description": "this is a description", + "fields":[ + {"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":1000,"keys":false},"views":[{"name":"standard"}]}, + {"name":"f1","options":{"type":"int","base":0,"bitDepth":0,"min":-100,"max":100,"keys":false,"foreignIndex":""},"views":[{"name":"bsig_f1"}]}, + {"name":"f2","options":{"type":"decimal","base":0,"scale":1,"bitDepth":0,"min":-10,"max":10,"keys":false},"views":[{"name":"bsig_f2"}]}, + {"name":"f3","options":{"type":"time","timeQuantum":"YMDH","keys":false,"noStandardView":false},"views":[{"name":"standard"}]}, + {"name":"f4","options":{"type":"mutex","cacheType":"ranked","cacheSize":5000,"keys":false},"views":[{"name":"standard"}]}, + {"name":"f5","options":{"type":"bool"},"views":[{"name":"standard"}]} + ], + "shardWidth":%[1]d} + ] + }`, pilosa.ShardWidth) if err := json.Unmarshal([]byte(target), &targetSchema); err != nil { t.Fatalf("unexpected unmarshalling error: %v", err) } @@ -417,7 +475,7 @@ func TestHandler_Endpoints(t *testing.T) { }) t.Run("ImportRoaringOverwrite", func(t *testing.T) { - if _, err := i0.CreateFieldIfNotExists("int-field", pilosa.OptFieldTypeInt(0, 10)); err != nil { + if _, err := i0.CreateFieldIfNotExists("int-field", "", pilosa.OptFieldTypeInt(0, 10)); err != nil { t.Fatal(err) } w := httptest.NewRecorder() @@ -958,7 +1016,7 @@ func TestHandler_Endpoints(t *testing.T) { t.Run("Field delete", func(t *testing.T) { i := hldr.MustCreateIndexIfNotExists("i", pilosa.IndexOptions{}) - if _, err := i.CreateFieldIfNotExists("f1", pilosa.OptFieldTypeDefault()); err != nil { + if _, err := i.CreateFieldIfNotExists("f1", "", pilosa.OptFieldTypeDefault()); err != nil { t.Fatal(err) } w := httptest.NewRecorder() diff --git a/sql3/planner/executionplanner_test.go b/sql3/planner/executionplanner_test.go index a815d885e..a76be55ca 100644 --- a/sql3/planner/executionplanner_test.go +++ b/sql3/planner/executionplanner_test.go @@ -22,25 +22,25 @@ func TestPlanner_Show(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), pilosa.IndexOptions{TrackExistence: true}) + index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := index.CreateField("f", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := index.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := index.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - index2, err := c.GetHolder(0).CreateIndex(c.Idx("l"), pilosa.IndexOptions{TrackExistence: false}) + index2, err := c.GetHolder(0).CreateIndex(c.Idx("l"), "", pilosa.IndexOptions{TrackExistence: false}) if err != nil { t.Fatal(err) } - if _, err := index2.CreateField("f", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := index2.CreateField("f", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := index2.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := index2.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -532,14 +532,14 @@ func TestPlanner_AlterTable(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), pilosa.IndexOptions{TrackExistence: true}) + index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := index.CreateField("f", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := index.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := index.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -594,14 +594,14 @@ func TestPlanner_DropTable(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), pilosa.IndexOptions{TrackExistence: true}) + index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := index.CreateField("f", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := index.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := index.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -617,25 +617,25 @@ func TestPlanner_ExpressionsInSelectListParen(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), pilosa.IndexOptions{TrackExistence: true}) + i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i1.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i1.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i1.CreateField("y", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i1.CreateField("y", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -698,20 +698,20 @@ func TestPlanner_ExpressionsInSelectListLiterals(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("d", pilosa.OptFieldTypeDecimal(2)); err != nil { + } else if _, err := i0.CreateField("d", "", pilosa.OptFieldTypeDecimal(2)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("ts", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, "s")); err != nil { + } else if _, err := i0.CreateField("ts", "", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, "s")); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("str", pilosa.OptFieldTypeMutex(pilosa.CacheTypeLRU, pilosa.DefaultCacheSize), pilosa.OptFieldKeys()); err != nil { + } else if _, err := i0.CreateField("str", "", pilosa.OptFieldTypeMutex(pilosa.CacheTypeLRU, pilosa.DefaultCacheSize), pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } @@ -840,20 +840,20 @@ func TestPlanner_ExpressionsInSelectListCase(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("d", pilosa.OptFieldTypeDecimal(2)); err != nil { + } else if _, err := i0.CreateField("d", "", pilosa.OptFieldTypeDecimal(2)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("ts", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, "s")); err != nil { + } else if _, err := i0.CreateField("ts", "", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, "s")); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("str", pilosa.OptFieldTypeMutex(pilosa.CacheTypeLRU, pilosa.DefaultCacheSize), pilosa.OptFieldKeys()); err != nil { + } else if _, err := i0.CreateField("str", "", pilosa.OptFieldTypeMutex(pilosa.CacheTypeLRU, pilosa.DefaultCacheSize), pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } @@ -921,25 +921,25 @@ func TestPlanner_Select(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), pilosa.IndexOptions{TrackExistence: true}) + i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i1.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i1.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i1.CreateField("y", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i1.CreateField("y", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -1120,14 +1120,14 @@ func TestPlanner_SelectOrderBy(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -1170,14 +1170,14 @@ func TestPlanner_SelectSelectSource(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -1242,23 +1242,23 @@ func TestPlanner_In(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), pilosa.IndexOptions{TrackExistence: true}) + i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i1.CreateField("parentid", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i1.CreateField("parentid", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i1.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i1.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -1373,23 +1373,23 @@ func TestPlanner_Distinct(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), pilosa.IndexOptions{TrackExistence: true}) + i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i1.CreateField("parentid", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i1.CreateField("parentid", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i1.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i1.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -1489,16 +1489,16 @@ func TestPlanner_SelectTop(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } diff --git a/sql3/planner/opcreatetable.go b/sql3/planner/opcreatetable.go index cd946b71a..afbca6519 100644 --- a/sql3/planner/opcreatetable.go +++ b/sql3/planner/opcreatetable.go @@ -109,6 +109,7 @@ func (i *createTableRowIter) Next(ctx context.Context) (types.Row, error) { } } + // TODO (pok) add ability to add description here if err := i.planner.schemaAPI.CreateIndexAndFields(ctx, i.tableName, options, fields); err != nil { if _, ok := errors.Cause(err).(pilosa.ConflictError); ok { if i.failIfExists { diff --git a/test/holder.go b/test/holder.go index a8219abf3..b4cf0313c 100644 --- a/test/holder.go +++ b/test/holder.go @@ -65,7 +65,7 @@ func (h *Holder) Reopen() error { // MustCreateIndexIfNotExists returns a given index. Panic on error. func (h *Holder) MustCreateIndexIfNotExists(index string, opt pilosa.IndexOptions) *Index { - idx, err := h.Holder.CreateIndexIfNotExists(index, opt) + idx, err := h.Holder.CreateIndexIfNotExists(index, "", opt) if err != nil { h.tb.Fatalf("creating index: %v", err) } @@ -75,7 +75,7 @@ func (h *Holder) MustCreateIndexIfNotExists(index string, opt pilosa.IndexOption // Row returns a Row for a given field. func (h *Holder) Row(index, field string, rowID uint64) *pilosa.Row { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeDefault()) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeDefault()) if err != nil { panic(err) } @@ -117,7 +117,7 @@ func (h *Holder) ReadRow(index, field string, rowID uint64) *pilosa.Row { func (h *Holder) RowTime(index, field string, rowID uint64, t time.Time, quantum string) *pilosa.Row { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeDefault()) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeDefault()) if err != nil { panic(err) } @@ -142,7 +142,7 @@ func (h *Holder) SetBit(index, field string, rowID, columnID uint64) { // SetBitTime sets a bit with timestamp on the given field. func (h *Holder) SetBitTime(index, field string, rowID, columnID uint64, t *time.Time) { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeDefault()) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeDefault()) if err != nil { panic(err) } @@ -163,7 +163,7 @@ func (h *Holder) SetBitTime(index, field string, rowID, columnID uint64, t *time // ClearBit clears a bit on the given field. func (h *Holder) ClearBit(index, field string, rowID, columnID uint64) { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeDefault()) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeDefault()) if err != nil { panic(err) } @@ -192,7 +192,7 @@ func (h *Holder) MustSetBits(index, field string, rowID uint64, columnIDs ...uin // SetValue sets an integer value on the given field. func (h *Holder) SetValue(index, field string, columnID uint64, value int64) *Index { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { panic(err) } @@ -214,7 +214,7 @@ func (h *Holder) SetValue(index, field string, columnID uint64, value int64) *In // Value returns the integer value for a given column. func (h *Holder) Value(index, field string, columnID uint64) (int64, bool) { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { panic(err) } @@ -233,7 +233,7 @@ func (h *Holder) Value(index, field string, columnID uint64) (int64, bool) { // on the given range. func (h *Holder) Range(index, field string, op pql.Token, predicate int64) *pilosa.Row { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { panic(err) } diff --git a/test/index.go b/test/index.go index 3677d0a00..280f32818 100644 --- a/test/index.go +++ b/test/index.go @@ -21,7 +21,7 @@ func newIndex(tb testing.TB) (*Holder, *Index) { testhook.Cleanup(tb, func() { h.Close() }) - index, err := h.CreateIndex("i", pilosa.IndexOptions{}) + index, err := h.CreateIndex("i", "", pilosa.IndexOptions{}) if err != nil { panic(err) } @@ -52,8 +52,8 @@ func (i *Index) Reopen() error { } // CreateField creates a field with the given options. -func (i *Index) CreateField(name string, opts ...pilosa.FieldOption) (*Field, error) { - f, err := i.Index.CreateField(name, opts...) +func (i *Index) CreateField(name string, requestUserID string, opts ...pilosa.FieldOption) (*Field, error) { + f, err := i.Index.CreateField(name, requestUserID, opts...) if err != nil { return nil, err } @@ -61,8 +61,8 @@ func (i *Index) CreateField(name string, opts ...pilosa.FieldOption) (*Field, er } // CreateFieldIfNotExists creates a field with the given options if it doesn't exist. -func (i *Index) CreateFieldIfNotExists(name string, opts ...pilosa.FieldOption) (*Field, error) { - f, err := i.Index.CreateFieldIfNotExists(name, opts...) +func (i *Index) CreateFieldIfNotExists(name string, requestUserID string, opts ...pilosa.FieldOption) (*Field, error) { + f, err := i.Index.CreateFieldIfNotExists(name, requestUserID, opts...) if err != nil { return nil, err } From 25e42f83f9ee93a2d8a9e56ca129d6b628e94428 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula <85502298+pokeeffe-molecula@users.noreply.github.com> Date: Thu, 27 Oct 2022 13:11:14 -0500 Subject: [PATCH 08/10] tightened up is/is not null filter expressions (FB-1741) (#2260) Covers tightening up handling filter expressions that contain is/is not null ops. These filters may have to be translated into PQL calls to be passed to the executor and even though sql3 language supports nullability for any data type, currently only BSI fields are nullable at the storage engine level (there is a ticket to add support for non-BSI field here FB-1689: IS SQL Argument returns incorrect error) so when these fields are used in filter conditions we need to handle BSI and non-BSI fields differently. --- sql3/errors.go | 16 ++++ sql3/planner/expressionpql.go | 32 +++++++ sql3/planner/opgroupby.go | 2 - sql3/sql_definitions_test.go | 3 + sql3/sql_defs_null_test.go | 173 +++++++++++++++++++++++++++++++++- 5 files changed, 222 insertions(+), 4 deletions(-) diff --git a/sql3/errors.go b/sql3/errors.go index e5c388bd9..072870a40 100644 --- a/sql3/errors.go +++ b/sql3/errors.go @@ -46,6 +46,8 @@ const ( ErrLiteralEmptySetNotAllowed errors.Code = "ErrLiteralEmptySetNotAllowed" ErrLiteralEmptyTupleNotAllowed errors.Code = "ErrLiteralEmptyTupleNotAllowed" ErrSetLiteralMustContainIntOrString errors.Code = "ErrSetLiteralMustContainIntOrString" + ErrInvalidColumnInFilterExpression errors.Code = "ErrInvalidColumnInFilterExpression" + ErrInvalidTypeInFilterExpression errors.Code = "ErrInvalidTypeInFilterExpression" ErrTypeAssignmentIncompatible errors.Code = "ErrTypeAssignmentIncompatible" @@ -198,6 +200,20 @@ func NewErrSetLiteralMustContainIntOrString(line, col int) error { ) } +func NewErrInvalidColumnInFilterExpression(line, col int, column string, op string) error { + return errors.New( + ErrInvalidColumnInFilterExpression, + fmt.Sprintf("[%d:%d] '%s' column cannot be used in a %s filter expression", line, col, column, op), + ) +} + +func NewErrInvalidTypeInFilterExpression(line, col int, typeName string, op string) error { + return errors.New( + ErrInvalidTypeInFilterExpression, + fmt.Sprintf("[%d:%d] unsupported type '%s' for %s filter expression", line, col, typeName, op), + ) +} + func NewErrLiteralEmptyTupleNotAllowed(line, col int) error { return errors.New( ErrLiteralEmptyTupleNotAllowed, diff --git a/sql3/planner/expressionpql.go b/sql3/planner/expressionpql.go index 74052b0b3..c875243ef 100644 --- a/sql3/planner/expressionpql.go +++ b/sql3/planner/expressionpql.go @@ -193,6 +193,38 @@ func (p *ExecutionPlanner) generatePQLCallFromBinaryExpr(ctx context.Context, ex case parser.IN, parser.NOTIN: return nil, sql3.NewErrInternal("IN operator is not supported") + case parser.IS, parser.ISNOT: + lhs, ok := expr.lhs.(*qualifiedRefPlanExpression) + if !ok { + return nil, sql3.NewErrInternalf("unexpected lhs %T", expr.lhs) + } + + pqlOp := pql.EQ + if op == parser.ISNOT { + pqlOp = pql.NEQ + } + switch typ := expr.lhs.Type().(type) { + case *parser.DataTypeID: + if strings.EqualFold(lhs.columnName, "_id") { + return nil, sql3.NewErrInvalidColumnInFilterExpression(0, 0, "_id", "is/is not null") + } + return nil, sql3.NewErrInvalidTypeInFilterExpression(0, 0, typ.TypeName(), "is/is not null") + + case *parser.DataTypeInt, *parser.DataTypeDecimal, *parser.DataTypeTimestamp: + return &pql.Call{ + Name: "Row", + Args: map[string]interface{}{ + lhs.columnName: &pql.Condition{ + Op: pqlOp, + Value: nil, + }, + }, + }, nil + + default: + return nil, sql3.NewErrInvalidTypeInFilterExpression(0, 0, typ.TypeName(), "is/is not null") + } + case parser.BETWEEN, parser.NOTBETWEEN: return nil, sql3.NewErrInternal("BETWEEN operator is not supported") diff --git a/sql3/planner/opgroupby.go b/sql3/planner/opgroupby.go index 86ef5eb6d..c5e796350 100644 --- a/sql3/planner/opgroupby.go +++ b/sql3/planner/opgroupby.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "hash/maphash" - "log" "github.com/featurebasedb/featurebase/v3/errors" "github.com/featurebasedb/featurebase/v3/sql3" @@ -336,6 +335,5 @@ func groupingKeyHash(ctx context.Context, groupByExprs []types.PlanExpression, r rowKeys[i] = v } result := hash.Sum64() - log.Printf("Hash %v, %v", result, rowKeys) return result, rowKeys, nil } diff --git a/sql3/sql_definitions_test.go b/sql3/sql_definitions_test.go index 2e99dc623..12f2e987c 100644 --- a/sql3/sql_definitions_test.go +++ b/sql3/sql_definitions_test.go @@ -316,6 +316,9 @@ var tableTests []tableTest = []tableTest{ nullTests, notNullTests, + //null filter tests + nullFilterTests, + //between tests betweenTests, notBetweenTests, diff --git a/sql3/sql_defs_null_test.go b/sql3/sql_defs_null_test.go index 89a4c4476..c55b2cda6 100644 --- a/sql3/sql_defs_null_test.go +++ b/sql3/sql_defs_null_test.go @@ -1,6 +1,6 @@ package sql3_test -//NULL tests +// NULL tests var nullTests = tableTest{ table: tbl( "null_all_types", @@ -144,7 +144,7 @@ var nullTests = tableTest{ }, } -//NOT NULL tests +// NOT NULL tests var notNullTests = tableTest{ table: tbl( "not_null_all_types", @@ -275,3 +275,172 @@ var notNullTests = tableTest{ }, }, } + +// NULL filter condition tests +var nullFilterTests = tableTest{ + table: tbl( + "null_filter_all_types", + srcHdrs( + srcHdr("_id", fldTypeID), + srcHdr("i", fldTypeInt, "min 0", "max 1000"), + srcHdr("i1", fldTypeInt, "min 0", "max 1000"), + srcHdr("b1", fldTypeBool), + srcHdr("d1", fldTypeDecimal2), + srcHdr("id1", fldTypeID), + srcHdr("ids1", fldTypeIDSet), + srcHdr("s1", fldTypeString), + srcHdr("ss1", fldTypeStringSet), + srcHdr("t1", fldTypeTimestamp), + ), + srcRows( + srcRow(int64(1), int64(1), nil, nil, nil, nil, nil, nil, nil, nil), + srcRow(int64(2), int64(1), int64(10), bool(true), float64(10), int64(20), []int64{101}, string("foo"), []string{"GET", "POST"}, knownTimestamp()), + ), + ), + sqlTests: []sqlTest{ + { + sqls: sqls( + "select _id from null_filter_all_types where _id is null", + ), + expErr: "'_id' column cannot be used in a is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where _id is not null", + ), + expErr: "'_id' column cannot be used in a is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where i1 is null", + ), + expHdrs: hdrs( + hdr("_id", fldTypeID), + ), + expRows: rows( + row(int64(1)), + ), + compare: compareExactUnordered, + }, + { + sqls: sqls( + "select _id from null_filter_all_types where i1 is not null", + ), + expHdrs: hdrs( + hdr("_id", fldTypeID), + ), + expRows: rows( + row(int64(2)), + ), + compare: compareExactUnordered, + }, + { + sqls: sqls( + "select _id from null_filter_all_types where b1 is null", + ), + expErr: "unsupported type 'BOOL' for is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where b1 is not null", + ), + expErr: "unsupported type 'BOOL' for is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where d1 is null", + ), + expHdrs: hdrs( + hdr("_id", fldTypeID), + ), + expRows: rows( + row(int64(1)), + ), + compare: compareExactUnordered, + }, + { + sqls: sqls( + "select _id from null_filter_all_types where d1 is not null", + ), + expHdrs: hdrs( + hdr("_id", fldTypeID), + ), + expRows: rows( + row(int64(2)), + ), + compare: compareExactUnordered, + }, + { + sqls: sqls( + "select _id from null_filter_all_types where id1 is null", + ), + expErr: "unsupported type 'ID' for is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where id1 is not null", + ), + expErr: "unsupported type 'ID' for is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where ids1 is null", + ), + expErr: "unsupported type 'IDSET' for is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where ids1 is not null", + ), + expErr: "unsupported type 'IDSET' for is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where s1 is null", + ), + expErr: "unsupported type 'STRING' for is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where s1 is not null", + ), + expErr: "unsupported type 'STRING' for is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where ss1 is null", + ), + expErr: "unsupported type 'STRINGSET' for is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where ss1 is not null", + ), + expErr: "unsupported type 'STRINGSET' for is/is not null filter expression", + }, + { + sqls: sqls( + "select _id from null_filter_all_types where t1 is null", + ), + expHdrs: hdrs( + hdr("_id", fldTypeID), + ), + expRows: rows( + row(int64(1)), + ), + compare: compareExactUnordered, + }, + { + sqls: sqls( + "select _id from null_filter_all_types where t1 is not null", + ), + expHdrs: hdrs( + hdr("_id", fldTypeID), + ), + expRows: rows( + row(int64(2)), + ), + compare: compareExactUnordered, + }, + }, +} From cb0f84defad94de7554f09892c682dec287b6597 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula <85502298+pokeeffe-molecula@users.noreply.github.com> Date: Thu, 27 Oct 2022 14:29:10 -0500 Subject: [PATCH 09/10] added a test to cover the keyword replace as being synonymous with insert (#2261) --- sql3/sql_definitions_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sql3/sql_definitions_test.go b/sql3/sql_definitions_test.go index 12f2e987c..53089a811 100644 --- a/sql3/sql_definitions_test.go +++ b/sql3/sql_definitions_test.go @@ -375,6 +375,15 @@ var insertTest = tableTest{ expRows: rows(), compare: compareExactUnordered, }, + { + // Replace + sqls: sqls( + "replace into testinsert (_id, a, b, s, bl, d, event, ievent) values (4, 40, 400, 'foo', false, 10.12, ['A', 'B', 'C'], [1, 2, 3])", + ), + expHdrs: hdrs(), + expRows: rows(), + compare: compareExactUnordered, + }, { // Insert with nulls sqls: sqls( From dd06c77cb9db55fdd216932627f18cada4ae6441 Mon Sep 17 00:00:00 2001 From: Stephanie Yang Date: Thu, 27 Oct 2022 15:57:53 -0500 Subject: [PATCH 10/10] update molecula references to featurebase (#2262) --- lattice/public/favicon.ico | Bin 15406 -> 15086 bytes lattice/public/favicon.png | Bin 8182 -> 1207 bytes lattice/public/favicon.svg | 7 ---- lattice/public/index.html | 3 +- lattice/public/manifest.json | 4 +- lattice/src/App/AuthFlow/AuthFlow.module.scss | 2 +- lattice/src/App/AuthFlow/Signin.tsx | 4 +- .../Home/ClusterHealth/Metrics/Metrics.tsx | 2 +- lattice/src/App/Home/Home.tsx | 4 +- .../QueryBuilder/QueryBuilderContainer.tsx | 2 +- lattice/src/assets/darkTheme/MoleculaBug.svg | 1 - lattice/src/assets/darkTheme/MoleculaLogo.svg | 1 - .../src/assets/darkTheme/featurebase-logo.svg | 1 + lattice/src/assets/featurebase-icon.svg | 1 + lattice/src/assets/lightTheme/MoleculaBug.svg | 1 - .../src/assets/lightTheme/MoleculaLogo.svg | 1 - .../assets/lightTheme/featurebase-logo.svg | 1 + lattice/src/assets/m-bug-alt.svg | 16 -------- lattice/src/lattice.config.js | 4 +- lattice/src/shared/Header/Header.tsx | 34 ++++++++--------- lattice/yarn.lock | 35 ++++++++++++------ 21 files changed, 55 insertions(+), 69 deletions(-) mode change 100755 => 100644 lattice/public/favicon.ico delete mode 100644 lattice/public/favicon.svg delete mode 100644 lattice/src/assets/darkTheme/MoleculaBug.svg delete mode 100644 lattice/src/assets/darkTheme/MoleculaLogo.svg create mode 100644 lattice/src/assets/darkTheme/featurebase-logo.svg create mode 100644 lattice/src/assets/featurebase-icon.svg delete mode 100644 lattice/src/assets/lightTheme/MoleculaBug.svg delete mode 100644 lattice/src/assets/lightTheme/MoleculaLogo.svg create mode 100644 lattice/src/assets/lightTheme/featurebase-logo.svg delete mode 100644 lattice/src/assets/m-bug-alt.svg diff --git a/lattice/public/favicon.ico b/lattice/public/favicon.ico old mode 100755 new mode 100644 index 2fc5595e14938b345ae0171a4db907f84c177926..7e53bed5eb6c61b4c6b9f9392189f244380bbebc GIT binary patch literal 15086 zcmeI235*j}9ES&2TsaE};SktO(0~yLnxGhtf*K)+2cQuYkr3oaP|=7Q#q0_K9w>=` zCLSDe#QPv35(!5{Fe*V5Of(9}#ux?N<&xso9lu}O=}u=m?M!K_l9}Y|yZ+a_dGqGY zn;J$Vqr~Xb#~>{?Uc1mRE;9_HygX5EWf=RYYelN|sb?F;JOp|mgNiW$R3AGoh$q2s z&;vma1U(S+K+pqcN)PN@H>?qq0#CsF9N0QbcJpH`ZY7;P>UzOK*a&aJSZI=~Uvyi; zov;#CzyxTSt3BzVuNWVP)i4JxPSp1&zXwbk5%QAteJ#)l!77M?WwVz2i_komb3jiq zeg~F4rQgC}*x;zQWPYYz%P3z5I@g2F-?C$+r>Gm_%NWAwoD1)zu_wEqz!8_WKdB#* zgTH%S?8)Ea9PD*LZ=Z`z^~rB8ZMx%HeG|0lMex=c4*^y!u486MO^qxRuv+ejb{7wPlw> zuOqw)$3XENg=KKQ-Xm1M-!bi~CgMG!Q`Ct;XgSZkQ!`EjO|_Sn4Sv2_g`Ph(Tp((|0*(N|M! zZb{=y=b`y*oEJNG8FXg2*ptl#cG=U-V^3?4jV}J8)aUYC%JiIGa=I})^@&kyR_C}; zS@-pDr+l_DI!j#aY29*1HhsVC*z63t2Q*%s=P}ohJ@hpXf1bvU>}svq#*aO(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nlndBj<}Nd% z#>a#aZOI4P+{*D19F`1?}5u=r6-w~#_3_yH((LjkqI1qmZ)J#d$eE; znIUh*(-2tMHoa!US097_Gt5f=I{9iHEK6>Y6Plr~|O;?1-yEZXS;puu! zg;W(^cHIG!z%7Ym*rK9Yvl0VWLj1=+ALDa^FgxqxaJm*;7n7OBV$U9?<}<+cins;t zB9xGJz^Z8lq(rY;k~{(iodi9&ONf!2hZ3Q1`Nx=Yb2V#wbQ-S7+Ipw7<9>X-%tw-Jr_5=HYa&h*u#;t7eprg?6qVitB<;yMzmZU|d)@^&S^XiAkSHWSQ)G-ajI5M<2! zbzE8ji0#9mpHkxkgQbG>Q$l6IsgdTgDV!-Hmim%H4ynli$)HT9>^dWEFSW1l7va3ql4;NA;lLQp+XF;v zFS;!V#8Ns2!&853+_#OHr$U*mYrS|J*ko1T>^AUdIU>b^&4Nizby=WdL6vRSc9c5z zZ(L1O#!;%0x=7mm&q9DEY84f=|K}usk!GSQM1i#{f*UC`Hr}Tk!dUI5ZH%}KAC@f2 zqQ!qFh{oGwZzt$wi$?vgDC9s=2}N-m6vl82n1S@_lz;dhf1dI0REZx`kEosC;lf~o g)LM)EI^STubT@2QH`a{ajeHo8sH{k(ke=WF09pp~`~Uy| diff --git a/lattice/public/favicon.svg b/lattice/public/favicon.svg deleted file mode 100644 index c8f396a21..000000000 --- a/lattice/public/favicon.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/lattice/public/index.html b/lattice/public/index.html index 5a7acad02..32bbaaeb7 100644 --- a/lattice/public/index.html +++ b/lattice/public/index.html @@ -2,7 +2,6 @@ - - Molecula + FeatureBase diff --git a/lattice/public/manifest.json b/lattice/public/manifest.json index 1a608464d..9f1632193 100644 --- a/lattice/public/manifest.json +++ b/lattice/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "Molecula", - "name": "Molecula Demo App", + "short_name": "FeatureBase", + "name": "FeatureBase Demo App", "icons": [ { "src": "favicon.ico", diff --git a/lattice/src/App/AuthFlow/AuthFlow.module.scss b/lattice/src/App/AuthFlow/AuthFlow.module.scss index 5ac275622..2ce23015e 100644 --- a/lattice/src/App/AuthFlow/AuthFlow.module.scss +++ b/lattice/src/App/AuthFlow/AuthFlow.module.scss @@ -16,7 +16,7 @@ } .logo { - height: 85px; + height: 50px; margin: 16px; } diff --git a/lattice/src/App/AuthFlow/Signin.tsx b/lattice/src/App/AuthFlow/Signin.tsx index 4a5bb8ce2..66e863900 100644 --- a/lattice/src/App/AuthFlow/Signin.tsx +++ b/lattice/src/App/AuthFlow/Signin.tsx @@ -2,7 +2,7 @@ import Card from '@material-ui/core/Card'; import CardContent from '@material-ui/core/CardContent'; import CardHeader from '@material-ui/core/CardHeader'; -import { ReactComponent as MLogo } from 'assets/m-bug-alt.svg'; +import { ReactComponent as FeatureBaseIcon } from 'assets/featurebase-icon.svg'; import css from './AuthFlow.module.scss'; import SignInButton from './SignInButton'; @@ -20,7 +20,7 @@ function Signin(props) {
- +
{renderLoginForm()}
diff --git a/lattice/src/App/Home/ClusterHealth/Metrics/Metrics.tsx b/lattice/src/App/Home/ClusterHealth/Metrics/Metrics.tsx index e2d3a5229..40df99384 100644 --- a/lattice/src/App/Home/ClusterHealth/Metrics/Metrics.tsx +++ b/lattice/src/App/Home/ClusterHealth/Metrics/Metrics.tsx @@ -239,7 +239,7 @@ export const Metrics: FC = ({ open, node, onClose }) => {
- Molecula provides metrics for use with Prometheus. Instantaneous + FeatureBase provides metrics for use with Prometheus. Instantaneous metrics are shown here for convenience; to take full advantage of this feature, consider using a Prometheus instance, perhaps with a{' '} ( Try FeatureBase Cloud at - - app.molecula.cloud + + cloud.featurebase.com diff --git a/lattice/src/App/QueryBuilder/QueryBuilderContainer.tsx b/lattice/src/App/QueryBuilder/QueryBuilderContainer.tsx index 3f7afb292..a2dacce41 100644 --- a/lattice/src/App/QueryBuilder/QueryBuilderContainer.tsx +++ b/lattice/src/App/QueryBuilder/QueryBuilderContainer.tsx @@ -113,7 +113,7 @@ export const QueryBuilderContainer = () => { type: 'text/plain;charset=utf-8', }); element.href = URL.createObjectURL(file); - element.download = `molecula-${results?.index}-${dateTime}.csv`; + element.download = `featurebase-${results?.index}-${dateTime}.csv`; document.body.appendChild(element); element.click(); exportRows = []; diff --git a/lattice/src/assets/darkTheme/MoleculaBug.svg b/lattice/src/assets/darkTheme/MoleculaBug.svg deleted file mode 100644 index b52c8e27d..000000000 --- a/lattice/src/assets/darkTheme/MoleculaBug.svg +++ /dev/null @@ -1 +0,0 @@ -MoleculaBug diff --git a/lattice/src/assets/darkTheme/MoleculaLogo.svg b/lattice/src/assets/darkTheme/MoleculaLogo.svg deleted file mode 100644 index ae3bdaac0..000000000 --- a/lattice/src/assets/darkTheme/MoleculaLogo.svg +++ /dev/null @@ -1 +0,0 @@ -Molecula Logo diff --git a/lattice/src/assets/darkTheme/featurebase-logo.svg b/lattice/src/assets/darkTheme/featurebase-logo.svg new file mode 100644 index 000000000..0f388dd15 --- /dev/null +++ b/lattice/src/assets/darkTheme/featurebase-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/lattice/src/assets/featurebase-icon.svg b/lattice/src/assets/featurebase-icon.svg new file mode 100644 index 000000000..6510e5e7e --- /dev/null +++ b/lattice/src/assets/featurebase-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/lattice/src/assets/lightTheme/MoleculaBug.svg b/lattice/src/assets/lightTheme/MoleculaBug.svg deleted file mode 100644 index e37ef93b4..000000000 --- a/lattice/src/assets/lightTheme/MoleculaBug.svg +++ /dev/null @@ -1 +0,0 @@ -MoleculaBug diff --git a/lattice/src/assets/lightTheme/MoleculaLogo.svg b/lattice/src/assets/lightTheme/MoleculaLogo.svg deleted file mode 100644 index 0a5159864..000000000 --- a/lattice/src/assets/lightTheme/MoleculaLogo.svg +++ /dev/null @@ -1 +0,0 @@ -Molecula Logo diff --git a/lattice/src/assets/lightTheme/featurebase-logo.svg b/lattice/src/assets/lightTheme/featurebase-logo.svg new file mode 100644 index 000000000..1d5da210c --- /dev/null +++ b/lattice/src/assets/lightTheme/featurebase-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/lattice/src/assets/m-bug-alt.svg b/lattice/src/assets/m-bug-alt.svg deleted file mode 100644 index a0cc81bc1..000000000 --- a/lattice/src/assets/m-bug-alt.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/lattice/src/lattice.config.js b/lattice/src/lattice.config.js index 2ab3f6fa3..53b84a536 100644 --- a/lattice/src/lattice.config.js +++ b/lattice/src/lattice.config.js @@ -1,4 +1,4 @@ export const pilosaConfig = { - // hostname: 'localhost', - // httpPort: '10101' + hostname: 'localhost', + httpPort: '10101' }; diff --git a/lattice/src/shared/Header/Header.tsx b/lattice/src/shared/Header/Header.tsx index b32e72e63..e0a609140 100644 --- a/lattice/src/shared/Header/Header.tsx +++ b/lattice/src/shared/Header/Header.tsx @@ -1,17 +1,17 @@ -import SignOutButton from "App/AuthFlow/SignOutButton"; -import { ReactComponent as MoleculaLogoDark } from "assets/darkTheme/MoleculaLogo.svg"; -import { ReactComponent as MoleculaLogo } from "assets/lightTheme/MoleculaLogo.svg"; -import { FC } from "react"; -import { Link } from "react-router-dom"; -import { useAuth } from "services/useAuth"; -import { ThemeToggle } from "shared/ThemeToggle"; +import SignOutButton from 'App/AuthFlow/SignOutButton'; +import { ReactComponent as FeatureBaseLogoDark } from 'assets/darkTheme/featurebase-logo.svg'; +import { ReactComponent as FeatureBaseLogo } from 'assets/lightTheme/featurebase-logo.svg'; +import { FC } from 'react'; +import { Link } from 'react-router-dom'; +import { useAuth } from 'services/useAuth'; +import { ThemeToggle } from 'shared/ThemeToggle'; -import AppBar from "@material-ui/core/AppBar"; -import Button from "@material-ui/core/Button"; -import { useTheme } from "@material-ui/core/styles"; -import Toolbar from "@material-ui/core/Toolbar"; +import AppBar from '@material-ui/core/AppBar'; +import Button from '@material-ui/core/Button'; +import { useTheme } from '@material-ui/core/styles'; +import Toolbar from '@material-ui/core/Toolbar'; -import css from "./Header.module.scss"; +import css from './Header.module.scss'; type HeaderProps = { onToggleTheme: () => void; @@ -19,7 +19,7 @@ type HeaderProps = { export const Header: FC = ({ onToggleTheme }) => { const theme = useTheme(); - const isDark = theme.palette.type === "dark"; + const isDark = theme.palette.type === 'dark'; const auth = useAuth(); return ( @@ -32,8 +32,8 @@ export const Header: FC = ({ onToggleTheme }) => {
- {!isDark && } - {isDark && } + {!isDark && } + {isDark && }
@@ -50,8 +50,8 @@ export const Header: FC = ({ onToggleTheme }) => { {auth.user && (