Comments (10)
Here there is a bug, because max should also work on sequences of strings.
from rumble.
Then there are two bugs: the one with max on strings and the bug that I reported.
When you run the first of the two queries, Sparksoniq enters into an invalid state, in which no query cannot be evaluated anymore.
from rumble.
To summarize, there are thus three bugs:
- max with strings
- implement the head function
- investigate why queries stop working after an invalid state is reached
from rumble.
Note: head() should work like count() as recently implemented by Can, i.e., if the parameter is an RDD, it should invoke first(). If it is not, it should materialize the input and count locally.
from rumble.
I have tried recreating the mentioned problem with the given query in my local environment with the sample json dataset. When I ran the two queries shown in bold below in succession, the program didn't enter an invalid state and results were returned correctly. Do you have any suggestions on what might be causing the invalid state or how I can trigger it?
jiqs$ for $o in json-file("./src/main/resources/queries/confusion_sample.json")
where $o.date eq max(for $o in json-file("./src/main/resources/queries/confusion_sample.json") return $o.date)
return $o
[ERROR] Job aborted due to stage failure: Task 0 in stage 0.0 failed 1 times, most recent failure: Lost task 0.0 in stage 0.0 (TID 0, localhost, executor driver): sparksoniq.exceptions.UnexpectedTypeException: Error [err: XPTY0004]LINE:2:COLUMN:17:Max expression has non numeric args 2013-08-19
jiqs$ for $o in json-file("./src/main/resources/queries/confusion_sample.json")
where $o.guess eq "Dinka"
return $o
{ "date" : "2013-08-19", "country" : "AU", "guess" : "Dinka", "choices" : [ Danish, Dinka, Khmer, Lao ], "sample" : "af5e8f27cef9e689a070b8814dcc02c3", "target" : "Dinka" }
{ "date" : "2013-08-19", "country" : "AU", "guess" : "Dinka", "choices" : [ Amharic, Dinka, Mandarin, Yiddish ], "sample" : "cd3dffdb83f221e09710cbfbcaffdb31", "target" : "Dinka" }
{ "date" : "2013-08-19", "country" : "AU", "guess" : "Dinka", "choices" : [ Amharic, Arabic, Dinka, Samoan ], "sample" : "509c36eb58dbce009ccf93f375358d53", "target" : "Samoan" }
{ "date" : "2013-08-20", "country" : "AU", "guess" : "Dinka", "choices" : [ Dinka, Korean, Swedish, Thai ], "sample" : "0f8e6818d2be77b75712bc9ea4e87171", "target" : "Korean" }
{ "date" : "2013-08-20", "country" : "AU", "guess" : "Dinka", "choices" : [ Dinka, Malayalam, Sinhalese, Ukrainian ], "sample" : "73a09a8879e70e8648d7d75d656a5b79", "target" : "Malayalam" }
{ "date" : "2013-08-20", "country" : "AU", "guess" : "Dinka", "choices" : [ Dinka, Malayalam, Tamil, Urdu ], "sample" : "cc305dcad696147e28c6f36615aa0952", "target" : "Tamil" }
{ "date" : "2013-08-20", "country" : "AU", "guess" : "Dinka", "choices" : [ Bulgarian, Dinka, French, Khmer ], "sample" : "69a5c674fe40942aaae4d10c9df46ee0", "target" : "Bulgarian" }
from rumble.
Max with strings implemented.
head function implemented (without RDD support, issue opened for this)
I couldn't recreate the invalid state with the queries I've given above. Any tips on how they can be reached or can we close this issue?
from rumble.
I think the invalid state only happens when a query has a nested FLWOR. I would simply close because we will take care of it later.
from rumble.
I cannot reproduce it myself anymore with the 0.9.4 release.
from rumble.
I tried version 0.9.2 as well and cannot reproduce it there either. Sorry that I didn't document better how to reproduce it.
from rumble.
@CanBerker I think we should go ahead and merge.
from rumble.
Related Issues (20)
- Out of memory error when summing large sequence HOT 5
- Offer: Install-Script for Linux HOT 4
- optimization issue of count after group by HOT 13
- Non-local variables from let clauses are missing in subsequent for clauses HOT 3
- Join detected by where clauses incorrectly HOT 3
- Read context item from standard input
- Behavior of RumbleDB shell when users press Ctrl+C
- Accumulate prologs in Jupyter notebook
- Fall back to CLI parameters in server mode when unspecified as URL query parameters
- Dependency AVG is not supported yet.
- HTTP Parameters HOT 1
- Running Rumble with Docker on M1 doesn't seem to work HOT 2
- Whitespace in working directory causes crash HOT 3
- Overoptimization of variable dependencies HOT 1
- Dependency org.yaml:snakeyaml, leading to CVE problem
- Use static types instead of context-generated types for native SQL queries
- Memory Issue HOT 1
- Problem on Windows reading multiple files at once.
- materialization cap question
- "An error has occured" selection clause
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rumble.