Skip to content

feat(indexer): Rename CLI arg table-name to dataset-name for consistency; Update the name of the column metadata table name to put the dataset name first.#846

Merged
Bill-hbrhbr merged 11 commits into
y-scope:mainfrom
Bill-hbrhbr:update-indexer-table-name
Apr 25, 2025

Conversation

@Bill-hbrhbr

@Bill-hbrhbr Bill-hbrhbr commented Apr 24, 2025

Copy link
Copy Markdown
Contributor

Description

As title.

This PR succeeds:

and covers the following parts of the dataset feature implementation plan:

  • Change the default column metadata table name from clp_column_metadata_default to clp_default_column_metadata to comply with the dataset tables naming convention clp_<dataset-name>_<type> for all tables.

Since for clp_<dataset-name>_<type>, the table prefix clp and the table suffix <type> (in this case, COLUMN_METADATA) is usually fixed, what the indexer needs is just a dataset name from the CLArgs, not the full table name. Hence, in this PR we update the argument name and all its reference sites.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  • Tested with clp-package. Running indexer generates no errors.

Summary by CodeRabbit

  • Style
    • Updated user-facing terminology from "table" to "dataset" in command-line arguments, help texts, and related messages.
  • Chores
    • Standardized naming conventions and usage of dataset name constants across components.
    • Improved internal consistency for dataset-related operations and configuration.

@coderabbitai

coderabbitai Bot commented Apr 24, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This change updates naming conventions and parameter handling related to datasets and table prefixes across several components. In the Python utilities, the function for creating metadata tables now takes a table prefix and constructs the full table name internally. In the C++ core components, all references to "table" are renamed to "dataset" in variable names, method parameters, and documentation, including command-line argument handling. Table name construction is centralized and standardized, with suffixes and prefixes applied consistently. The job orchestration layer now uses a configuration constant for the default dataset name instead of a hardcoded string.

Changes

File(s) Change Summary
components/clp-py-utils/clp_py_utils/clp_metadata_db_utils.py _create_column_metadata_table now takes a table_prefix and constructs the table name internally; updates to how the function is called and a TODO comment about restricting to a specific dataset.
components/core/src/clp_s/indexer/CommandLineArguments.cpp Renames positional argument and internal variables from "table-name" to "dataset-name" in command-line parsing and usage messages.
components/core/src/clp_s/indexer/CommandLineArguments.hpp Renames member variable and getter from m_table_name/get_table_name() to m_dataset_name/get_dataset_name().
components/core/src/clp_s/indexer/IndexManager.cpp, components/core/src/clp_s/indexer/IndexManager.hpp Changes method parameter and usage from table_name to dataset_name in update_metadata.
components/core/src/clp_s/indexer/MySQLIndexStorage.cpp, components/core/src/clp_s/indexer/MySQLIndexStorage.hpp Renames parameters from table_name to dataset_name in init; centralizes table name construction; fully qualifies type names; updates static prefix constant.
components/core/src/clp_s/indexer/indexer.cpp Updates call to update_metadata to use get_dataset_name() instead of get_table_name().
components/job-orchestration/job_orchestration/executor/compress/compression_task.py Replaces hardcoded "default" dataset name with CLP_DEFAULT_DATASET_NAME constant in the CLP_S storage engine command.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CommandLineArguments
    participant IndexManager
    participant MySQLIndexStorage

    User->>CommandLineArguments: Provide dataset-name as argument
    CommandLineArguments->>IndexManager: get_dataset_name()
    IndexManager->>MySQLIndexStorage: init(dataset_name, should_create_table)
    MySQLIndexStorage->>MySQLIndexStorage: Construct table_name from prefix + dataset_name + suffix
    MySQLIndexStorage->>MySQLIndexStorage: Create or update metadata table
Loading

Possibly related PRs

Suggested reviewers

  • kirkrodrigues
  • gibber9809

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 48ab03b and a9d8aec.

📒 Files selected for processing (2)
  • components/core/src/clp_s/indexer/MySQLIndexStorage.cpp (2 hunks)
  • components/core/src/clp_s/indexer/MySQLIndexStorage.hpp (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • components/core/src/clp_s/indexer/MySQLIndexStorage.hpp
  • components/core/src/clp_s/indexer/MySQLIndexStorage.cpp
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: build-macos (macos-13, false)
  • GitHub Check: build-macos (macos-14, false)
  • GitHub Check: build-macos (macos-14, true)
  • GitHub Check: lint-check (ubuntu-latest)
  • GitHub Check: lint-check (macos-latest)
  • GitHub Check: build (macos-latest)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Bill-hbrhbr Bill-hbrhbr changed the title Update indexer table name feat(indexer): Rename positional argument table-name to dataset-name for clarity; Update the default column metadata table name. Apr 24, 2025
@Bill-hbrhbr Bill-hbrhbr marked this pull request as ready for review April 24, 2025 16:13
@Bill-hbrhbr Bill-hbrhbr requested review from a team, gibber9809 and wraymo as code owners April 24, 2025 16:13
@Bill-hbrhbr Bill-hbrhbr changed the title feat(indexer): Rename positional argument table-name to dataset-name for clarity; Update the default column metadata table name. feat(indexer): Rename positional argument table-name to dataset-name for clarity; Update the name of the default column metadata table created when using clp-s. Apr 24, 2025
Comment thread components/core/src/clp_s/indexer/CommandLineArguments.cpp Outdated
Comment thread components/core/src/clp_s/indexer/CommandLineArguments.cpp
Comment thread components/core/src/clp_s/indexer/CommandLineArguments.cpp Outdated
Comment thread components/core/src/clp_s/indexer/MySQLIndexStorage.hpp Outdated
Comment thread components/clp-py-utils/clp_py_utils/clp_metadata_db_utils.py Outdated
Bill-hbrhbr and others added 2 commits April 25, 2025 09:46
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>

@kirkrodrigues kirkrodrigues left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the PR title, how about:

feat(indexer): Rename CLI arg `table-name` to `dataset-name` for consistency; Update the name of the column metadata table name to put the dataset name first.

@Bill-hbrhbr Bill-hbrhbr changed the title feat(indexer): Rename positional argument table-name to dataset-name for clarity; Update the name of the default column metadata table created when using clp-s. feat(indexer): Rename CLI arg table-name to dataset-name for consistency; Update the name of the column metadata table name to put the dataset name first. Apr 25, 2025
junhaoliao pushed a commit to junhaoliao/clp that referenced this pull request May 17, 2026
…istency; Update the name of the column metadata table name to put the dataset name first. (y-scope#846)

Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants