Skip to content

[EPIC] Improve examples to make them easier to navigate #11172

Closed

Description

@alamb

Is your feature request related to a problem or challenge?

The current number of examples in https://github.com/apache/datafusion/tree/main/datafusion-examples is somewhat overwhelming and hard to navigate

Describe the solution you'd like

I would like fewer consolidated examples. For example a sql.rs example rather than SQL examples being spread out across (at least) 9 different files

  • parqet_sql
  • parqet_sql_multiple_files
  • regexp
  • to_char
  • to_date
  • to_timestamp
  • make_date
  • avro_sql.rs

Subtasks

Describe alternatives you've considered

No response

Additional context

Also, I am trying to add some new examples, but the CI in my PR #11088 is failing due to running out of space

Example failure: https://github.com/apache/datafusion/actions/runs/9715084012/job/26815819949

  = note: /usr/bin/ld: final link failed: No space left on device
          collect2: error: ld returned 1 exit status

I think it is because each example creates its own binary which fills up the disk

Thus I also want to reduce the number of examples so I can add new ones :)

Activity

  1. added
    documentationImprovements or additions to documentation
    enhancementNew feature or request
    on Jun 28, 2024
  2. self-assigned this
    on Jun 28, 2024
  3. alamb commented on Jun 29, 2024

    @alamb
    ContributorAuthor

    While working with @lewiszlw in #11173 (comment) I think I came up with a better idea -- that is to update the user guide so they code examples are run / tested

    Then we can move many/all of the examples from rust to the user guide, which will make them easier to find and navigate. 🏃

  4. alamb commented on Jun 29, 2024

    @alamb
    ContributorAuthor

    I played around with what we have and it turns out I think we can test examples in the user guide. I made a PR with docs of how to do it: #11178

    I think with that framework we could add many of the simpler examples directly into the documentation where they would be eaiser to find. We can leave the more complex ones in datafusion-examples perhaps

    Thoughts?

  5. efredine commented on Jun 29, 2024

    @efredine
    Contributor

    As a newcomer I'll say that this seems right to me. Examples that are right in the documentation are much more discoverable.

  6. changed the title [-]Consolidate examples to make them easier to navigate[/-] [+][EPIC] Improve examples to make them easier to navigate[/+] on Jul 2, 2024
  7. removed their assignment
    on Jul 15, 2024
  8. alamb commented on Jul 15, 2024

    @alamb
    ContributorAuthor

    I plan do to this as a background task, but realistically can't devote enough focus time to it now

  9. logan-keede commented on Jan 22, 2025

    @logan-keede
    Contributor

    take

  10. alamb commented on Jan 22, 2025

    @alamb
    ContributorAuthor

    Thank you @logan-keede 🙏

    After #14240 I don't think there is any example left for consolidation that I can see

  11. logan-keede commented on Jan 23, 2025

    @logan-keede
    Contributor

    @alamb I think there is one more thing we can do, though perhaps it is only my preference.

    We can consolidate them into folders, a big sql.rs might hinder ease of navigation, but if we are going to keep adding examples it might be better to have them in a directory, we can do that for other general domains like parquet and csv too.

    Except that, I think we can close this issue.

  12. alamb commented on Jan 23, 2025

    @alamb
    ContributorAuthor

    @alamb I think there is one more thing we can do, though perhaps it is only my preference.

    We can consolidate them into folders, a big sql.rs might hinder ease of navigation, but if we are going to keep adding examples it might be better to have them in a directory, we can do that for other general domains like parquet and csv too.

    Except that, I think we can close this issue.

    I actually think keping them in a single directory, while somewhat overwhelming, is good for discoverability (aka knowing what is available) so until we get more I would recommend we keep it that way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions