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

Question about Decimal Type Limitations in Iceberg #11920

Open
rice668 opened this issue Jan 7, 2025 · 1 comment
Open

Question about Decimal Type Limitations in Iceberg #11920

rice668 opened this issue Jan 7, 2025 · 1 comment
Labels
question Further information is requested

Comments

@rice668
Copy link
Contributor

rice668 commented Jan 7, 2025

Query engine

Spark

Question

Hello Iceberg Community,

image

I would like to ask why Iceberg imposes the restriction on changing the scale for the decimal type. According to the SQL standard, the scale can indeed be changed. For instance, the SQL standard states that:

WeChatWorkScreenshot_e28f4f34-1eca-42bf-b370-c96e335ff958

Given this, I am curious about the rationale behind Iceberg's decision to restrict the change of scale for decimal types.

Thank you!

@rice668 rice668 added the question Further information is requested label Jan 7, 2025
@hashmapybx
Copy link

Hi,
This issue can be considered from two perspectives: storage layout and compatibility.

1.Iceberg typically uses a columnar storage format (such as Parquet or Avro), and data is stored in files according to the original decimal(P,S) layout. Modifying P without changing S may require rewriting the storage file.

2.Iceberg tables may be used by multiple systems or applications, and modifying P may affect compatibility with other systems because different systems may handle decimal types differently. Even if S remains unchanged, increasing P may break compatibility with data exchange and sharing with other systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants