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

MultiLevelExpand transformation #293

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

MultiLevelExpand transformation #293

wants to merge 40 commits into from

Conversation

HeikoTheissen
Copy link
Contributor

@HeikoTheissen HeikoTheissen commented Nov 10, 2023

See wiki.

"@Core.OptionalParameter": { "DefaultValue": "false" }
}
],
"$ReturnType": { "$Collection": true, "$Type": "Edm.EntityType" }
Copy link
Member

@uhlmannm uhlmannm Nov 10, 2023

Choose a reason for hiding this comment

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

I guess the EntityType is not enough. We will need some of the information that we also get from a hierarchical query. Most importantly, the LimitedDescendantCount but also the DrillState and the DistanceFromRoot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So we need an instance annotation whose type contains a subset of the properties of Hierarchy.RecursiveHierarchyType. Which subset exactly?

Copy link
Member

@uhlmannm uhlmannm Nov 13, 2023

Choose a reason for hiding this comment

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

@ThomasChadzelek I had found the LimitedDescendantCount, the DrillState and the DistanceFromRoot. Is that it? Or already too much?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it sufficient if these instance annotations are returned by the auto-expand function? If one node is expanded, they must be computed by the OData model itself.

Copy link
Member

Choose a reason for hiding this comment

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

I think yes. In the other cases, the model is creating requests to manually expand the visual groups. The backend would not even be aware that we are creating a visual grouping on the screen.

Copy link
Member

Choose a reason for hiding this comment

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

@ThomasChadzelek I had found the LimitedDescendantCount, the DrillState and the DistanceFromRoot. Is that it? Or already too much?

What about LimitedRank? Our new favorite ;-)

DistanceFromRoot might be redundant because the hierarchy is leveled, not recursive?

It is needed if `AggregatedValuesLeafFilter` is specified or properties
from `Aggregation` occur in `SiblingOrder`. Especially the latter is
typical.
@HeikoTheissen HeikoTheissen marked this pull request as ready for review January 19, 2024 15:33
<Annotation Term="Core.Description" String="Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy" />
</Parameter>
<Parameter Name="BeforeAggregationFilter" Type="Edm.String" Nullable="false">
<Annotation Term="Core.Description" String="Expression valid for `filter` transformation to restrict the input set before any further procressing" />
Copy link
Member

Choose a reason for hiding this comment

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

Can't you achieve the same thing with a filter() transformation beforehand, in the same $apply? For TopLevels, we do likewise with orderby() or search() or filter().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but then the backend would have to take all these transformations together and process them as one "auto-expand" transformation. (At least with the Analytical Engine, the filter is part of the auto-expand operation.)

If the backend agrees, we can change this.

Copy link
Member

Choose a reason for hiding this comment

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

If the backend disagrees, do we need support for search as well? Or is that too fuzzy for analytics?

@HeikoTheissen
Copy link
Contributor Author

HeikoTheissen commented Apr 26, 2024

Open issue: Whether and how to instruct the transformation to create one row for an expanded group header above its descendants and another row for the subtotals below its descendants.

{
"$Name": "SubtotalsAtBottom",
"$Type": "Edm.Bool",
"@Core.Description": "Whether to have expanded subtotal rows duplicated: before and after their descendants",
Copy link
Member

Choose a reason for hiding this comment

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

Whether to duplicate the group headers so that they are included before and after their descendants

@ralfhandl
Copy link
Member

Why "auto" if it is part of the request? The annotation of the same name tells what the server will do without needing input from the client.

@HeikoTheissen
Copy link
Contributor Author

HeikoTheissen commented Jan 10, 2025

Why "auto" if it is part of the request? The annotation of the same name tells what the server will do without needing input from the client.

"Automated expansion" as opposed to "interactive expansion" where the user must click the expand button on every group header.

@ralfhandl
Copy link
Member

OData is not about user interaction with a UI, it is about interaction of the UI/client with the server, so "auto" feels wrong here, especially because the word "AutoExpand" has a different meaning in the Core vocabulary.

@uhlmannm
Copy link
Member

@ralfhandl Ok. So maybe the name is not good. It comes from the internal name for the OData V2 feature to enable the automatic expansion of several levels. What would be a better name? What we get back is a slice (defined by top and skip) of a partially expanded hierarchy. The hierarchy itself is defined by the group levels provided by the client. And in the hierarchy data aggregation may have to be done, also as defined by the client.
For recursive hierarchies we called the function TopLevels. But I do not see how that could be of help here.
What about DataAggregationHierarchy?

@ralfhandl ralfhandl changed the title Auto-expand transformation MultiLevelExpand transformation Jan 15, 2025
"@Common.Experimental": true,
"@Core.Description": "Property names constituting a level in an [unnamed leveled hierarchy](#MultiLevelExpand)",
"@Core.LongDescription": "Properties in `D` must be used to identify entries in [`ExpandEntries/Entry`](#MultiLevelExpandEntry),\n otherwise they have the same effect as properties in `A`.",
"D": {
Copy link
Member

Choose a reason for hiding this comment

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

"D" and "A" are unusually short names. Why not "DimensionProperties" and "AdditionalDimensionProperties"?

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.

4 participants