Git Product home page Git Product logo

Comments (7)

juanignaciosl avatar juanignaciosl commented on July 18, 2024 1

@rochoa, I think that you're aware of this, but we need a plan for this, because it's a blocker for DO through CartoDB/bigmetadata/issues/227.

As this is a blocker, if we can't do it, we'll have to do a workaround either by doing an extra request from Builder and passing type parameters, or hardcoding the known types. Both solutions are not desiderable, though. We think that the best approach for the problem would be allowing execution of arbitrary SQL, as the issue says. We'd like to know if engine team can address this, or at least help @ethervoid or @javitonino with it so we can fix it by ourselves.

cc @jorgesancha @noguerol

from camshaft.

rochoa avatar rochoa commented on July 18, 2024 1

Just to be clear: this issue will track and solve the situation with CartoDB/bigmetadata#227. So it is possible to retrieve some required metadata or do basic queries to prepare the node to be executed.

However, the validation of geometries cannot happen at the node creation phase, as this a hot execution path. For that, the work @ethervoid is doing in #317 is better suited.

I'm gonna update the title for this issue accordingly.

from camshaft.

ethervoid avatar ethervoid commented on July 18, 2024

I've asked @dgaubert about some doubts and we've been talking about this change. He made a very important point which is that the code executed in camshaft in the node creation is going to affect the instantiation map time.

So if we make queries or operations that could be a bit heavy, we're going to introduce an overhead in the map instantiation time (and we don't want that)

For me we are able to overcome this situation with two measures:

  • Include a column_types here or make the column_names a tuple with name/type
  • For the validation pre-check we have two options:
    • Add a new object precheckQuery in the node options and call it here. This let us return an error message through an exception
    • Include the pre-check here and raise and the exception that rollback the transaction.

To avoid include something new that seems to be unused, I'll try to inject the query inside the current DO query (option 2)

What do you think @javitonino @rochoa?

from camshaft.

javitonino avatar javitonino commented on July 18, 2024

Oh, I think we were talking about option 2a all the time. Meaning adding a new hook to the node, and calling it during the node execution.

from camshaft.

ethervoid avatar ethervoid commented on July 18, 2024

But this only allows SQL code, nothing more and you can't get the data returned by that query so is a bit useless to include it there. Could be great to abstract the pre-check from the main query but that's all.

from camshaft.

ethervoid avatar ethervoid commented on July 18, 2024

I have some kind of PoC working.

For camshaft I've done this and I have a precheck function in dataservices like this

Here is an example of an error:

captura de pantalla 2017-08-02 18 39 20 2

from camshaft.

Algunenano avatar Algunenano commented on July 18, 2024

Done in #323

from camshaft.

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.