Code Monkey home page Code Monkey logo

Comments (7)

alamb avatar alamb commented on September 22, 2024 1

@jayzhan211 asks #10374 (comment)

@alamb Do you think we should also rewrite the array operator to function in parser step? It is currently in optimizer step. I think the downside of moving array rewrite in parser step is that if any user expects different array function with the same syntax, then they can't do it since we don't have "user-defined" parser mechanism now. But the benefit is that we can eliminate intermediate binary expression.

The array operator to function is syntax like array1 || array2 -> array_concat, which is in ArrayFunctionRewriter now, so I'm thinking about whether we should move this to the parser or not.

I personally think moving the translation of array1 || array --> array_concat to the parser is a better idea as it will be more efficient than trying to rewrite an expr after the fact

from arrow-datafusion.

jayzhan211 avatar jayzhan211 commented on September 22, 2024 1

I rethought the issue in #10102, and I found it is strongly related to the idea of the user-defined parser mentioned here, that we can define the returned Expr given the registered function.

from arrow-datafusion.

alamb avatar alamb commented on September 22, 2024 1

#11180 -- looking very nice

from arrow-datafusion.

alamb avatar alamb commented on September 22, 2024

In general, I think the idea of allowing users to customize the behavior of the sql planner is reasonable. However I am not entirely sure if we need to modify the planner itself, or if it would be a better approach for users to implement rewrite passes after the existing planner runs 🤔

from arrow-datafusion.

alamb avatar alamb commented on September 22, 2024

For anyone following along, @samuelcolvin @jayzhan211 and myself are discussing proposals for this API in

#11137 and #11168

from arrow-datafusion.

jayzhan211 avatar jayzhan211 commented on September 22, 2024

To rewrite with sql planner

  • date_part
  • create_struct
  • create_named_struct
  • sql_overlay_to_expr
  • sql_position_to_expr
  • sql_substring_to_expr
  • sql_compound_identifier_to_expr

from arrow-datafusion.

alamb avatar alamb commented on September 22, 2024

I filed #11207 to track the work to move the remaining functions to the user defined extension planner so closing this one

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.