Coder Social home page Coder Social logo

Comments (5)

shrinidhijoshi avatar shrinidhijoshi commented on June 26, 2024 2

@shrinidhijoshi Shrinidhi, do you happen to know why 'native_execution_enabled' was added as a session property and not just config property. I'm starting to remember that it is somehow difficult to change config properties when launching PoS queries. Did we make this a session property to allow switching between PoS and PoS-on-Velox easily?

@mbasmanova Yes. That would be my best guess too. As at the time of PoC, internally at Meta, there wasn't any way to pass config props at invocation time for PoS queries.
Later however, we added a mode=NATIVE_EXECUTION option which we can use now, and deprecate this session prop.

Also, maybe all of these should change to config prop

    public static final String NATIVE_EXECUTION_ENABLED = "native_execution_enabled";
    public static final String NATIVE_EXECUTION_EXECUTABLE_PATH = "native_execution_executable_path";
    public static final String NATIVE_EXECUTION_PROGRAM_ARGUMENTS = "native_execution_program_arguments";
    public static final String NATIVE_EXECUTION_PROCESS_REUSE_ENABLED = "native_execution_process_reuse_enabled";
    public static final String NATIVE_DEBUG_VALIDATE_OUTPUT_FROM_OPERATORS = "native_debug_validate_output_from_operators";

from presto.

mbasmanova avatar mbasmanova commented on June 26, 2024 1

Outside of PoS, this session property is used in 3 optimizer rules

  • PushPartialAggregationThroughExchange
  • AddLocalExchanges
  • AddExchanges

and SqlToRowExpressionTranslator.

None of these have direct access to FeaturesConfig (which is needed to fetch configuration property value).

All these rules are created in com/facebook/presto/sql/planner/PlanOptimizers.java which can inject FeaturesConfig and get access to the property. It can then pass the value to rule's constructors.

SqlToRowExpressionTranslator is called from many places and these places themselves do not have access to FeaturesConfig (e.g. StatementAnalyzer, QueryPlanner, etc.). It would require a good amount of plumbing to make this flag available.

@tdcmeehan @arhimondr Tim, Andrii, do you have any suggestion about how to best approach this?

from presto.

mbasmanova avatar mbasmanova commented on June 26, 2024

CC: @amitkdutta @spershin @gggrace14 @kewang1024 @pranjalssh

from presto.

mbasmanova avatar mbasmanova commented on June 26, 2024

@shrinidhijoshi Shrinidhi, do you happen to know why 'native_execution_enabled' was added as a session property and not just config property. I'm starting to remember that it is somehow difficult to change config properties when launching PoS queries. Did we make this a session property to allow switching between PoS and PoS-on-Velox easily?

CC: @arhimondr

from presto.

mbasmanova avatar mbasmanova commented on June 26, 2024

Possibly related issue: #20008

from presto.

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.