bkief commented on code in PR #42169:
URL: https://github.com/apache/arrow/pull/42169#discussion_r1657149214


##########
python/pyarrow/parquet/core.py:
##########
@@ -873,6 +873,23 @@ def _sanitize_table(table, new_schema, flavor):
     Specify the sort order of the data being written. The writer does not sort
     the data nor does it verify that the data is sorted. The sort order is
     written to the row group metadata, which can then be used by readers.
+store_decimal_as_integer : bool, default False
+    Allow decimals with 1 <= precision <= 18 to be stored as integers.
+    In Parquet, DECIMAL can be stored in any of the following physical types:
+    - int32: for 1 <= precision <= 9.
+    - int64: for 10 <= precision <= 18.
+    - fixed_len_byte_array: precision is limited by the array size.
+      Length n can store <= floor(log_10(2^(8*n - 1) - 1)) base-10 digits.
+    - binary: precision is unlimited. The minimum number of bytes to store the
+      unscaled value is used.
+
+    By default, this is DISABLED and all decimal types annotate 
fixed_len_byte_array.
+    When enabled, the writer will use following physical types to store 
decimals:

Review Comment:
   I lazily copied and pasted from the Cpp docs. Shall we update that as well 
or is there a more suitable open PR for those changes?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to