Git Product home page Git Product logo

Comments (4)

waynexia avatar waynexia commented on June 11, 2024

cc @matthewmturner and @comphead from #9793

from arrow-datafusion.

waynexia avatar waynexia commented on June 11, 2024

I have a similar pattern on implementing user defined logical plan:

https://github.com/GreptimeTeam/greptimedb/blob/4eadd9f8a88870fff72922d9c7515cf29bc790b3/src/promql/src/extension_plan/empty_metric.rs#L130-L133

where

impl UserDefinedLogicalNodeCore for EmptyMetric {
    fn name(&self) -> &str {
        Self::name()
    }
}

impl EmptyMetricExec {
    pub const fn name() -> &'static str {
        "EmptyMetric"
    }
}

from arrow-datafusion.

comphead avatar comphead commented on June 11, 2024

Thanks @waynexia could you please give an example how the static be called for different plan nodes to obtain different names?

from arrow-datafusion.

waynexia avatar waynexia commented on June 11, 2024

Thanks @waynexia could you please give an example how the static be called for different plan nodes to obtain different names?

This (old) test case can be an example: https://github.com/apache/datafusion/pull/10266/files#diff-9f1cf112a3f7c21baab307b9001331d287479e54e60b594712395052e0ad0690R935-R936

After #10266 the call to ExecutionPlan::name() is proxied to static_name() in default implementation.

from arrow-datafusion.

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.