GitHub user xuchuanyin opened a pull request:
https://github.com/apache/carbondata/pull/2374
WIP: Support csv based carbon table
This PR is only an initial implementation and has some restrictions.
1. create csv based carbon table using
```SQL
CREATE TABLE fact_table (
col1 bigint, col2 string, ..., col100 string)
STORED BY 'CarbonData'
TBLPROPERTIES(
'foramt'='csv',
'csv.delimiter'=',',
'csv.header'='col1,col2,col100');
```
2. Load data to this table using
```SQL
ALTER TABLE fact_table
ADD SEGMENT LOCATION 'path/to/data1'
```
**Note**: *In order to reduce data movement, we just mapping the origin csv
to CarbonData segment using the following statement.*
3. Query on this table has no difference from that on ordinary carbon table.
Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:
- [ ] Any interfaces changed?
- [ ] Any backward compatibility impacted?
- [ ] Document update required?
- [ ] Testing done
Please provide details on
- Whether new unit test cases have been added or why no new tests
are required?
- How it is tested? Please attach test report.
- Is it a performance related change? Please attach the performance
test report.
- Any additional information to help reviewers in testing this
change.
- [ ] For large changes, please consider breaking it into sub-tasks under
an umbrella JIRA.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/xuchuanyin/carbondata 0613_support_csv_table
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/carbondata/pull/2374.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2374
----
commit e9fa7e6402c7584146a52542534e719ca64143c1
Author: xuchuanyin <xuchuanyin@...>
Date: 2018-06-13T01:03:28Z
support create csv based carbontable
commit c71e9a5bda1ac23fa991a71e0e091f7814bd2117
Author: xuchuanyin <xuchuanyin@...>
Date: 2018-06-13T01:45:10Z
support add segment for csv carbon table
commit 01a8f00b5a50c50c6dd7854bd1d5500ac484b6e6
Author: xuchuanyin <xuchuanyin@...>
Date: 2018-06-14T09:37:24Z
Add csv record reader for csv carbon table
----
---