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

gafferpy API missing a basic Pair implementation #14

Open
tb06904 opened this issue Aug 24, 2023 · 0 comments
Open

gafferpy API missing a basic Pair implementation #14

tb06904 opened this issue Aug 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@tb06904
Copy link
Member

tb06904 commented Aug 24, 2023

The current gafferpy API has an implementation for a SeedPair that makes use of the class uk.gov.gchq.gaffer.commonutil.pair.Pair however, this only accepts a single EntitySeed for both the first and second argument of the pair. A generic Pair class is needed in gafferpy so that operations such as GetElementsBetweenSetsPairs can be used.

This was found under testing of the GetElementsBetweenSetsPairs operation as currently you cannot use this operation via gafferpy due to missing suitable class for the input to the operation. A class needs adding that can accept both a pair of objects or a pair of two lists and serialise them correctly into JSON.

For reference valid JSON for the GetElementsBetweenSetsPairs operation looks like:

{
    "class" : "GetElementsBetweenSetsPairs",
    "input" : {
        "class" : "Pair",
        "first" : {
            "Iterable": [
                {
                    "class" : "EntitySeed",
                    "vertex" : 1
                }
            ]
        },
        "second" : {
            "Iterable": [
                {
                    "class" : "EntitySeed",
                    "vertex" : 2
                },
                {
                    "class" : "EntitySeed",
                    "vertex" : 4
                }
            ]
        }
    }
}
@tb06904 tb06904 added the bug Something isn't working label Aug 24, 2023
@t92549 t92549 transferred this issue from gchq/gaffer-tools Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant