Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error populating query using the examples #367

Open
sianghwee opened this issue Jun 3, 2020 · 1 comment
Open

Error populating query using the examples #367

sianghwee opened this issue Jun 3, 2020 · 1 comment

Comments

@sianghwee
Copy link

Describe the bug
I was following the examples given in aresdb/examples to populate the database with the tables, data and queries. Both the table and data worked fine, but the example for the query resulted in panic: query failed with status code 400. I have attached the full error here: error.log.

To Reproduce
Follow the example code given at aresdb/examples:

  1. cd examples
  2. go build examples.go
  3. ./examples tables --dataset 1k_trips
  4. ./examples data --dataset 1k_trips
  5. ./examples query --dataset 1k_trips

Expected behavior
Expected the database to respond with the response from the queries.

Desktop (please complete the following information):

  • OS: Ubuntu 18.04.4 LTS
  • Browser: Firefox 76.0.1
  • Docker: v19.03.11
  • nvidia-docker: v19.03.11

Additional context
I am using the docker image of the AresDB.

@lee-gray
Copy link

I was seeing the same problem then noticed that the first two queries returned fine and only the 3rd one failed:

~/go/src/github.com/uber/aresdb/examples# ./examples query --dataset 1k_trips
making query total_fare ... 
{
	"results": [
		{
			"2020-08-12 05:00": 751.3237829208374,
			"2020-08-12 06:00": 687.8017654418945,
			"2020-08-12 07:00": 418.1892418861389,
			"2020-08-12 08:00": 917.4608173370361,
			"2020-08-12 09:00": 688.5783615112305,
			"2020-08-12 10:00": 782.9843788146973,
			"2020-08-12 11:00": 658.4099531173706,
			"2020-08-12 12:00": 643.7608612775803,
			"2020-08-12 13:00": 541.6034736633301,
			"2020-08-12 14:00": 494.9347426891327,
			"2020-08-12 15:00": 709.1005311012268,
			"2020-08-12 16:00": 643.4200687408447,
			"2020-08-12 17:00": 567.0114274024963,
			"2020-08-12 18:00": 956.4719915390015,
			"2020-08-12 19:00": 766.9693918228149,
			"2020-08-12 20:00": 1044.1855945587158,
			"2020-08-12 21:00": 631.0994410514832,
			"2020-08-12 22:00": 723.8907270431519,
			"2020-08-12 23:00": 839.2877159118652,
			"2020-08-13 00:00": 575.8491058349609,
			"2020-08-13 01:00": 963.8802764415741,
			"2020-08-13 02:00": 749.4545092582703,
			"2020-08-13 03:00": 816.7640795707703,
			"2020-08-13 04:00": 474.3639802932739
		}
	]
}
making query total_trips ... 
{
	"results": [
		{
			"2020-08-12 05:00": 16,
			"2020-08-12 06:00": 15,
			"2020-08-12 07:00": 7,
			"2020-08-12 08:00": 14,
			"2020-08-12 09:00": 9,
			"2020-08-12 10:00": 14,
			"2020-08-12 11:00": 12,
			"2020-08-12 12:00": 17,
			"2020-08-12 13:00": 10,
			"2020-08-12 14:00": 13,
			"2020-08-12 15:00": 12,
			"2020-08-12 16:00": 14,
			"2020-08-12 17:00": 13,
			"2020-08-12 18:00": 19,
			"2020-08-12 19:00": 16,
			"2020-08-12 20:00": 17,
			"2020-08-12 21:00": 12,
			"2020-08-12 22:00": 15,
			"2020-08-12 23:00": 16,
			"2020-08-13 00:00": 9,
			"2020-08-13 01:00": 18,
			"2020-08-13 02:00": 15,
			"2020-08-13 03:00": 15,
			"2020-08-13 04:00": 10
		}
	]
}
making query total_trips ... 
panic: query failed with status code 400

goroutine 1 [running]:
github.com/uber/aresdb/examples/utils.MakeQuery(0xc449c2, 0x9, 0x249e, 0xc000342c31, 0xb, 0xc000342c3c, 0x4, 0xc000032b20, 0x20, 0xc00042e2c0, ...)
	/root/go/src/github.com/uber/aresdb/examples/utils/example_utils.go:183 +0x715
main.queryDataSet()
	/root/go/src/github.com/uber/aresdb/examples/examples.go:37 +0x440
main.main.func3(0xc000361900, 0xc0003bd660, 0x0, 0x2)
	/root/go/src/github.com/uber/aresdb/examples/examples.go:114 +0x20
github.com/spf13/cobra.(*Command).execute(0xc000361900, 0xc0003bd600, 0x2, 0x2, 0xc000361900, 0xc0003bd600)
	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0xc000361180, 0x4, 0x2, 0xc000361900)
	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2f8
github.com/spf13/cobra.(*Command).Execute(0xc000361180, 0xc000141f70, 0x3)
	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:864 +0x2b
main.main()
	/root/go/src/github.com/uber/aresdb/examples/examples.go:119 +0x4a6

It looks like the 3rd example query is sql while the first two are aql:

~/go/src/github.com/uber/aresdb/examples/1k_trips/queries# ls
total_fare.aql  total_trips.aql  total_trips.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants