Comments (6)
Would it be as simple as changing this line
odbc2parquet/src/query/strategy.rs
Lines 82 to 89 in 8e52f25
to scale: p @ 0..=9,
from odbc2parquet.
Hello @bkief,
My Rust is well "rusty", but am I correct in understanding that all ODBC Decimal Types convert to FIXED_LEN_BYTE_ARRAY. I have a Oracle NUMBER(5,3) and I was surprised its physical_type was not int32
Yes, you are correct. All Decimals with a scale different from 0 are currently represented as FIXED_LEN_BYTE_ARRAY
. The binary representation in there is a twos_complement and not what some might suspect, their text representation.
Would it be as simple as changing this line
No, because ODBC would not represent the DECIMAL as an integer. identical
in that context means that the ODBC and Parquet representation of the type in question are identical and can be copied without any transformation. Yet the most reliable way to get decimals out of ODBC is to transfer them in their text representation. So some conversion must always happen, but for decimals with scale 0 which ODBC will happily convert into integers for me.
Cheers, Markus
from odbc2parquet.
Would it be better for you if the physical type were i32
? If so, how?
from odbc2parquet.
I was hoping to use the delta_bitpacked encoding. I have time-series data that lends itself very well to that format.
from odbc2parquet.
Thanks, I know understand much better. Could you think of any reason why someone might not want to have the decimal backed by a Physical integer type?
from odbc2parquet.
Hello @bkief ,
odbc2parquet 0.10.0
is released. The behaviour changes in terms of physical types are as follows:
precision 0 to 9 (inclusive) => INT32
precision 10 to 18 (inclusive) => INT64
precision 18 to 38 (inclusive) => FIXED_LEN_BYTE_ARRAY
Cheers, Markus
from odbc2parquet.
Related Issues (20)
- Support for data type timezone conversion to UTC HOT 11
- Warnings shown when quiet flag HOT 4
- Automatic change of batch size when memory error occurs HOT 7
- Converted type not written to output file for timestamps without timezone HOT 9
- Support MSSQL data type TIME HOT 10
- Compression SNAPPY not possible since version 0.13.2 HOT 5
- export in chunks? HOT 3
- Flag to support legacy converted types HOT 1
- Option to not generate file if row count is 0 HOT 4
- setup types for particular column HOT 2
- Issue with MySQL JSON columns HOT 8
- Reserved Column Names not Supported HOT 1
- Feature Request - Support column encryption in the generated parquet file HOT 4
- JobName as .sql file in config file HOT 4
- Parquet format version support HOT 9
- Feature suggestion: connect to URL `postgresql://username:pass@host/database` HOT 1
- What permissions are needed? - State: 42501, Native error: 1, Message: ERROR: permission denied HOT 4
- StarRocks parquet file import of parquet file generated by odbc2parquet fails with encoding error HOT 11
- Memory allocation with column-length-limit HOT 11
- Build for alpine HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odbc2parquet.