Skip to content

Enable fallback synthetic source for point and shape#109312

Merged
lkts merged 5 commits intoelastic:mainfrom
lkts:feature/synthetic_source_fallback_point_shape
Jun 4, 2024
Merged

Enable fallback synthetic source for point and shape#109312
lkts merged 5 commits intoelastic:mainfrom
lkts:feature/synthetic_source_fallback_point_shape

Conversation

@lkts
Copy link
Copy Markdown
Contributor

@lkts lkts commented Jun 3, 2024

This PR enables fallback synthetic source for point and shape fields and adds appropriate tests.

Contributes to #106460.

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @lkts, I've created a changelog YAML for you.

.toList();
Object outBlock = outBlockList.size() == 1 ? outBlockList.get(0) : outBlockList;
return new SyntheticSourceExample(representations, representations, outBlock, this::mapping);
} else {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: skip else after return.

.filter(Objects::nonNull)
.map(CartesianPoint::toWKT)
.toList();
Object outBlock = outBlockList.size() == 1 ? outBlockList.get(0) : outBlockList;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the list be empty, e.g. if all values are null?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but it is handled in test code separately.

Copy link
Copy Markdown
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lkts
Copy link
Copy Markdown
Contributor Author

lkts commented Jun 4, 2024

@elasticmachine run elasticsearch-ci/7.17.22 / bwc-snapshots

@lkts
Copy link
Copy Markdown
Contributor Author

lkts commented Jun 4, 2024

buildkite test this

@lkts lkts merged commit db310b4 into elastic:main Jun 4, 2024
@lkts lkts deleted the feature/synthetic_source_fallback_point_shape branch June 4, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants