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

Initial work to support core data types in Data Prepper #4496

Merged
merged 2 commits into from
May 3, 2024

Conversation

dlvenable
Copy link
Member

Description

Currently Data Prepper has a convert_entry_type which allows users to convert to a target type. This change creates a new enum Type which I believe we can use as the core enum for all data types going forward.

This work can help us keep consistency between convert_entry_type, conditionals for evaluating type information (#4478), and future features.

Issues Resolved

N/A

Contributes toward: #4478

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…itially created to help connect the convert_entry_type processor with upcoming work for evaluating type information as part of opensearch-project#4478.

Signed-off-by: David Venable <[email protected]>
*
* @since 2.8
*/
public enum Type {
Copy link
Member Author

Choose a reason for hiding this comment

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

I originally had this named as DataType. Thoughts on the name?

Copy link
Contributor

Choose a reason for hiding this comment

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

I like calling it as DataType than simply calling it as Type

graytaylor0
graytaylor0 previously approved these changes May 2, 2024
Copy link
Member

@graytaylor0 graytaylor0 left a comment

Choose a reason for hiding this comment

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

This is a good consolidation!

DOUBLE("double", new DoubleConverter()),
BOOLEAN("boolean", new BooleanConverter()),
LONG("long", new LongConverter());
INTEGER(Type.INTEGER, new IntegerConverter()),
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if there are any tests for the config but just want to verify that we aren't breaking the config and requiring caps to not break backwards compatibility with integer instead of INTEGER

Copy link
Member Author

Choose a reason for hiding this comment

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

kkondaka
kkondaka previously approved these changes May 2, 2024
Signed-off-by: David Venable <[email protected]>
@dlvenable dlvenable dismissed stale reviews from kkondaka and graytaylor0 via ecd9d4a May 3, 2024 16:16
@dlvenable dlvenable merged commit 32941ad into opensearch-project:main May 3, 2024
47 checks passed
@dlvenable dlvenable deleted the data-prepper-data-type branch May 3, 2024 23:44
@kkondaka kkondaka added this to the v2.8 milestone May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants