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

ApplyViewToElementsFunction does not apply Schema validation #3059

Open
t92549 opened this issue Nov 2, 2023 · 4 comments · May be fixed by #3060
Open

ApplyViewToElementsFunction does not apply Schema validation #3059

t92549 opened this issue Nov 2, 2023 · 4 comments · May be fixed by #3060
Assignees
Labels
bug Confirmed or suspected bug

Comments

@t92549
Copy link
Contributor

t92549 commented Nov 2, 2023

Describe the bug
ApplyViewToElementsFunction will apply the View of an operation to the results from multiple subgraphs. This is meant to ensure that the results are correctly aggregated and validated after a query to a FederatedStore.

However, despite the View validation being applied, the Schema validation is not applied. This could be intended, but I suspect it is not, as the intention of this merge function is to ensure all aggregation and validation happens as if the results came from one graph. If this is indeed unintended, I would suggest the merge function should be renamed to something like ValidateAndAggregateElements.

Additional context
The reason this happens is that the results are currently merged inside a MapStore and the MapStore does not currently support schema validation: #2613.

Some potential fixes are:

  • Add MapStore validation as suggested in Add validation to Map Store #2613.
  • Change the ApplyViewToElementsFunction to create an ephemeral AccumuloStore rather than MapStore
@t92549 t92549 added the bug Confirmed or suspected bug label Nov 2, 2023
@GCHQDev404
Copy link
Contributor

GCHQDev404 commented Nov 2, 2023

@GCHQDev404
Copy link
Contributor

GCHQDev404 commented Nov 2, 2023

Having the this tap into an existing instance of AccumuloStore for the temporary map is the way forward.
but this won't work with a GAAS situation with a FederatedStore which only has ProxiesStore pointed at a remote Gaffer graph.

@GCHQDev404
Copy link
Contributor

Technically the Function is called "ApplyView" to elements. which is does do. But I think it should be better and apply the Schema Validation.

GCHQDev404 added a commit that referenced this issue Nov 3, 2023
GCHQDev404 added a commit that referenced this issue Nov 3, 2023
…ation into view POST Aggregation to work after a groupBy aggregation change.
GCHQDev404 added a commit that referenced this issue Nov 3, 2023
…wtoelements-schema-validation' into gh-3059-federated-store-applyviewtoelements-schema-validation

# Conflicts:
#	store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/util/ApplyViewToElementsFunction.java
GCHQDev404 added a commit that referenced this issue Nov 3, 2023
…ation should only be done for the TemporaryStore of type MapStore
GCHQDev404 added a commit that referenced this issue Nov 3, 2023
@GCHQDev404 GCHQDev404 self-assigned this Nov 3, 2023
@GCHQDev404
Copy link
Contributor

It seems the the Schema can be searched for any Group's Validation function and these can be used in a View post aggregate filter. The View is made if it doesn't exist or it merges if it does.

PostAggregate because this happens after the GroupBy aggregation.

GCHQDev404 added a commit that referenced this issue Nov 6, 2023
GCHQDev404 added a commit that referenced this issue Nov 6, 2023
GCHQDev404 added a commit that referenced this issue Nov 6, 2023
GCHQDev404 added a commit that referenced this issue Nov 6, 2023
GCHQDev404 added a commit that referenced this issue Nov 6, 2023
GCHQDev404 added a commit that referenced this issue Nov 6, 2023
GCHQDev404 added a commit that referenced this issue Nov 6, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
…dation' into gh-3059-other-temp-merge-graphs

# Conflicts:
#	store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/util/FederatedElementFunction.java
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
…dation' into gh-3059-other-temp-merge-graphs

# Conflicts:
#	store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/util/FederatedStoreUtil.java
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 7, 2023
GCHQDev404 added a commit that referenced this issue Nov 9, 2023
GCHQDev404 added a commit that referenced this issue Nov 14, 2023
GCHQDev404 added a commit that referenced this issue Nov 14, 2023
GCHQDev404 added a commit that referenced this issue Feb 23, 2024
GCHQDev404 added a commit that referenced this issue Feb 23, 2024
…store-applyviewtoelements-schema-validation

# Conflicts:
#	store-implementation/federated-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/FederatedStoreSchemaTest.java
GCHQDev404 added a commit that referenced this issue Feb 26, 2024
GCHQDev404 added a commit that referenced this issue Feb 26, 2024
This was referenced Feb 26, 2024
GCHQDev404 added a commit that referenced this issue Mar 12, 2024
…store-applyviewtoelements-schema-validation

# Conflicts:
#	store-implementation/federated-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/operation/handler/impl/FederatedOperationChainHandlerTest.java
@GCHQDeveloper314 GCHQDeveloper314 added this to the Medium Term Backlog milestone Mar 15, 2024
GCHQDev404 added a commit that referenced this issue Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed or suspected bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants