-
Notifications
You must be signed in to change notification settings - Fork 32
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
Capture err #13
Capture err #13
Conversation
Error 1/3
The |
Error 2/3{
"batchSize":20480,
"columns":["__time","channel","cityName","comment","count","countryIsoCode","diffUrl","flags","isAnonymous","isMinor","isNew","isRobot","isUnpatrolled","metroCode","namespace","page","regionIsoCode","regionName","sum_added","sum_commentLength","sum_deleted","sum_delta","sum_deltaBucket","user"],
"dataSource":{"type":"query","query":{"queryType":"scan","dataSource":{"type":"table","name":"A"},"columns":["AT"],"intervals":{"type":"intervals","intervals":["1980-06-12T22:30:00.000Z/2020-01-26T23:00:00.000Z"]}}},
"filter":{"dimension":"countryName","extractionFn":{"locale":"","type":"lower"},"type":"selector","value":"france"},
"intervals":{"type":"intervals","intervals":["1980-06-12T22:30:00.000Z/2020-01-26T23:00:00.000Z"]},
"limit":10,
"order":"descending",
"queryType":"scan"
} The above querying is failing when executed directly on Apache Druid with below error. I think this is a query error and not a bug in code. Perhaps we just need to fix this query.
|
Error 3/3{
"context":{"con":"text"},
"query":"SELECT \"__time\", \"channel\", \"cityName\", \"comment\", \"count\", \"countryIsoCode\", \"countryName\", \"diffUrl\", \"flags\", \"isAnonymous\", \"isMinor\", \"isNew\", \"isRobot\", \"isUnpatrolled\", \"metroCode\", \"namespace\", \"page\", \"regionIsoCode\", \"regionName\", \"sum_added\", \"sum_commentLength\", \"sum_deleted\", \"sum_delta\", \"sum_deltaBucket\", \"user\"\nFROM \"wikipedia\"\nWHERE \"countryName\" = 'France'\nLIMIT 10",
"queryType":"sql",
"resultFormat":"array",
"header": true
} The above is failing with the below error when executed on Druid Query composer, possibly a query error.
|
examples/fromjson/main.go
Outdated
spew.Dump(q) | ||
_, err = d.Query().Execute(q, &results) | ||
if err != nil { | ||
log.Fatalf("Load failed, %s (query: %s)", err, string(qry)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe great to distinguish that case with a message like "Execute failed", %s (query : %s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which case are you talking about? I didn't get the context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nm.. i got it now, i will fix the comment 😄
This works well. The SQL type is not a JSON query for Druid, it's managed that way by this library but at the end it submits the query to the dedicated SQL service https://druid.apache.org/docs/latest/querying/sql.html#http-post
|
This query must have never worked indeed. Introduced here: 4995687#diff-7c1b8c5172fe7687c2af90f55f18e7e5eacf13af953ccc2bbeb5de3fa56e2688R25 Probably used only to debug the object model of the query (specific to circular dependency) rather than for getting results. We should fix it so it is valid and return results but still test the sub-query case |
@vigith / @jbguerraz - Did we fix the issue with #15 ? I'm not clear on the approach I should take to make this work, Can you help here? |
fixes #11
There are 3 queries that are failing which I have commented out. We might have to tackle using a different PR.