Git Product home page Git Product logo

Comments (3)

alamb avatar alamb commented on June 24, 2024 1

Seems like a good idea to me

from arrow-datafusion.

hveiga avatar hveiga commented on June 24, 2024

I spent some time looking into how to implement this. I have a very basic change that I think would bring the functionality:

main...hveiga:datafusion:issue-10971

I am looking for guidance on two aspects:

  • Where is there best place in the code base to add a test case for this?
  • If we want to allow to pass this flag as part of the COPY command (ie COPY (...) TO (...) STORED AS FILE_FORMAT (OPTIONS keep_partition_by_columns true)), what would be the right way to pass this flag to hive_style_partitions_demuxer?

I see that sql/src/parser.rs can parse the option and keep it the CopyTo struct under options, and then those get used to configure the different FormatOptions for the different output formats. This particular flag would apply to all formats I believe. Should I add it as another config to TableOptions ?

Thanks!

from arrow-datafusion.

devinjdangelo avatar devinjdangelo commented on June 24, 2024

Where is there best place in the code base to add a test case for this?

sqllogictests are a good place to start. You can do a COPY with partitions and the new option toggled, then create a table on just a single partition path, and do a select that verifies the partition column is in the file.

If we want to allow to pass this flag as part of the COPY command (ie COPY (...) TO (...) STORED AS FILE_FORMAT (OPTIONS keep_partition_by_columns true)), what would be the right way to pass this flag to hive_style_partitions_demuxer?

You could check for the new option in source_option_tuples and then update FileSinkConfig to hold that option and flow it through to the relevant functions. The relevant physical planner code is here

let config = FileSinkConfig {
.

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.