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

Problem with cost function #2087

Open
hoijnet opened this issue Jan 26, 2024 · 0 comments
Open

Problem with cost function #2087

hoijnet opened this issue Jan 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hoijnet
Copy link

hoijnet commented Jan 26, 2024

Describe the bug
I ran a WOQL query to select inbound documents (either direct link or as a path query to fragments) and got the following result:

Below is a WOQL query for inbound documents. Works in one simple data product, but not in a more advanced one.

          WOQL.select(
            "v:doc",
            WOQL.and(
              WOQL.triple("v:linkedFragment", "v:prop", "v:target"),
              WOQL.eq("v:target", docId),
              WOQL.or(
                WOQL.and(
                  WOQL.triple("v:linkedFragment", "rdf:type", "v:linkDocType"),
                  WOQL.not(WOQL.quad("v:linkDocType", "sys:subdocument", "v:own", "schema")),
                  WOQL.eq("v:doc", "v:linkedFragment")
                ),
                WOQL.and(
                  WOQL.not(WOQL.quad("v:baseDocType", "sys:subdocument", "v:own", "schema")),
                  WOQL.triple("v:baseDoc", "rdf:type", "v:baseDocType"),
                  WOQL.path("v:baseDoc", ".+>", "v:linkedFragment"),
                  WOQL.eq("v:doc", "v:baseDoc")
                )
              )
            )
          )
{
  "@type": "api:WoqlErrorResponse",
  "api:error": {
    "@type": "api:ExistenceError",
    "api:value": "'query/definition':cost_(path(mv(baseDoc),plus(p),mv(linkedFragment)),_38412,pos)"
  },
  "api:message": "The program: 'query/definition:cost_(path(mv(baseDoc),plus(p),mv(linkedFragment)),_38412,pos)' used a predicate with unhandled arguments",
  "api:status": "api:failure"
}

To Reproduce
Steps to reproduce the behavior:

  1. Run query on a data product with a document structure with many levels of subdocuments
  2. See error

Expected behavior
The same query works with smaller data products

Screenshots
N/A

Info (please complete the following information):

  • Via DFRNT, 11.1.11
@hoijnet hoijnet added the bug Something isn't working label Jan 26, 2024
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