Comments (14)
This behavior is fixed in odbc2parquet 4.1.2
as it uses parquet 50.
from odbc2parquet.
I assumed the parquet-rs
crate would do so by default. Seems I am wrong. What is a good way to test statistics have been written?
from odbc2parquet.
Note to self: https://docs.rs/parquet/latest/parquet/file/properties/struct.WriterProperties.html#method.statistics_enabled
Happy to change the default, still wonder how to test this, though.
from odbc2parquet.
Extracting statistics from a file written with odbc2parquet
worked for me. To do this I used a piece of Python code kindly supplied by Uwe on Stack Overflow:
import pyarrow.parquet as pq
pq_file = pq.ParquetFile("tmp.par")
# Get metadata for the i-th RowGroup
rg_meta = pq_file.metadata.row_group(0)
# Get the "max" statistic for the k-th column
max_of_col = rg_meta.column(0).statistics.max
print(max_of_col)
Now, I wonder, what makes you think odbc2parquet
does not write statistics? Are the statistics I saw calculated on demand?
from odbc2parquet.
Interestingly this seems to be the case with a single specific table only:
I can reproduce this by fetching a single column from a SQL Server database.
I'll try to create a reproducer for you next week.
from odbc2parquet.
Minimal reproducer on my SQL Server instance:
CREATE TABLE tmp (x CHAR(1))
INSERT INTO tmp (x) VALUES ('a')
Fetch with SELECT * FROM tmp
.
from odbc2parquet.
I can reproduce this, but I wonder if this is an issue. It parquet-rs
seems to generate statistics for e.g. integer columns, but not for text. Explicitly enabling writing statistics in the writer properties does not change it. So if this is an issue, I think I would need to send it upstream. I wonder however if I am missing another flag I could set or if this could even be considered sensible behavior for text columns.
from odbc2parquet.
Am I also right in assuming it is specifically about the min/max statistic?
from odbc2parquet.
Yes. This is important because it helps query engines skip row groups that are irrelevant.
Am I right to assume that this is the implementation used by this tool? I can open a ticket. https://github.com/apache/arrow-rs
from odbc2parquet.
Am I right to assume that this is the implementation used by this tool? I can open a ticket. https://github.com/apache/arrow-rs
Yes this is the correct repository to raise an issue. odbc2parquet
uses the parquet
crate. The repository in question also is home to the arrow
crate (which you might have guessed).
In case it could be of help, here is the point in odbc2parquet
s code there the writer properties are instantiated:
I rely very much on the defaults, but setting to produce statistics explicitly did not change behavior.
from odbc2parquet.
Feel free to link this issue to the upstream ticket.
from odbc2parquet.
I wonder if it's the same as apache/arrow-rs#5162
from odbc2parquet.
This might very well be the case. I think text is written as "physical" type bytes with logical type UTF-8
from odbc2parquet.
The ticket was unrelated. My ticket: apache/arrow-rs#5270
from odbc2parquet.
Related Issues (20)
- 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
- file-size-threshold generates wrong size files HOT 1
- --no-empty-file option doesn't work properly when row-groups-per-file should devide result into few files HOT 6
- MSSQL nvarchar - missing column in output file HOT 2
- Feature request: Progress bar for full table copies HOT 6
- Data source must return valid UTF16 in wide character buffer: Utf16Error HOT 4
- Make zstd the default compression HOT 4
- Build release assets for Ubuntu ARM64 as well HOT 11
- Exporter adding trailing zero's in when exporting from PostgreSQL Numeric dtype HOT 5
- thread 'main' panicked at src/query/date.rs:60:87: called `Option::unwrap()` on a `None` value HOT 7
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.