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

Add scientific notation decimal parsing in parse_decimal #5549

Closed
ion-elgreco opened this issue Mar 24, 2024 · 2 comments · Fixed by #5611
Closed

Add scientific notation decimal parsing in parse_decimal #5549

ion-elgreco opened this issue Mar 24, 2024 · 2 comments · Fixed by #5611
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog help wanted

Comments

@ion-elgreco
Copy link

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In Delta-RS we write min and max stats of a particular column, depending on the value of a decimal this is written in scientific notation. When we interact with a table we parse the logs to get a table state. As a result some users can't read tables that had written these stats.

See related issues:

Describe the solution you'd like
Add support for scientific notation parsing.

Describe alternatives you've considered
None at the moment, our new table replay is deeply tied with the arrow json parser :)

@ion-elgreco ion-elgreco added the enhancement Any new improvement worthy of a entry in the changelog label Mar 24, 2024
@vdelbaen
Copy link

vdelbaen commented Apr 4, 2024

Thank you for creating this issue.

With Delta-RS, I can't read a delta table containing decimals in scientific notation.

Example:

table_url = 'abfss://[email protected]/path/to/delta/table'
dt = dl.DeltaTable(table_url, storage_options={"bearer_token": AZ_TOKEN})

I get the following error:

File [c:\///.venv/Lib/site-packages/deltalake/table.py:401), in DeltaTable.__init__(self, table_uri, version, storage_options, without_files, log_buffer_size)
(...)
    398 
    399 """
    400 self._storage_options = storage_options
--> 401 self._table = RawDeltaTable(
    402     str(table_uri),
    403     version=version,
    404     storage_options=storage_options,
    405     without_files=without_files,
    406     log_buffer_size=log_buffer_size,
    407 )

Exception: Parser error: can't parse the string value 0E-8 to decimal

@tustvold
Copy link
Contributor

label_issue.py automatically added labels {'arrow'} from #5611

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants