Git Product home page Git Product logo

Comments (10)

ghislainfourny avatar ghislainfourny commented on May 26, 2024

Here there is a bug, because max should also work on sequences of strings.

from rumble.

ingomueller-net avatar ingomueller-net commented on May 26, 2024

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.

ghislainfourny avatar ghislainfourny commented on May 26, 2024

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.

ghislainfourny avatar ghislainfourny commented on May 26, 2024

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.

CanBerker avatar CanBerker commented on May 26, 2024

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.

CanBerker avatar CanBerker commented on May 26, 2024

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.

ghislainfourny avatar ghislainfourny commented on May 26, 2024

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.

ingomueller-net avatar ingomueller-net commented on May 26, 2024

I cannot reproduce it myself anymore with the 0.9.4 release.

from rumble.

ingomueller-net avatar ingomueller-net commented on May 26, 2024

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.

ghislainfourny avatar ghislainfourny commented on May 26, 2024

@CanBerker I think we should go ahead and merge.

from rumble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.