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

to_float and parse_float should have the same implementation #1120

Closed
pront opened this issue Nov 11, 2024 · 3 comments
Closed

to_float and parse_float should have the same implementation #1120

pront opened this issue Nov 11, 2024 · 3 comments
Labels
type: tech debt A code change that does not add user value

Comments

@pront
Copy link
Member

pront commented Nov 11, 2024

While working on #1107, I realized that parse_float doesn't share the same implementation as to_float. The latter has a more generic implementation that can replace the former. Same for to_int and parse_int.

Since 0.43 these deviated, see playground example (needs VRL version v.20.0).

@pront pront added the type: tech debt A code change that does not add user value label Nov 11, 2024
@pront
Copy link
Member Author

pront commented Dec 6, 2024

Ref: vectordotdev/vector#21970 (motivation for fixing this)

@pront
Copy link
Member Author

pront commented Dec 9, 2024

to_int and parse_int are not straightforward because the latter supports multiple bases. We could refactor the code but IMO it is a low priority task.

@pront pront changed the title to_* and parse_* for scalar types should have the same implementation to_float and parse_float should have the same implementation Dec 9, 2024
@pront
Copy link
Member Author

pront commented Dec 9, 2024

#1120 (comment)

@pront pront closed this as completed Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: tech debt A code change that does not add user value
Projects
None yet
Development

No branches or pull requests

1 participant