Skip to content
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

feat: DH-18778: Add rebase method to TreeTable and RollupTable in support of ACLs. #6666

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

cpwright
Copy link
Contributor

@cpwright cpwright commented Feb 27, 2025

No description provided.

@cpwright cpwright self-assigned this Feb 27, 2025
@cpwright cpwright changed the title DH-18778: Add rebase method to TreeTable and RollupTable in support of ACLs. feat: DH-18778: Add rebase method to TreeTable and RollupTable in support of ACLs. Feb 27, 2025
@cpwright cpwright requested a review from rcaudy February 28, 2025 17:54
Copy link
Member

@rcaudy rcaudy left a comment

Choose a reason for hiding this comment

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

Will run coverage on the final product.

@@ -222,6 +222,28 @@ protected TreeTableImpl copy() {
parentIdentifierColumn, nodeFilterColumns, nodeOperations, availableColumnDefinitions);
}

@Override
public TreeTable rebase(@NotNull final Table newSource) {
if (!newSource.getDefinition().equals(source.getDefinition())) {
Copy link
Member

Choose a reason for hiding this comment

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

We could make a case that we just need to have the parent and id columns present on newSource. I guess we don't need to do that for the ACL case.

cpwright and others added 10 commits February 28, 2025 18:47
…l/RollupTable.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
…archical/TreeTableImpl.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
…archical/TreeTableImpl.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
@cpwright cpwright requested a review from rcaudy March 1, 2025 00:10
}

@Override
public RollupTableImpl rebase(final Table newSource) {
public RollupTableImpl rebase(final @NotNull Table newSource) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public RollupTableImpl rebase(final @NotNull Table newSource) {
public RollupTableImpl rebase(@NotNull final Table newSource) {

Comment on lines +521 to +522
private static @NotNull RollupTableImpl makeRollupInternal(@NotNull final QueryTable source,
@NotNull final Collection<? extends Aggregation> aggregations,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
private static @NotNull RollupTableImpl makeRollupInternal(@NotNull final QueryTable source,
@NotNull final Collection<? extends Aggregation> aggregations,
private static @NotNull RollupTableImpl makeRollupInternal(
@NotNull final QueryTable source,
@NotNull final Collection<? extends Aggregation> aggregations,

aggregatedNodeDefinition, aggregatedNodeOperations,
constituentNodeDefinition, constituentNodeOperations,
null,
return makeRollupInternal(newSourceQueryTable, aggregations, includesConstituents, groupByColumns,
Copy link
Member

Choose a reason for hiding this comment

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

I believe you have lost some attributes you should be keeping with this change (specifically sortable columns and column descriptions, which aren't labeled as copyable for rollups, presumably because they get re-written by makeRollup). I think you need to pass the new attribute map in. I see you did it the other way in TreeTableImpl.

Comment on lines +253 to +254
private static @NotNull TreeTableImpl makeTreeInternal(@NotNull final QueryTable source,
@NotNull final ColumnName identifierColumn,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
private static @NotNull TreeTableImpl makeTreeInternal(@NotNull final QueryTable source,
@NotNull final ColumnName identifierColumn,
private static @NotNull TreeTableImpl makeTreeInternal(
@NotNull final QueryTable source,
@NotNull final ColumnName identifierColumn,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants