Skip to content

feat(clp-s)!: Reserve the $, !, and # namespaces for future use. #827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 17, 2025

Conversation

gibber9809
Copy link
Contributor

@gibber9809 gibber9809 commented Apr 14, 2025

Description

This PR reserves the $, !, and # namespaces for future use. Specifically we update the parsing and unescaping rules for columns to treat columns beginning with $, !, and # as belonging to those respective namespaces unless escaped with a backslash.

Note that each change to the column parsing and unescaping rules is a breaking archive format change because it affects the interpretation of the authoritative timestamp column stored in the archive. Even though this is a breaking change we don't increment the archive version because if this PR gets merged before the next release we get to batch it together with a similar column format change for which we did increment the archive version.

We have near-term plans to use the $ namespace to allow users to reference columns in the archive range index (see #737). The ! and # namespaces have no immediate use, but they are reserved in this PR to avoid having to introduce more breaking changes of this type for the foreseeable future.

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

  • Added tests for column format changes

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Enhanced query parsing to support additional namespace characters ($, !, #), expanding the range of recognized symbols in search queries.
    • Improved unescaping functionality to handle more special characters in queries.
    • Added new namespace constants to support expanded query syntax.
  • Documentation

    • Updated JSON search syntax guidelines to clarify that keys starting with special symbols (, @, $, !, #) must now be escaped.
  • Tests

    • Improved test cases to verify the handling of multiple namespace characters in search queries.

@gibber9809 gibber9809 requested review from wraymo and a team as code owners April 14, 2025 17:47
Copy link
Contributor

coderabbitai bot commented Apr 14, 2025

## Walkthrough
This pull request introduces three new namespace constants in the core constants header and integrates them into the existing tokenisation and unescaping logic. The changes modify the `tokenize_column_descriptor` function to use these extra constants, expand the KQL grammar to recognise them as special characters, and update test cases alongside documentation to reflect the new escaping requirements for keys starting with these characters.

## Changes

| File(s)                                                               | Change Summary                                                                                                                                                            |
|-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `components/core/.../archive_constants.hpp`, <br> `components/core/.../SearchUtils.cpp`, <br> `components/core/.../Kql.g4` | - Added `constexpr` constants: `cRangeIndexNamespace` (`"$"`), `cReservedNamespace1` (`"!"`), and `cReservedNamespace2` (`"#"`). <br> - Modified the `tokenize_column_descriptor` function to use a switch statement for multiple namespace characters. <br> - Expanded the `SPECIAL_CHARACTER` fragment in the KQL grammar to include the new characters. |
| `components/core/.../test-kql.cpp`, <br> `docs/.../reference-json-search-syntax.md`          | - Updated test cases to support namespaced columns with the additional characters and used dynamic queries for multiple scenarios. <br> - Revised documentation to include escaping requirements for keys beginning with `@`, `$`, `!`, and `#`.                              |

## Sequence Diagram(s)
```mermaid
sequenceDiagram
    participant Caller
    participant Tokenizer as tokenize_column_descriptor
    Note over Tokenizer: Begin processing descriptor string
    Caller ->> Tokenizer: Pass descriptor string
    Tokenizer ->> Tokenizer: Switch on first character
    alt Character is one of '@', '$', '!', '#'
        Tokenizer ->> Tokenizer: Set descriptor_namespace & increment start_index
    else No matching namespace character
        Tokenizer ->> Tokenizer: Use default handling
    end
    Tokenizer -->> Caller: Return tokenised output

Possibly Related PRs

Suggested Reviewers

  • wraymo
  • kirkrodrigues

<!-- walkthrough_end -->

<!-- announcements_start -->

> [!TIP]
> <details>
> <summary>⚡💬 Agentic Chat (Pro Plan, General Availability)</summary>
> 
> - We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.
> 
> </details>

<!-- announcements_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsv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SkCgYgV6JQVWeKK6EgMAIQBxDAdISHWAdIZavuZiDQZgdxNBi41HF20O21blNQ6aT2LBxwUPeuDUAAKRnk8PoRn1fHsHobQBimDh3JxlLsYBEkNHTFhnFN3GLPVB5nduAnUIAWfA3lkHKSsH8AEz8pXi9n8vRDkV3qRCCHDCiF0Y3CkJSjknuAlzgnT30deATqMYLS+ofBoFYkmqMq03UHyXoOJodCMfmF3xfgSRTITv6GYL0bJJDkWQKXdunXzAAmLFLHLC4B4l2gKcQHzESGKCpKmSqFRiGI8CCGqVinGWqZRmQiaY0BabmBvCQAeoqeZM6dhhPUVI1Nia4WcASbzGqDkU9DwK9FzKKjxpHHwHXusgOttsUjHStJ8YuUMeTlTAdH8AcdGGcaIALX2ilzUPSbhlKql0omydlj3ikNGG/SMYo20DtGo1BncoqRny8qwCbBOd3uCmZoXWbE+cnHcqMAk3yPaJHKoOBpAefsnIgYGNnOGN0yaJmyeVclhdk13C6MU0AfAenPfrRZgYxbGIQfXqmOQa9PmNouhQMCpR026vpTRwEreVUjZTQA5S4eA15WUFJU0G0CFUMGZd9nUAPwlK8TMb8ToBVXidFdFSgA7QYAAFYAA2Q4WgDtDV/YTKXYeiOgaJBgTKfYWgNVzKNAY4/YT4WIT4Q4fYQ1tVrKWgfYY4z4JV5lsg44jtA4dmNAfVhgd4eIfYAQQ4Y4zKTKPDTKYN44jV3YHVw4aJaNjtFQL12FSAQ12IG1z4d4BgXYd4XYNVxN1VhgD1zKENhN44hgVQPVhgD4NAT4NV44tV2gAQDNiASALVkgS1jVjtT4Y43YQ4TKHiVttAEgVVjVzKDtDtfYBgQ4Itg1ud212IC1jtNVpVplzNiV/fC4RAGVkgF9eV+FUVoAA== -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=y-scope/clp&utm_content=827):

- 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](https://docs.coderabbit.ai/finishing-touches/docstrings) for 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

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

Docs review.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
docs/src/user-guide/reference-json-search-syntax.md (2)

195-195: Use consistent emphasis style
The phrase “keys that start with …” uses underscores for emphasis, but the document otherwise uses asterisks. Please switch to *start* to satisfy MD049 and maintain consistency.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


198-198: Correct the bullet list entry for backslash
The line

a `\` (backslash):

isn’t formatted as a list item. It should read:

* `\` (backslash)

to match the other entries in the list.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1c560d1 and ee4198d.

📒 Files selected for processing (1)
  • docs/src/user-guide/reference-json-search-syntax.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/src/user-guide/reference-json-search-syntax.md

195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)

⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: centos-stream-9-dynamic-linked-bins
  • GitHub Check: centos-stream-9-static-linked-bins
  • GitHub Check: ubuntu-jammy-dynamic-linked-bins
  • GitHub Check: ubuntu-jammy-static-linked-bins
  • GitHub Check: build-macos (macos-15, false)
  • GitHub Check: build-macos (macos-15, true)
  • GitHub Check: build-macos (macos-13, false)
  • GitHub Check: build-macos (macos-14, true)
  • GitHub Check: build-macos (macos-13, true)
🔇 Additional comments (1)
docs/src/user-guide/reference-json-search-syntax.md (1)

194-203: Escaping rules update accurately reflects code changes
The documentation now correctly requires escaping of leading \, @, $, !, and # in keys, aligning perfectly with the newly reserved namespaces in the codebase.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)

Copy link
Member

@wraymo wraymo left a comment

Choose a reason for hiding this comment

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

I'm generally okay with the changes in this PR. I just have one question: do we have any guideline that restricts the use of char constants? If not, we could store those namespace characters as char constants. That way, we can directly use constants::cAutogenNamespace in the switch statement and replace the @ and ! literals with constants::cAutogenNamespace and constants::cReservedNamespace1, respectively.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
docs/src/user-guide/reference-json-search-syntax.md (2)

195-195: Use asterisk style for emphasis
To comply with our Markdown style (MD049), replace the underscores around start with asterisks, e.g., *start* instead of _start_.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


198-198: Maintain consistent bullet punctuation
The first list item ends with a colon (:) while the others don’t. For consistency, remove the trailing colon from `\` (backslash): or add a colon to the remaining items.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ee4198d and 9ef4872.

📒 Files selected for processing (1)
  • docs/src/user-guide/reference-json-search-syntax.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/src/user-guide/reference-json-search-syntax.md

195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)

⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: centos-stream-9-dynamic-linked-bins
  • GitHub Check: centos-stream-9-static-linked-bins
  • GitHub Check: ubuntu-jammy-dynamic-linked-bins
  • GitHub Check: ubuntu-jammy-lint
  • GitHub Check: ubuntu-jammy-static-linked-bins
  • GitHub Check: build-macos (macos-15, true)
  • GitHub Check: build-macos (macos-15, false)
  • GitHub Check: build-macos (macos-13, false)
  • GitHub Check: build-macos (macos-13, true)
  • GitHub Check: lint-check (macos-latest)
🔇 Additional comments (1)
docs/src/user-guide/reference-json-search-syntax.md (1)

194-202: Clarify namespace escape requirements for $, !, and #
The documentation accurately patches the escaping rules to include the new $, !, and # namespaces. This aligns with the parser and unescape logic updates in code.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)

@gibber9809
Copy link
Contributor Author

I'm generally okay with the changes in this PR. I just have one question: do we have any guideline that restricts the use of char constants? If not, we could store those namespace characters as char constants. That way, we can directly use constants::cAutogenNamespace in the switch statement and replace the @ and ! literals with constants::cAutogenNamespace and constants::cReservedNamespace1, respectively.

Actually most of the reason I'm using std::string_view for the namespace constants is because namespaces within the schema tree can technically be arbitrary strings and we do actually have one non-char namespace at the moment (the default "" namespace).

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
docs/src/user-guide/reference-json-search-syntax.md (1)

195-196: Document escaping rules for keys starting with reserved namespace characters
This matches the earlier suggestion to clarify that keys beginning with special characters (@, $, !, #) must be escaped.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)

🧹 Nitpick comments (1)
docs/src/user-guide/reference-json-search-syntax.md (1)

195-196: Use asterisk for emphasis instead of underscores
Markdown lint (MD049) flags the use of underscores for emphasis. Please use *start* rather than _start_ to comply with the project's Markdown style.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9ef4872 and 60e5361.

📒 Files selected for processing (1)
  • docs/src/user-guide/reference-json-search-syntax.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/src/user-guide/reference-json-search-syntax.md

195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


195-195: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: build-macos (macos-14, true)
  • GitHub Check: build-macos (macos-15, true)
  • GitHub Check: build-macos (macos-13, true)
  • GitHub Check: build-macos (macos-13, false)
  • GitHub Check: build-macos (macos-14, false)
🔇 Additional comments (1)
docs/src/user-guide/reference-json-search-syntax.md (1)

198-201: Reserved namespace characters documented correctly
The newly added list of reserved namespace characters (@, $, !, #) is clear and aligns with the implementation changes in parsing and unescaping.

Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

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

Docs review.

@gibber9809 gibber9809 merged commit b9512a8 into y-scope:main Apr 17, 2025
21 checks passed
anlowee pushed a commit to anlowee/clp that referenced this pull request Apr 25, 2025
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.

3 participants