Comments (3)
Hi Jacob,
Thanks again for your precious feedback :-)
I think there are three separate things here:
- Order is not preserved when using the
columns
option (clearly a bug) - Is there a gain in specifing manually the schema in the multifile case?
- Speeding up the I/O by selecting only some columns.
1), this is clearly a bug, that I found (the sorted
should not be called):
I will open a PR and push the fix.
2), since #55, it is not obvious that not providing the schema will add overhead. As long as you know all the FITS schemas are the same, the code will perform minimal checks.
3), this is tricky. In practice, the option columns
allows to skip the decoding part, but not the loading part, hence there is only a little speed-up. To do it properly, we would need to implement filters at the level of the record reader directly. This work is planned, I am just lacking of time :-(
Having said that, the proper way to get speed-up would be to upgrade the structure of spark-fits to Apache Spark Data Source V2 (we are currently using V1), recently released. But that's a lot of work, and probably needs to be done in the context of an internship as a whole project.
from spark-fits.
Also on 3), FITS is row-based, so when we read data it is natural to do:
(row, col)
element (0, 0) / element (0, 1) / element (0, 2) / ...
element (1, 0) / element (1, 1) / element (1, 2) / ...
...
while for an efficient reading of columns, you would rather prefer to have a column-based format:
(row, col)
element (0, 0) / element (1, 0) / element (2, 0) / ...
element (0, 1) / element (1, 1) / element (2, 1) / ...
...
I suspect this will probably make the column filter pushdown implementation no so straightforward :-(
from spark-fits.
The ordering has been fixed in #77
from spark-fits.
Related Issues (20)
- Slashes in TTYPEn are not handled HOT 5
- Switch the CI to GitHub actions
- header challenge: cannot infer size of type B from the header HOT 5
- FITS HDU image: no bijection between TFORMn value (L, A, B, J, K, ..) and `BITPIX`
- DataFrame reader cannot load files as list of paths or comma separated string of paths HOT 5
- Read data from s3 HOT 2
- Benchmarking on s3
- header challenge: header with multivalued columns raises "java.lang.ArithmeticException: / by zero" during df.select(any_column).show() or df.select(any_column).take() HOT 5
- Long row size (> 1KB): java.lang.ArithmeticException: / by zero HOT 1
- Add support for Scala 2.12 HOT 1
- Bad mapping between scalars (SPARK) and 1element vector (FITS) HOT 1
- fits files that match glob expressions which might contain empty HDU tables (NAXIS=0) causes fatal error HOT 4
- subset of rows from multiple DoubleType columns are incorrectly loaded as very small/large values HOT 12
- some columns are missing in dataframe when loaded with spark-fits (although present when loaded with topcat/astropy/fitsio) HOT 1
- CI: Install of Oracle JDK8 is failing HOT 1
- Relationship between SparkFits dataframe and source fits file? HOT 13
- spark-fits write mode HOT 2
- spark-fits produces duplicated rows when reading some fits files HOT 7
- Nans are present even after filtering out nans when reading large fits files (~1GB) HOT 4
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 spark-fits.