Giter Club home page Giter Club logo

Comments (7)

phughk avatar phughk commented on May 18, 2024 2

This falls out of my scope, but being aware of how many times I have tagged - assigning to myself. Going to bring up in next eng meet about how we spread and prioritise workload.

For the ticket: It would seem that there is processing on the document, but I don't understand how that would happen since deletes don't really process the document. @DelSkayn if you have any input that would be appreciated!

from surrealdb.

DelSkayn avatar DelSkayn commented on May 18, 2024 1

I am looking into this but I am currently getting a different error. I downloaded the surreal deal dataset and imported it successfully. I am however facing an issue the order relation. All orders are related via a order record id which consists of a country and seemingly a datetime. However the datetime is in the form of 2023-01-04T03:55:50.718612. This is an invalid datetime as it is missing a timezone. So the current error I am getting is that 2023-01-04T03:55:50.718612 can't be converted to a datetime.

from surrealdb.

LucyEgan avatar LucyEgan commented on May 18, 2024

Ive noticed errors during deletes because of futures/events that are getting fired that are now invalid based on the calculation of the deleted data.
Mine was a event that accessed $after.field, and that field was a future that became "broken" from the DELETE, so it was a underlying query not the actual DELETE that was erroring.

Is this related to those records that cause issues? (not got access to surreal to test currently)

from surrealdb.

AlexFrid avatar AlexFrid commented on May 18, 2024

So the current error I am getting is that 2023-01-04T03:55:50.718612 can't be converted to a datetime.

Interesting, once I upgraded to v1.1 I also get that error 🤔

from surrealdb.

DelSkayn avatar DelSkayn commented on May 18, 2024

The datetime error seems to be a different error: Previously there was some dubious behavior when parsing date-times. If only a part of the string matched a datetime it would still parse the datetime. so 2012-04-23blablabla would parse the 2012-04-23 part and ignore the blablabla. So with 2012-04-23T18:25:43.5110000 it fails to parse the full datetime since the time zone is missing and therefore would only parse 2012-04-23 . Now it errors instead if there is still some text left which causes the error I found.

Updating the dataset to have the correct datetimes makes the multiplication error return.

from surrealdb.

DelSkayn avatar DelSkayn commented on May 18, 2024

I believe this issue can be closed. The problem seemed to be inside one of the queries where it would try to multiply a number times a null because of a missing else branch so the error message was actually correct.

We still have a problem that the error message here is not that useful but that should probably be a different issue.

from surrealdb.

DelSkayn avatar DelSkayn commented on May 18, 2024

For those interested what the actual problem was, in the sureal-deal dataset there was the query:

DEFINE TABLE daily_sales SCHEMALESS AS 
    SELECT count() AS number_of_orders, 
        time::format(<datetime> order_date, '%Y-%m-%d') AS day, 
        math::sum((price * IF discount = NONE THEN 1 END) * quantity) AS sum_sales, 
        currency FROM order GROUP BY day, currency;

Which should have been:

DEFINE TABLE daily_sales SCHEMALESS AS 
    SELECT count() AS number_of_orders, 
        time::format(<datetime> order_date, '%Y-%m-%d') AS day, 
        math::sum((price * IF discount = NONE THEN 1 ELSE discount END) * quantity) AS sum_sales, 
        currency FROM order GROUP BY day, currency;

from surrealdb.

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.