@comunica/actor-rdf-join-inner-multi-sequential 5.4.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2017–now Ruben Taelman, Joachim Van Herwegen
|
|
4
|
+
Comunica Association and Ghent University – imec, Belgium
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorRdfJoinMultiSequential.js","sourceRoot":"","sources":["ActorRdfJoinMultiSequential.ts"],"names":[],"mappings":";;;AAOA,yDAAsD;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ChB,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC;gBACxF,mBAAmB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC;gBAC7E,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;qBACf,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,mBAAmB,CAAC,CAAC,CAAC;oBACxD,QAAQ,CAAC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAC3D,EAAE,QAAQ,CAAC,CAAC;IACf,CAAC;CACF;AAvDD,kEAuDC","sourcesContent":["import type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n MediatorRdfJoin,\n IActorRdfJoinTestSideData,\n} from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { TestResult } from '@comunica/core';\nimport { passTestWithSideData } from '@comunica/core';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { IJoinEntry, ComunicaDataFactory } from '@comunica/types';\nimport { AlgebraFactory } from '@comunica/utils-algebra';\nimport { getSafeBindings } from '@comunica/utils-query-operation';\n\n/**\n * A Multi Sequential RDF Join Actor.\n * It accepts 3 or more streams, joins the first two, and joins the result with the remaining streams.\n */\nexport class ActorRdfJoinMultiSequential extends ActorRdfJoin {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorRdfJoinMultiSequentialArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'multi-sequential',\n limitEntries: 3,\n limitEntriesMin: true,\n canHandleUndefs: true,\n });\n this.mediatorJoin = args.mediatorJoin;\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n const dataFactory: ComunicaDataFactory = action.context.getSafe(KeysInitQuery.dataFactory);\n const algebraFactory = new AlgebraFactory(dataFactory);\n\n // Join the two first streams, and then join the result with the remaining streams\n const firstEntry: IJoinEntry = {\n output: getSafeBindings(await this.mediatorJoin\n .mediate({ type: action.type, entries: [ action.entries[0], action.entries[1] ], context: action.context })),\n operation: algebraFactory\n .createJoin([ action.entries[0].operation, action.entries[1].operation ], false),\n };\n const remainingEntries: IJoinEntry[] = action.entries.slice(1);\n remainingEntries[0] = firstEntry;\n return {\n result: await this.mediatorJoin.mediate({\n type: action.type,\n entries: remainingEntries,\n context: action.context,\n }),\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n sideData: IActorRdfJoinTestSideData,\n ): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n const { metadatas } = sideData;\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return passTestWithSideData({\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value *\n metadatas.slice(2).reduce((acc, metadata) => acc * metadata.cardinality.value, 1),\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1] +\n metadatas.slice(2)\n .reduce((sum, metadata, i) => sum + requestInitialTimes[i] +\n metadata.cardinality.value * requestItemTimes[i], 0),\n }, sideData);\n }\n}\n\nexport interface IActorRdfJoinMultiSequentialArgs extends IActorRdfJoinArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-rdf-join-inner-multi-sequential",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "A multi-sequential rdf-join actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"build:components": "componentsjs-generator"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@comunica/bus-rdf-join": "^5.
|
|
45
|
-
"@comunica/context-entries": "^5.
|
|
46
|
-
"@comunica/core": "^5.
|
|
47
|
-
"@comunica/mediatortype-join-coefficients": "^5.
|
|
48
|
-
"@comunica/types": "^5.
|
|
49
|
-
"@comunica/utils-algebra": "^5.
|
|
50
|
-
"@comunica/utils-query-operation": "^5.
|
|
44
|
+
"@comunica/bus-rdf-join": "^5.5.0",
|
|
45
|
+
"@comunica/context-entries": "^5.5.0",
|
|
46
|
+
"@comunica/core": "^5.5.0",
|
|
47
|
+
"@comunica/mediatortype-join-coefficients": "^5.5.0",
|
|
48
|
+
"@comunica/types": "^5.5.0",
|
|
49
|
+
"@comunica/utils-algebra": "^5.5.0",
|
|
50
|
+
"@comunica/utils-query-operation": "^5.5.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "3a258e018a9c5f0b03f531b30ee1cdc659b5b7c9"
|
|
53
53
|
}
|