Skip to content

Commit

Permalink
[maps] distance spatial join (#156618)
Browse files Browse the repository at this point in the history
Fixes #154605

PR adds new layer wizard for spatial join. Wizard provides an easy
interface to create spatial join as well as advertising the capability
in the main layer creation work flow.
<img width="200" alt="Screen Shot 2023-05-04 at 12 16 45 PM"
src="https://user-images.githubusercontent.com/373691/236293473-8a740171-0910-4574-8e38-0ba1ab38a5fd.png">
<img width="400" alt="Screen Shot 2023-05-04 at 12 17 07 PM"
src="https://user-images.githubusercontent.com/373691/236293475-ad04cb1c-b49f-46aa-8ae6-2df62123b516.png">

PR renames `Terms joins` editor panel to `Joins` and updates panel to
accommodate spatial joins. Displays UI for creating, editing and
deleting spatial joins.
<img width="200" alt="Screen Shot 2023-05-04 at 12 17 20 PM"
src="https://user-images.githubusercontent.com/373691/236293486-49aa8063-0860-4aa7-af85-e47f899a3885.png">
<img width="400" alt="Screen Shot 2023-05-04 at 12 41 39 PM"
src="https://user-images.githubusercontent.com/373691/236298721-e237b801-0539-4960-82e6-d992f5bd8bb4.png">
<img width="300" alt="Screen Shot 2023-05-04 at 12 17 25 PM"
src="https://user-images.githubusercontent.com/373691/236293489-b18c7a0a-b339-42f0-870d-88785175c1f6.png">
<img width="300" alt="Screen Shot 2023-05-04 at 12 17 37 PM"
src="https://user-images.githubusercontent.com/373691/236293492-f4ea3b9b-d28d-46d8-a243-c0e82cb5efda.png">

PR also updates inspector request registration name and description to
provide less technical names that provide better meaning of what request
is fetching and how everything fits together. I think this really helps
understandability of join requests
<img width="500" alt="Screen Shot 2023-05-04 at 12 22 56 PM"
src="https://user-images.githubusercontent.com/373691/236294739-53d32f65-a5e5-4b6d-b41a-7f76fcd731b5.png">


#### Known issues
Issues discovered by this PR that are in main and will be resolved
separately.
* When using spatial join wizard, if there are no matches to left source
then layer gets stuck in loading state
#156630
* Term join left field change not applied as expected
#156631

#### Developer level changes

LayerDescriptor
* Changes joins from `JoinDescriptor` to `Partial<JoinDescriptor>`. This
did not change the content, just updated the type to better reflect
contents.

JoinDescriptor
* Changes right from `JoinSourceDescriptor` to
`Partial<JoinSourceDescriptor>`. This did not change the content, just
updated the type to better reflect contents.

IVectorLayer interface changes
* Remove getJoinsDisabledReason
* Remove showJoinEditor

IVectorSource interface changes
* Replaced showJoinEditor with supportsJoins
* Removed getJoinsDisabledReason

Replaced GeoIndexPatternSelect prop `value` with `dataView`.
1) provides better symmetry since on change return DataView
2) First time GeoIndexPatternSelect need to use a pre-loaded data view.
By passing in DataView, loading state can be more easily handled.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Nick Peihl <[email protected]>
  • Loading branch information
3 people authored May 17, 2023
1 parent 5d96ef9 commit 596c7b3
Show file tree
Hide file tree
Showing 102 changed files with 2,310 additions and 1,226 deletions.
4 changes: 2 additions & 2 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -9136,13 +9136,13 @@
"description": "Non-default value of setting."
}
},
"observability:enableInspectEsQueries": {
"observability:syntheticsThrottlingEnabled": {
"type": "boolean",
"_meta": {
"description": "Non-default value of setting."
}
},
"observability:syntheticsThrottlingEnabled": {
"observability:enableInspectEsQueries": {
"type": "boolean",
"_meta": {
"description": "Non-default value of setting."
Expand Down
10 changes: 10 additions & 0 deletions test/functional/services/inspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,16 @@ export class InspectorService extends FtrService {
return selectedOption[0];
}

/**
* Opens request by name. Use when inspector has multiple requests and you want to view a specific request
*/
public async openRequestByName(requestName: string): Promise<void> {
await this.openInspectorRequestsView();
this.log.debug(`Open Inspector request ${requestName}`);
await this.testSubjects.click('inspectorRequestChooser');
await this.testSubjects.click(`inspectorRequestChooser${requestName.replace(/\s+/, '_')}`);
}

/**
* Returns request name as the comma-separated string from combobox
*/
Expand Down
6 changes: 5 additions & 1 deletion x-pack/plugins/maps/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,16 @@ export enum SOURCE_TYPES {
ES_GEO_LINE = 'ES_GEO_LINE',
ES_SEARCH = 'ES_SEARCH',
ES_PEW_PEW = 'ES_PEW_PEW',
ES_TERM_SOURCE = 'ES_TERM_SOURCE',
ES_ML_ANOMALIES = 'ML_ANOMALIES',
EMS_XYZ = 'EMS_XYZ', // identifies a custom TMS source. EMS-prefix in the name is a little unfortunate :(
WMS = 'WMS',
KIBANA_TILEMAP = 'KIBANA_TILEMAP',
GEOJSON_FILE = 'GEOJSON_FILE',
MVT_SINGLE_LAYER = 'MVT_SINGLE_LAYER',

// join sources
ES_DISTANCE_SOURCE = 'ES_DISTANCE_SOURCE',
ES_TERM_SOURCE = 'ES_TERM_SOURCE',
TABLE_SOURCE = 'TABLE_SOURCE',
}

Expand Down Expand Up @@ -335,6 +338,7 @@ export enum WIZARD_ID {
MVT_VECTOR = 'mvtVector',
WMS_LAYER = 'wmsLayer',
TMS_LAYER = 'tmsLayer',
SPATIAL_JOIN = 'spatialJoin',
}

export enum MASK_OPERATOR {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type Attribution = {

export type JoinDescriptor = {
leftField?: string;
right: JoinSourceDescriptor;
right: Partial<JoinSourceDescriptor>;
};

export type TileMetaFeature = Feature & {
Expand Down Expand Up @@ -76,7 +76,7 @@ export type LayerDescriptor = {

export type VectorLayerDescriptor = LayerDescriptor & {
type: LAYER_TYPE.GEOJSON_VECTOR | LAYER_TYPE.MVT_VECTOR | LAYER_TYPE.BLENDED_VECTOR;
joins?: JoinDescriptor[];
joins?: Array<Partial<JoinDescriptor>>;
style: VectorStyleDescriptor;
disableTooltips?: boolean;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,18 @@ export type ESPewPewSourceDescriptor = AbstractESAggSourceDescriptor & {
destGeoField: string;
};

export type ESTermSourceDescriptor = AbstractESAggSourceDescriptor & {
term: string; // term field name
export type AbstractESJoinSourceDescriptor = AbstractESAggSourceDescriptor & {
whereQuery?: Query;
};

export type ESDistanceSourceDescriptor = AbstractESJoinSourceDescriptor & {
distance: number; // km
geoField: string;
type: SOURCE_TYPES.ES_DISTANCE_SOURCE;
};

export type ESTermSourceDescriptor = AbstractESJoinSourceDescriptor & {
term: string; // term field name
size?: number;
type: SOURCE_TYPES.ES_TERM_SOURCE;
};
Expand Down Expand Up @@ -183,4 +192,7 @@ export type TableSourceDescriptor = {
term: string;
};

export type JoinSourceDescriptor = ESTermSourceDescriptor | TableSourceDescriptor;
export type JoinSourceDescriptor =
| ESDistanceSourceDescriptor
| ESTermSourceDescriptor
| TableSourceDescriptor;
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function addTypeToTermJoin({ attributes }: { attributes: MapAttributes })
if (!vectorLayer.joins) {
return;
}
vectorLayer.joins.forEach((join: JoinDescriptor) => {
vectorLayer.joins.forEach((join: Partial<JoinDescriptor>) => {
if (!join.right) {
return;
}
Expand Down
8 changes: 4 additions & 4 deletions x-pack/plugins/maps/common/migrations/join_agg_key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ export function migrateJoinAggKey({ attributes }: { attributes: MapAttributes })
return;
}

const legacyJoinFields = new Map<string, JoinDescriptor>();
vectorLayerDescriptor.joins.forEach((joinDescriptor: JoinDescriptor) => {
const legacyJoinFields = new Map<string, Partial<JoinDescriptor>>();
vectorLayerDescriptor.joins.forEach((joinDescriptor: Partial<JoinDescriptor>) => {
_.get(joinDescriptor, 'right.metrics', []).forEach((aggDescriptor: AggDescriptor) => {
const legacyAggKey = getLegacyAggKey({
aggType: aggDescriptor.type,
Expand All @@ -104,13 +104,13 @@ export function migrateJoinAggKey({ attributes }: { attributes: MapAttributes })
const style: any = vectorLayerDescriptor.style!.properties[key as VECTOR_STYLES];
if (_.get(style, 'options.field.origin') === FIELD_ORIGIN.JOIN) {
const joinDescriptor = legacyJoinFields.get(style.options.field.name);
if (joinDescriptor) {
if (joinDescriptor?.right?.id) {
const { aggType, aggFieldName } = parseLegacyAggKey(style.options.field.name);
// Update legacy join agg key to new join agg key
style.options.field.name = getJoinAggKey({
aggType,
aggFieldName,
rightSourceId: joinDescriptor.right.id!,
rightSourceId: joinDescriptor.right.id,
});
}
}
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/maps/common/migrations/references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export function extractReferences({
const joins = vectorLayer.joins ? vectorLayer.joins : [];
joins.forEach((join, joinIndex) => {
if (
join.right &&
'indexPatternId' in join.right &&
!adhocDataViewIds.includes(
(join.right as IndexPatternReferenceDescriptor).indexPatternId!
Expand Down Expand Up @@ -147,7 +148,7 @@ export function injectReferences({
const vectorLayer = layer as VectorLayerDescriptor;
const joins = vectorLayer.joins ? vectorLayer.joins : [];
joins.forEach((join) => {
if ('indexPatternRefName' in join.right) {
if (join.right && 'indexPatternRefName' in join.right) {
const sourceDescriptor = join.right as IndexPatternReferenceDescriptor;
const reference = findReference(sourceDescriptor.indexPatternRefName!, references);
sourceDescriptor.indexPatternId = reference.id;
Expand Down
23 changes: 17 additions & 6 deletions x-pack/plugins/maps/common/telemetry/layer_stats_collector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
ESGeoGridSourceDescriptor,
ESSearchSourceDescriptor,
LayerDescriptor,
JoinDescriptor,
VectorLayerDescriptor,
} from '../descriptor_types';
import type { MapAttributes } from '../content_management';
Expand Down Expand Up @@ -49,7 +50,12 @@ export class LayerStatsCollector {
this._layerCount = layerList.length;
layerList.forEach((layerDescriptor) => {
this._updateCounts(getBasemapKey(layerDescriptor), this._basemapCounts);
this._updateCounts(getJoinKey(layerDescriptor), this._joinCounts);
const joins = (layerDescriptor as VectorLayerDescriptor)?.joins;
if (joins && joins.length) {
joins.forEach((joinDescriptor) => {
this._updateCounts(getJoinKey(joinDescriptor), this._joinCounts);
});
}
this._updateCounts(getLayerKey(layerDescriptor), this._layerCounts);
this._updateCounts(getResolutionKey(layerDescriptor), this._resolutionCounts);
this._updateCounts(getScalingKey(layerDescriptor), this._scalingCounts);
Expand Down Expand Up @@ -147,11 +153,16 @@ function getBasemapKey(layerDescriptor: LayerDescriptor): EMS_BASEMAP_KEYS | nul
return null;
}

function getJoinKey(layerDescriptor: LayerDescriptor): JOIN_KEYS | null {
return layerDescriptor.type === LAYER_TYPE.GEOJSON_VECTOR &&
(layerDescriptor as VectorLayerDescriptor)?.joins?.length
? JOIN_KEYS.TERM
: null;
function getJoinKey(joinDescriptor: Partial<JoinDescriptor>): JOIN_KEYS | null {
if (joinDescriptor?.right?.type === SOURCE_TYPES.ES_TERM_SOURCE) {
return JOIN_KEYS.TERM;
}

if (joinDescriptor?.right?.type === SOURCE_TYPES.ES_DISTANCE_SOURCE) {
return JOIN_KEYS.DISTANCE;
}

return null;
}

function getLayerKey(layerDescriptor: LayerDescriptor): LAYER_KEYS | null {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"title": "France Map",
"description": "",
"mapStateJSON": "{\"zoom\":3.43,\"center\":{\"lon\":-16.30411,\"lat\":42.88411},\"timeFilters\":{\"from\":\"now-15w\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":false,\"interval\":0},\"query\":{\"query\":\"\",\"language\":\"lucene\"}}",
"layerListJSON": "[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"id\":\"csq5v\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.65,\"visible\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"TILE\"},{\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"france_departments\"},\"id\":\"65xbw\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.25,\"visible\":true,\"joins\":[{\"leftField\":\"iso_3166_2\",\"right\":{\"id\":\"6a263f96-7a96-4f5a-a00e-c89178c1d017\"}}],\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#19c1e6\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"GEOJSON_VECTOR\"},{\"sourceDescriptor\":{\"id\":\"240125db-e612-4001-b853-50107e55d984\",\"type\":\"ES_SEARCH\",\"scalingType\":\"LIMIT\",\"indexPatternId\":\"ff959d40-b880-11e8-a6d9-e546fe2bba5f\",\"geoField\":\"geoip.location\",\"limit\":2048,\"filterByMapBounds\":true,\"tooltipProperties\":[]},\"id\":\"mdae9\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#1ce619\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"GEOJSON_VECTOR\"}]",
"layerListJSON": "[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"id\":\"csq5v\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.65,\"visible\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"TILE\"},{\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"france_departments\"},\"id\":\"65xbw\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.25,\"visible\":true,\"joins\":[{\"leftField\":\"iso_3166_2\",\"right\":{\"id\":\"6a263f96-7a96-4f5a-a00e-c89178c1d017\",\"type\":\"ES_TERM_SOURCE\"}}],\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#19c1e6\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"GEOJSON_VECTOR\"},{\"sourceDescriptor\":{\"id\":\"240125db-e612-4001-b853-50107e55d984\",\"type\":\"ES_SEARCH\",\"scalingType\":\"LIMIT\",\"indexPatternId\":\"ff959d40-b880-11e8-a6d9-e546fe2bba5f\",\"geoField\":\"geoip.location\",\"limit\":2048,\"filterByMapBounds\":true,\"tooltipProperties\":[]},\"id\":\"mdae9\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#1ce619\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"GEOJSON_VECTOR\"}]",
"uiStateJSON": "{}"
},
"references": [
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/maps/common/telemetry/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export enum EMS_BASEMAP_KEYS {
}

export enum JOIN_KEYS {
DISTANCE = 'distance',
TERM = 'term',
}

Expand Down
22 changes: 12 additions & 10 deletions x-pack/plugins/maps/public/actions/layer_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ import { IField } from '../classes/fields/field';
import type { IESSource } from '../classes/sources/es_source';
import { getDrawMode, getOpenTOCDetails } from '../selectors/ui_selectors';
import { isLayerGroup, LayerGroup } from '../classes/layers/layer_group';
import { isSpatialJoin } from '../classes/joins/is_spatial_join';

export function trackCurrentLayerState(layerId: string) {
return {
Expand Down Expand Up @@ -453,15 +454,16 @@ function updateSourcePropWithoutSync(
});
await dispatch(updateStyleProperties(layerId));
} else if (value === SCALING_TYPES.MVT) {
if (joins.length > 1) {
// Maplibre feature-state join uses promoteId and there is a limit to one promoteId
// Therefore, Vector tile scaling supports only one join
dispatch({
type: SET_JOINS,
layerId,
joins: [joins[0]],
});
}
const filteredJoins = joins.filter((joinDescriptor) => {
return !isSpatialJoin(joinDescriptor);
});
// Maplibre feature-state join uses promoteId and there is a limit to one promoteId
// Therefore, Vector tile scaling supports only one join
dispatch({
type: SET_JOINS,
layerId,
joins: filteredJoins.length ? [filteredJoins[0]] : [],
});
// update style props regardless of updating joins
// Allow style to clean-up data driven style properties with join fields that do not support feature-state.
await dispatch(updateStyleProperties(layerId));
Expand Down Expand Up @@ -764,7 +766,7 @@ export function updateLayerStyleForSelectedLayer(styleDescriptor: StyleDescripto
};
}

export function setJoinsForLayer(layer: ILayer, joins: JoinDescriptor[]) {
export function setJoinsForLayer(layer: ILayer, joins: Array<Partial<JoinDescriptor>>) {
return async (dispatch: ThunkDispatch<MapStoreState, void, AnyAction>) => {
const previousFields = await (layer as IVectorLayer).getFields();
dispatch({
Expand Down
29 changes: 19 additions & 10 deletions x-pack/plugins/maps/public/classes/joins/inner_join.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
SOURCE_TYPES,
} from '../../../common/constants';
import {
ESDistanceSourceDescriptor,
ESTermSourceDescriptor,
JoinDescriptor,
JoinSourceDescriptor,
Expand All @@ -24,7 +25,13 @@ import { IVectorSource } from '../sources/vector_source';
import { IField } from '../fields/field';
import { PropertiesMap } from '../../../common/elasticsearch_util';
import { IJoinSource } from '../sources/join_sources';
import { ESTermSource, TableSource } from '../sources/join_sources';
import {
ESDistanceSource,
isSpatialSourceComplete,
ESTermSource,
isTermSourceComplete,
TableSource,
} from '../sources/join_sources';

export function createJoinSource(
descriptor: Partial<JoinSourceDescriptor> | undefined
Expand All @@ -33,23 +40,25 @@ export function createJoinSource(
return;
}

if (
descriptor.type === SOURCE_TYPES.ES_TERM_SOURCE &&
descriptor.indexPatternId !== undefined &&
descriptor.term !== undefined
) {
if (descriptor.type === SOURCE_TYPES.ES_DISTANCE_SOURCE && isSpatialSourceComplete(descriptor)) {
return new ESDistanceSource(descriptor as ESDistanceSourceDescriptor);
}

if (descriptor.type === SOURCE_TYPES.ES_TERM_SOURCE && isTermSourceComplete(descriptor)) {
return new ESTermSource(descriptor as ESTermSourceDescriptor);
} else if (descriptor.type === SOURCE_TYPES.TABLE_SOURCE) {
}

if (descriptor.type === SOURCE_TYPES.TABLE_SOURCE) {
return new TableSource(descriptor as TableSourceDescriptor);
}
}

export class InnerJoin {
private readonly _descriptor: JoinDescriptor;
private readonly _descriptor: Partial<JoinDescriptor>;
private readonly _rightSource?: IJoinSource;
private readonly _leftField?: IField;

constructor(joinDescriptor: JoinDescriptor, leftSource: IVectorSource) {
constructor(joinDescriptor: Partial<JoinDescriptor>, leftSource: IVectorSource) {
this._descriptor = joinDescriptor;
this._rightSource = createJoinSource(this._descriptor.right);
this._leftField = joinDescriptor.leftField
Expand Down Expand Up @@ -133,7 +142,7 @@ export class InnerJoin {
return this._rightSource;
}

toDescriptor(): JoinDescriptor {
toDescriptor(): Partial<JoinDescriptor> {
return this._descriptor;
}

Expand Down
13 changes: 13 additions & 0 deletions x-pack/plugins/maps/public/classes/joins/is_spatial_join.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import type { JoinDescriptor } from '../../../common/descriptor_types';
import { SOURCE_TYPES } from '../../../common/constants';

export function isSpatialJoin(joinDescriptor: Partial<JoinDescriptor>) {
return joinDescriptor?.right?.type === SOURCE_TYPES.ES_DISTANCE_SOURCE;
}
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,6 @@ export class BlendedVectorLayer extends GeoJsonVectorLayer implements IVectorLay
: displayName;
}

showJoinEditor() {
return true;
}

getJoinsDisabledReason() {
return this._documentSource.getJoinsDisabledReason();
}

getJoins() {
return [];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export class GeoJsonVectorLayer extends AbstractVectorLayer {
return;
}

const joinStates = await this._syncJoins(syncContext, style);
const joinStates = await this._syncJoins(syncContext, style, sourceResult.featureCollection);
await performInnerJoins(
sourceResult,
joinStates,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export async function performInnerJoins(
values: { leftFieldName },
})
: i18n.translate('xpack.maps.vectorLayer.joinError.noMatchesMsg', {
defaultMessage: `Left field does not match right field. Left field: '{leftFieldName}' has values { leftFieldValues }. Right field: '{rightFieldName}' has values: { rightFieldValues }.`,
defaultMessage: `Left field values do not match right field values. Left field: '{leftFieldName}' has values { leftFieldValues }. Right field: '{rightFieldName}' has values: { rightFieldValues }.`,
values: {
leftFieldName,
leftFieldValues: prettyPrintArray(joinStatus.keys),
Expand Down
Loading

0 comments on commit 596c7b3

Please sign in to comment.