Skip to content

feat(clp-s): Add support for duplicate columns in projections.#1217

Merged
kirkrodrigues merged 8 commits into
y-scope:mainfrom
wraymo:allow_duplicate_projection
Aug 21, 2025
Merged

feat(clp-s): Add support for duplicate columns in projections.#1217
kirkrodrigues merged 8 commits into
y-scope:mainfrom
wraymo:allow_duplicate_projection

Conversation

@wraymo

@wraymo wraymo commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

Description

This change adds support for duplicate columns in Projection.

When using CLP as a library, results may not always be serialized into a JSON string. In these cases, enforcing uniqueness is unnecessary and, in some scenarios, duplicate columns are expected.

For example, in the Velox–CLP connector, accessing the same nested field through both a UDF and a row type may produce two projection fields. Even if one of them is unused, we still need to allow duplicates.

Since the default value remains false, this change does not affect existing CLP behavior.

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

Summary by CodeRabbit

  • New Features

    • Added an option (off by default) to allow duplicate columns in projection results, enabling repeated fields to be preserved when desired.
  • Bug Fixes

    • Prevents errors in workflows that intentionally produce repeated columns; such workflows now succeed when the option is enabled.
  • Notes

    • Default behaviour unchanged for users who do not enable the duplicate-columns option.

@wraymo wraymo requested review from a team and gibber9809 as code owners August 18, 2025 12:45
@coderabbitai

coderabbitai Bot commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a boolean flag to Projection to control whether duplicate columns are permitted; constructor updated to accept allow_duplicate_columns (default false). add_column now only throws on duplicates when that flag is false; minor lambda capture/formatting change in find_if.

Changes

Cohort / File(s) Summary
API: Projection constructor & state
components/core/src/clp_s/search/Projection.hpp
Adds member bool m_allow_duplicate_columns and changes constructor to explicit Projection(ProjectionMode mode, bool allow_duplicate_columns = false).
Behavior: duplicate handling in add_column
components/core/src/clp_s/search/Projection.cpp
add_column checks m_allow_duplicate_columns: if false, a duplicate column causes a BadParam error; if true, duplicates are allowed and the column is pushed. Lambda capture changed from [column] to [&column] and minor formatting adjusted.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Caller
  participant Projection
  Caller->>Projection: add_column(column)
  Projection->>Projection: find_if(existing column)
  alt duplicate found
    alt m_allow_duplicate_columns == false
      Projection-->>Caller: throw BadParam (duplicate)
    else m_allow_duplicate_columns == true
      rect rgb(220,245,220)
        Projection->>Projection: push column (allow duplicate)
      end
      Projection-->>Caller: return
    end
  else no duplicate
    Projection->>Projection: push column
    Projection-->>Caller: return
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

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

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 36d142c and 7a1a153.

📒 Files selected for processing (1)
  • components/core/src/clp_s/search/Projection.hpp (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}

⚙️ CodeRabbit Configuration File

  • Prefer false == <expression> rather than !<expression>.

Files:

  • components/core/src/clp_s/search/Projection.hpp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: ubuntu-jammy-dynamic-linked-bins
  • GitHub Check: ubuntu-jammy-static-linked-bins
  • GitHub Check: centos-stream-9-static-linked-bins
  • GitHub Check: ubuntu-jammy-lint
  • GitHub Check: centos-stream-9-dynamic-linked-bins
  • GitHub Check: build-macos (macos-15, true)
  • GitHub Check: build-macos (macos-15, false)
  • GitHub Check: lint-check (macos-15)
  • GitHub Check: lint-check (ubuntu-24.04)
🔇 Additional comments (2)
components/core/src/clp_s/search/Projection.hpp (2)

98-98: Good: default-initialize the new flag

Default member init to false is correct and robust for future constructor additions.


33-43: No action needed: exception type and docs are in sync

The add_column implementation throws OperationFailed(ErrorCodeBadParam, __FILE__, __LINE__) when duplicates are disallowed, exactly matching the header’s @throws OperationFailed for identical columns.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🔭 Outside diff range comments (1)
components/core/src/clp_s/search/Projection.hpp (1)

41-43: Update throws contract to reflect the new duplicate policy

The doc still states duplicates always throw. It should mention that throwing only happens when duplicates are disallowed.

Suggested tweak:

-     * @throws OperationFailed if `column` is identical to a previously added column
+     * @throws OperationFailed if `column` is identical to a previously added column and duplicate columns are disallowed
📜 Review details

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

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8618486 and c590035.

📒 Files selected for processing (2)
  • components/core/src/clp_s/search/Projection.cpp (1 hunks)
  • components/core/src/clp_s/search/Projection.hpp (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}

⚙️ CodeRabbit Configuration File

  • Prefer false == <expression> rather than !<expression>.

Files:

  • components/core/src/clp_s/search/Projection.cpp
  • components/core/src/clp_s/search/Projection.hpp
🧠 Learnings (1)
📚 Learning: 2025-05-02T22:27:59.347Z
Learnt from: LinZhihao-723
PR: y-scope/clp#873
File: components/core/src/clp/ffi/ir_stream/search/QueryHandlerImpl.cpp:148-157
Timestamp: 2025-05-02T22:27:59.347Z
Learning: In the `QueryHandlerImpl.cpp` file, the `unique_projected_columns` set (using `std::string_view`) is intentionally designed to only check for duplications within the local scope of the `create_projected_columns_and_projection_map` function. The team decided this is an acceptable use of `std::string_view` in a container since the referenced strings remain valid throughout the function's execution.

Applied to files:

  • components/core/src/clp_s/search/Projection.cpp
🧬 Code Graph Analysis (1)
components/core/src/clp_s/search/Projection.cpp (2)
components/core/src/clp_s/search/Projection.hpp (1)
  • column (44-44)
components/core/src/clp_s/search/ast/ColumnDescriptor.cpp (2)
  • rhs (105-110)
  • rhs (105-105)
🔇 Additional comments (2)
components/core/src/clp_s/search/Projection.cpp (2)

16-22: Duplicate-column gate is correct; behaviour preserved by default

The conditional correctly short-circuits the O(n) duplicate scan when duplicates are allowed, preserving existing behaviour when the flag is false. Nice adherence to the codebase style (false == expr).


16-22: Confirm uniqueness assumptions with allow_duplicate_columns=true

Allowing duplicates changes the contract: callers that previously relied on add_column() throwing on duplicates will now receive repeated entries. Please review all Projection usages to ensure downstream logic handles duplicates correctly.

Key areas to inspect:

  • Constructors of Projection – are any callsites assuming a thrown error for duplicate columns?
  • Calls to get_ordered_matching_nodes() – does the consumer expect only unique results?
  • Iterations over m_selected_columns in consuming code – is any aggregation or lookup logic broken by repeats?

If any callers depend on the old “throw on duplicate” behaviour, either restore that guard where needed or update those callers to explicitly handle duplicate columns.

Comment thread components/core/src/clp_s/search/Projection.cpp
Comment on lines +33 to 36
explicit Projection(ProjectionMode mode, bool allow_duplicate_columns = false)
: m_projection_mode{mode},
m_allow_duplicate_columns{allow_duplicate_columns} {}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Consider documenting the new parameter in-class

A brief comment for allow_duplicate_columns will help downstream integrators (e.g., Velox–CLP) discover this capability without digging through PRs.

Happy to draft a short doxygen note for the constructor and class comment if you want it in this PR.

🤖 Prompt for AI Agents
In components/core/src/clp_s/search/Projection.hpp around lines 33 to 36, the
new constructor parameter allow_duplicate_columns is undocumented; add a concise
in-class Doxygen comment for the class or directly above the constructor that
describes the parameter purpose (what allowing duplicate columns means), its
default value (false), and any behavioral/compatibility notes so downstream
integrators can discover and use it without reading PR history.

🛠️ Refactor suggestion

⚠️ Potential issue

Preserve ABI/API: re-introduce the legacy constructor overload and default-initialize the flag

Changing the constructor signature can break ABI for consumers linking against a shared library. Keep the old overload and delegate to the new one; also default-initialize the new member to be robust against future constructors.

Proposed diff:

-    explicit Projection(ProjectionMode mode, bool allow_duplicate_columns = false)
-            : m_projection_mode{mode},
-              m_allow_duplicate_columns{allow_duplicate_columns} {}
+    // Preserve legacy API/ABI
+    explicit Projection(ProjectionMode mode)
+            : m_projection_mode{mode},
+              m_allow_duplicate_columns{false} {}
+
+    explicit Projection(ProjectionMode mode, bool allow_duplicate_columns)
+            : m_projection_mode{mode},
+              m_allow_duplicate_columns{allow_duplicate_columns} {}
@@
-    bool m_allow_duplicate_columns;
+    bool m_allow_duplicate_columns{false};

Also applies to: 91-91

🤖 Prompt for AI Agents
In components/core/src/clp_s/search/Projection.hpp around lines 33-36 (and also
apply the same change at line 91), the public API/ABI was changed by removing
the legacy constructor overload and by not default-initializing the new flag
member; reintroduce the old constructor overload that accepts only
ProjectionMode and delegate it to the new two-argument constructor, and
default-initialize the m_allow_duplicate_columns member in its declaration so
existing consumers and future constructors remain ABI-stable and robust.

@gibber9809 gibber9809 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good -- just a few nits.

absl::flat_hash_set<int32_t> m_matching_nodes;
std::vector<std::vector<int32_t>> m_ordered_matching_nodes;
ProjectionMode m_projection_mode{ProjectionMode::ReturnAllColumns};
bool m_allow_duplicate_columns;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
bool m_allow_duplicate_columns;
bool m_allow_duplicate_columns{false};

};

explicit Projection(ProjectionMode mode) : m_projection_mode{mode} {}
explicit Projection(ProjectionMode mode, bool allow_duplicate_columns = false)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably need a brief docstring for this constructor.

Comment thread components/core/src/clp_s/search/Projection.cpp

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (2)
components/core/src/clp_s/search/Projection.hpp (2)

40-42: Potential ABI break: re-introduce the legacy 1-arg ctor and drop the default arg on the 2-arg ctor

Changing the constructor’s signature (even with a default arg) alters the mangled symbol and can break consumers linking against a shared library compiled against the old ABI. Keep the legacy overload and a dedicated 2-arg overload.

Suggested change:

-    explicit Projection(ProjectionMode mode, bool allow_duplicate_columns = false)
-            : m_projection_mode{mode},
-              m_allow_duplicate_columns{allow_duplicate_columns} {}
+    // Preserve legacy API/ABI
+    explicit Projection(ProjectionMode mode)
+            : m_projection_mode{mode},
+              m_allow_duplicate_columns{false} {}
+
+    explicit Projection(ProjectionMode mode, bool allow_duplicate_columns)
+            : m_projection_mode{mode},
+              m_allow_duplicate_columns{allow_duplicate_columns} {}

If ABI stability isn’t a requirement (e.g., static-only or all downstreams recompile), feel free to disregard. Otherwise, this avoids an unnecessary breaking change.

To verify whether we build shared libraries in-tree:

#!/usr/bin/env bash
# Scan CMake files for shared library targets which would be sensitive to ABI changes
rg -nP -C2 '(add_library\s*\([^)]*SHARED)|(\bSHARED\b)' --type cmake

98-98: Good: default-initialize m_allow_duplicate_columns

This aligns with robust member initialization and addresses earlier feedback.

📜 Review details

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

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c590035 and 36d142c.

📒 Files selected for processing (2)
  • components/core/src/clp_s/search/Projection.cpp (1 hunks)
  • components/core/src/clp_s/search/Projection.hpp (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}

⚙️ CodeRabbit Configuration File

  • Prefer false == <expression> rather than !<expression>.

Files:

  • components/core/src/clp_s/search/Projection.cpp
  • components/core/src/clp_s/search/Projection.hpp
🧠 Learnings (2)
📚 Learning: 2025-05-02T22:27:59.347Z
Learnt from: LinZhihao-723
PR: y-scope/clp#873
File: components/core/src/clp/ffi/ir_stream/search/QueryHandlerImpl.cpp:148-157
Timestamp: 2025-05-02T22:27:59.347Z
Learning: In the `QueryHandlerImpl.cpp` file, the `unique_projected_columns` set (using `std::string_view`) is intentionally designed to only check for duplications within the local scope of the `create_projected_columns_and_projection_map` function. The team decided this is an acceptable use of `std::string_view` in a container since the referenced strings remain valid throughout the function's execution.

Applied to files:

  • components/core/src/clp_s/search/Projection.cpp
📚 Learning: 2024-10-14T03:45:21.323Z
Learnt from: LinZhihao-723
PR: y-scope/clp#558
File: components/core/tests/test-ffi_KeyValuePairLogEvent.cpp:331-335
Timestamp: 2024-10-14T03:45:21.323Z
Learning: When reviewing code, ensure that suggestions about unnecessary use of `std::move` with `std::shared_ptr` are only made if `std::move` is actually used in the code.

Applied to files:

  • components/core/src/clp_s/search/Projection.cpp
🧬 Code Graph Analysis (1)
components/core/src/clp_s/search/Projection.cpp (3)
components/core/src/clp_s/search/Projection.hpp (1)
  • column (51-51)
components/core/src/clp_s/search/ast/ColumnDescriptor.cpp (2)
  • rhs (105-110)
  • rhs (105-105)
components/core/src/clp_s/search/ast/ColumnDescriptor.hpp (3)
  • rhs (63-65)
  • rhs (63-63)
  • rhs (277-277)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (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: ubuntu-jammy-lint
  • GitHub Check: build-macos (macos-15, false)
  • GitHub Check: build-macos (macos-15, true)
  • GitHub Check: lint-check (macos-15)
  • GitHub Check: lint-check (ubuntu-24.04)
🔇 Additional comments (1)
components/core/src/clp_s/search/Projection.cpp (1)

16-22: Duplicate check gating + lambda capture: LGTM

  • Correctly gates the duplicate check behind the flag (default false).
  • Using [&column] avoids shared_ptr refcount churn and addresses the prior nit.
  • Style aligns with our guideline (false == ...).

Comment on lines +16 to +22
if (false == m_allow_duplicate_columns
&& m_selected_columns.end()
!= std::find_if(
m_selected_columns.begin(),
m_selected_columns.end(),
[&column](auto const& rhs) -> bool { return *column == *rhs; }
))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Nit: prefer std::any_of for readability over find_if != end

This reads a bit clearer and avoids the end-iterator comparison.

-    if (false == m_allow_duplicate_columns
-        && m_selected_columns.end()
-                   != std::find_if(
-                           m_selected_columns.begin(),
-                           m_selected_columns.end(),
-                           [&column](auto const& rhs) -> bool { return *column == *rhs; }
-                   ))
+    if (false == m_allow_duplicate_columns
+        && std::any_of(
+               m_selected_columns.begin(),
+               m_selected_columns.end(),
+               [&column](auto const& rhs) -> bool { return *column == *rhs; }
+           ))
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (false == m_allow_duplicate_columns
&& m_selected_columns.end()
!= std::find_if(
m_selected_columns.begin(),
m_selected_columns.end(),
[&column](auto const& rhs) -> bool { return *column == *rhs; }
))
if (false == m_allow_duplicate_columns
&& std::any_of(
m_selected_columns.begin(),
m_selected_columns.end(),
[&column](auto const& rhs) -> bool { return *column == *rhs; }
))
🤖 Prompt for AI Agents
In components/core/src/clp_s/search/Projection.cpp around lines 16 to 22,
replace the current check that uses std::find_if and an end-iterator comparison
with std::any_of for clarity; keep the same operands and lambda predicate
(comparing *column == *rhs) and the surrounding logic (the false ==
m_allow_duplicate_columns && ... condition) so behavior is unchanged, i.e., call
std::any_of(m_selected_columns.begin(), m_selected_columns.end(), [&column](auto
const& rhs){ return *column == *rhs; }) in place of the find_if != end
comparison.

Comment on lines +33 to 43
/**
* Constructs a Projection object with the specified mode and column handling behavior.
*
* @param mode Projection mode that determines how expressions are projected.
* @param allow_duplicate_columns Whether duplicate column descriptiors are permitted in the
* projection.
*/
explicit Projection(ProjectionMode mode, bool allow_duplicate_columns = false)
: m_projection_mode{mode},
m_allow_duplicate_columns{allow_duplicate_columns} {}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix Doxygen typo and clarify default; align add_column docs with new behaviour

  • Typo: “descriptiors” → “descriptors”.
  • Clarify that the default is false.
  • Update add_column’s @throws to reflect that duplicates only error when allow_duplicate_columns is false.

Apply:

-     * @param allow_duplicate_columns Whether duplicate column descriptiors are permitted in the
-     * projection.
+     * @param allow_duplicate_columns Whether duplicate column descriptors are permitted in the
+     * projection (default: false).

Additionally, please update the add_column docs to match the new behaviour (outside the selected range):

-     * @throws OperationFailed if `column` is identical to a previously added column
+     * @throws OperationFailed if allow_duplicate_columns is false and `column` is identical to a
+     *                          previously added column
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/**
* Constructs a Projection object with the specified mode and column handling behavior.
*
* @param mode Projection mode that determines how expressions are projected.
* @param allow_duplicate_columns Whether duplicate column descriptiors are permitted in the
* projection.
*/
explicit Projection(ProjectionMode mode, bool allow_duplicate_columns = false)
: m_projection_mode{mode},
m_allow_duplicate_columns{allow_duplicate_columns} {}
/**
* Constructs a Projection object with the specified mode and column handling behavior.
*
* @param mode Projection mode that determines how expressions are projected.
* @param allow_duplicate_columns Whether duplicate column descriptors are permitted in the
* projection (default: false).
*/
explicit Projection(ProjectionMode mode, bool allow_duplicate_columns = false)
: m_projection_mode{mode},
m_allow_duplicate_columns{allow_duplicate_columns} {}
🤖 Prompt for AI Agents
In components/core/src/clp_s/search/Projection.hpp around lines 33 to 43, fix
the Doxygen typo and clarify the default for allow_duplicate_columns: change
“descriptiors” to “descriptors” and state that the default is false
(allow_duplicate_columns = false). Also update the add_column method's Doxygen
(elsewhere in the file) so its @throws states that duplicate-column errors are
raised only when allow_duplicate_columns is false, and otherwise duplicates are
permitted; make the wording consistent with the constructor documentation.

@wraymo wraymo requested a review from gibber9809 August 20, 2025 13:17
* Constructs a Projection object with the specified mode and column handling behavior.
*
* @param mode Projection mode that determines how expressions are projected.
* @param allow_duplicate_columns Whether duplicate column descriptiors are permitted in the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @param allow_duplicate_columns Whether duplicate column descriptiors are permitted in the
* @param allow_duplicate_columns Whether duplicate column descriptors are permitted in the

@wraymo wraymo requested a review from gibber9809 August 20, 2025 19:03

@gibber9809 gibber9809 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. For the PR title how about:

feat(clp-s): Add support for duplicate columns in projections.

@wraymo wraymo changed the title feat(clp-s): Support duplicate columns in Projection. feat(clp-s): Add support for duplicate columns in projections. Aug 20, 2025
@kirkrodrigues kirkrodrigues merged commit 169397b into y-scope:main Aug 21, 2025
18 checks passed
junhaoliao pushed a commit to junhaoliao/clp that referenced this pull request May 17, 2026
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