You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by cheng xu <ch...@gmail.com> on 2014/07/22 10:46:24 UTC
Review Request 23799: HIVE-7390: refactor csv output format with in RFC mode
and add one more option to support formatting as the csv format in hive cli
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/
-----------------------------------------------------------
Review request for hive.
Bugs: HIVE-7390
https://issues.apache.org/jira/browse/HIVE-7390
Repository: hive-git
Description
-------
HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
Diffs
-----
beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 75f7d38cb97fb753a8f39c19488b9ce0a8d77590
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
Diff: https://reviews.apache.org/r/23799/diff/
Testing
-------
Thanks,
cheng xu
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by cheng xu <ch...@intel.com>.
> On July 31, 2014, 10:45 a.m., Lars Francke wrote:
> > beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java, line 50
> > <https://reviews.apache.org/r/23799/diff/4/?file=646700#file646700line50>
> >
> > Instead of initializing it here like this you could get rid of the new parameter and check in getFormattedStr if csvPreference is null. If it is then check in the opts if DSV is selected and which delimiter was specified.
> >
> > That way you wouldn't create a new csvPreference for each row either.
> >
> > Either that or pass in the proper delimiter from the start, see my comment in Beeline
that's a good advice. Is this a possible use case that user changed the delimiter after he choose the DSV output format? Also a problem troubles is that the format array is initialized when beeline is instantiated.
> On July 31, 2014, 10:45 a.m., Lars Francke wrote:
> > beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java, line 500
> > <https://reviews.apache.org/r/23799/diff/4/?file=646699#file646699line500>
> >
> > Now, I have no idea how that works myself but it'd be fabulous if we could specify \001 etc. here as well. It is Hive's default separator after all. Not sure how that parsing stuff is handled so take this as an optional idea but by no means necessary.
The "\001" is meaning "Ctrl+A", right? SuperCSV has a limitation for delimiter that it has to be a char type, so I am not sure whether "\001" is suitable being a separator. At this point, "\001" delimiter may not be easy to fully support just using SuperCSV. We can consider this in a new jira if a strong need for it. Thanks very much for figuring it out.
- cheng
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/#review49214
-----------------------------------------------------------
On July 31, 2014, 5:34 a.m., cheng xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23799/
> -----------------------------------------------------------
>
> (Updated July 31, 2014, 5:34 a.m.)
>
>
> Review request for hive.
>
>
> Bugs: HIVE-7390
> https://issues.apache.org/jira/browse/HIVE-7390
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
>
>
> Diffs
> -----
>
> beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
> beeline/src/java/org/apache/hive/beeline/BeeLine.java 528a98e29c23421f9352bdf7c5edd3a9fae0e3ea
> beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 75f7d38cb97fb753a8f39c19488b9ce0a8d77590
> beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
> beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
> itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
> pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
>
> Diff: https://reviews.apache.org/r/23799/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> cheng xu
>
>
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by Lars Francke <as...@lars-francke.de>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/#review49214
-----------------------------------------------------------
beeline/src/java/org/apache/hive/beeline/BeeLine.java
<https://reviews.apache.org/r/23799/#comment86103>
Probably a good idea to move the "|" to a public static final in BeelineOpts
beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java
<https://reviews.apache.org/r/23799/#comment86102>
Now, I have no idea how that works myself but it'd be fabulous if we could specify \001 etc. here as well. It is Hive's default separator after all. Not sure how that parsing stuff is handled so take this as an optional idea but by no means necessary.
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment86096>
I think this comment can go now :)
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment86093>
1) I know it was public before but a public constructor in a package level class doesn't make sense so it can be removed.
2) Line length in Hive is 100 chars so this can be on one line
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment86097>
Instead of initializing it here like this you could get rid of the new parameter and check in getFormattedStr if csvPreference is null. If it is then check in the opts if DSV is selected and which delimiter was specified.
That way you wouldn't create a new csvPreference for each row either.
Either that or pass in the proper delimiter from the start, see my comment in Beeline
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment86099>
false is the default so no need to specify here
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment86100>
I think all these setters/getters should go.
If not you need to make sure to create a new csvPreference when setting the separator and setting the separator when setting a new csvPreference etc.
These methods are not used anywhere (setSeparator is used in the constructor but that can go) anyway.
beeline/src/main/resources/BeeLine.properties
<https://reviews.apache.org/r/23799/#comment86101>
delimiterForCSV -> delimiterForDSV?
And probably mention that it's | by default
- Lars Francke
On July 31, 2014, 5:34 a.m., cheng xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23799/
> -----------------------------------------------------------
>
> (Updated July 31, 2014, 5:34 a.m.)
>
>
> Review request for hive.
>
>
> Bugs: HIVE-7390
> https://issues.apache.org/jira/browse/HIVE-7390
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
>
>
> Diffs
> -----
>
> beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
> beeline/src/java/org/apache/hive/beeline/BeeLine.java 528a98e29c23421f9352bdf7c5edd3a9fae0e3ea
> beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 75f7d38cb97fb753a8f39c19488b9ce0a8d77590
> beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
> beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
> itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
> pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
>
> Diff: https://reviews.apache.org/r/23799/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> cheng xu
>
>
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by Lars Francke <as...@lars-francke.de>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/#review49325
-----------------------------------------------------------
Ship it!
Two last minor nit-picks. Apart from that it looks good! Thank you for taking care of all my comments.
beeline/src/java/org/apache/hive/beeline/BeeLine.java
<https://reviews.apache.org/r/23799/#comment86303>
space missing
beeline/src/main/resources/BeeLine.properties
<https://reviews.apache.org/r/23799/#comment86305>
I suggest
specify the delimiter for delimiter-separated values output format (default: |)\n \
instead
- Lars Francke
On Aug. 1, 2014, 2:32 a.m., cheng xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23799/
> -----------------------------------------------------------
>
> (Updated Aug. 1, 2014, 2:32 a.m.)
>
>
> Review request for hive.
>
>
> Bugs: HIVE-7390
> https://issues.apache.org/jira/browse/HIVE-7390
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
>
>
> Diffs
> -----
>
> beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
> beeline/src/java/org/apache/hive/beeline/BeeLine.java 528a98e29c23421f9352bdf7c5edd3a9fae0e3ea
> beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 75f7d38cb97fb753a8f39c19488b9ce0a8d77590
> beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
> beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
> itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
> pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
>
> Diff: https://reviews.apache.org/r/23799/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> cheng xu
>
>
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by cheng xu <ch...@intel.com>.
> On Aug. 6, 2014, 5:50 a.m., Lars Francke wrote:
> > I don't think this latest patch is the one you wanted to upload?
I rebased the code to the latest and it has some difference comparing to the v6.
- cheng
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/#review49698
-----------------------------------------------------------
On Aug. 6, 2014, 5:41 a.m., cheng xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23799/
> -----------------------------------------------------------
>
> (Updated Aug. 6, 2014, 5:41 a.m.)
>
>
> Review request for hive.
>
>
> Bugs: HIVE-7390
> https://issues.apache.org/jira/browse/HIVE-7390
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
>
>
> Diffs
> -----
>
> beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
> beeline/src/java/org/apache/hive/beeline/BeeLine.java 10fd2e2daac78ca43d45c74fcbad6b720a8d28ad
> beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java a1e07a090c222be42a381fa2052f0bda97867432
> beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
> beeline/src/main/resources/BeeLine.properties ddb0ba74d4bd3f0255eeb7d791eb28108c474ae1
> itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
> pom.xml b3216e1ea4abcf692a933024d415754322210d59
>
> Diff: https://reviews.apache.org/r/23799/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> cheng xu
>
>
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by Lars Francke <as...@lars-francke.de>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/#review49698
-----------------------------------------------------------
I don't think this latest patch is the one you wanted to upload?
- Lars Francke
On Aug. 6, 2014, 5:41 a.m., cheng xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23799/
> -----------------------------------------------------------
>
> (Updated Aug. 6, 2014, 5:41 a.m.)
>
>
> Review request for hive.
>
>
> Bugs: HIVE-7390
> https://issues.apache.org/jira/browse/HIVE-7390
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
>
>
> Diffs
> -----
>
> beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
> beeline/src/java/org/apache/hive/beeline/BeeLine.java 10fd2e2daac78ca43d45c74fcbad6b720a8d28ad
> beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java a1e07a090c222be42a381fa2052f0bda97867432
> beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
> beeline/src/main/resources/BeeLine.properties ddb0ba74d4bd3f0255eeb7d791eb28108c474ae1
> itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
> pom.xml b3216e1ea4abcf692a933024d415754322210d59
>
> Diff: https://reviews.apache.org/r/23799/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> cheng xu
>
>
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by cheng xu <ch...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/
-----------------------------------------------------------
(Updated Aug. 6, 2014, 5:41 a.m.)
Review request for hive.
Changes
-------
add related help to the beeline.properties file about the new option "delimiterForDSV"
Bugs: HIVE-7390
https://issues.apache.org/jira/browse/HIVE-7390
Repository: hive-git
Description
-------
HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
Diffs (updated)
-----
beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
beeline/src/java/org/apache/hive/beeline/BeeLine.java 10fd2e2daac78ca43d45c74fcbad6b720a8d28ad
beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java a1e07a090c222be42a381fa2052f0bda97867432
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
beeline/src/main/resources/BeeLine.properties ddb0ba74d4bd3f0255eeb7d791eb28108c474ae1
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
pom.xml b3216e1ea4abcf692a933024d415754322210d59
Diff: https://reviews.apache.org/r/23799/diff/
Testing
-------
Thanks,
cheng xu
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by Szehon Ho <sz...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/#review49673
-----------------------------------------------------------
Just one minor comment
beeline/src/main/resources/BeeLine.properties
<https://reviews.apache.org/r/23799/#comment86956>
Do we need to put a help for 'delimiterForDSV'?
- Szehon Ho
On Aug. 1, 2014, 4:15 p.m., cheng xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23799/
> -----------------------------------------------------------
>
> (Updated Aug. 1, 2014, 4:15 p.m.)
>
>
> Review request for hive.
>
>
> Bugs: HIVE-7390
> https://issues.apache.org/jira/browse/HIVE-7390
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
>
>
> Diffs
> -----
>
> beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
> beeline/src/java/org/apache/hive/beeline/BeeLine.java 528a98e29c23421f9352bdf7c5edd3a9fae0e3ea
> beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 75f7d38cb97fb753a8f39c19488b9ce0a8d77590
> beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
> beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
> itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
> pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
>
> Diff: https://reviews.apache.org/r/23799/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> cheng xu
>
>
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by cheng xu <ch...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/
-----------------------------------------------------------
(Updated Aug. 1, 2014, 4:15 p.m.)
Review request for hive.
Changes
-------
deal with some format issues and thanks again for Lars's comments.
Bugs: HIVE-7390
https://issues.apache.org/jira/browse/HIVE-7390
Repository: hive-git
Description
-------
HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
Diffs (updated)
-----
beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
beeline/src/java/org/apache/hive/beeline/BeeLine.java 528a98e29c23421f9352bdf7c5edd3a9fae0e3ea
beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 75f7d38cb97fb753a8f39c19488b9ce0a8d77590
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
Diff: https://reviews.apache.org/r/23799/diff/
Testing
-------
Thanks,
cheng xu
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by cheng xu <ch...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/
-----------------------------------------------------------
(Updated Aug. 1, 2014, 2:32 a.m.)
Review request for hive.
Changes
-------
(1) get rid of creating csv preference for each row and only update it when delimiter changed in DSV mode
(2) fix some other minor issues according to Lars comments
Bugs: HIVE-7390
https://issues.apache.org/jira/browse/HIVE-7390
Repository: hive-git
Description
-------
HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
Diffs (updated)
-----
beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
beeline/src/java/org/apache/hive/beeline/BeeLine.java 528a98e29c23421f9352bdf7c5edd3a9fae0e3ea
beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 75f7d38cb97fb753a8f39c19488b9ce0a8d77590
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
Diff: https://reviews.apache.org/r/23799/diff/
Testing
-------
Thanks,
cheng xu
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by cheng xu <ch...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/
-----------------------------------------------------------
(Updated July 31, 2014, 5:34 a.m.)
Review request for hive.
Changes
-------
(1) fix code style issues
(2) add option to specify the delimiter for DSV format
(3) add delimiter-separated values format support
Bugs: HIVE-7390
https://issues.apache.org/jira/browse/HIVE-7390
Repository: hive-git
Description
-------
HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
Diffs (updated)
-----
beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
beeline/src/java/org/apache/hive/beeline/BeeLine.java 528a98e29c23421f9352bdf7c5edd3a9fae0e3ea
beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 75f7d38cb97fb753a8f39c19488b9ce0a8d77590
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
Diff: https://reviews.apache.org/r/23799/diff/
Testing
-------
Thanks,
cheng xu
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by Lars Francke <as...@lars-francke.de>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/#review49091
-----------------------------------------------------------
In general this feels a bit awkward. I think better CSV/TSV support is a good idea but "quotedCsv" seems misleading as the old "csv" and "tsv" now quote as well if the separator is contained in the column value.
beeline/src/java/org/apache/hive/beeline/BeeLine.java
<https://reviews.apache.org/r/23799/#comment85924>
Missing space here and next line
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment85920>
remove "this" and call to "getSeparator", can just be "separator".
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment85915>
Can be converted to a variable arity function (e.g. String... vals)
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment85916>
Rename to writer?
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment85917>
Same as above: Can be converted to variable arity method
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment85918>
...variable arity
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment85919>
Remove this and probably replace the call to isSingleQuoted with just "singleQuoted", no need to go through a simple getter
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment85923>
Missing spaces around the else
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment85922>
I'd either remove the getter and setters entirely or they need changing so that things are properly updated when separator/singleQuoted/csvPreference are changed.
Example: Someone passes in a CsvPreference with a different separator than the one set in here.
I think part of this patch needs to be the removal of all these simple (getter/)setters.
If you don't want that then you need some verification logic that things make sense.
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
<https://reviews.apache.org/r/23799/#comment85921>
This is not a getter but a setter.
- Lars Francke
On July 30, 2014, 8:30 a.m., cheng xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23799/
> -----------------------------------------------------------
>
> (Updated July 30, 2014, 8:30 a.m.)
>
>
> Review request for hive.
>
>
> Bugs: HIVE-7390
> https://issues.apache.org/jira/browse/HIVE-7390
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
>
>
> Diffs
> -----
>
> beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
> beeline/src/java/org/apache/hive/beeline/BeeLine.java 528a98e29c23421f9352bdf7c5edd3a9fae0e3ea
> beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
> beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
> itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
> pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
>
> Diff: https://reviews.apache.org/r/23799/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> cheng xu
>
>
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by cheng xu <ch...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/
-----------------------------------------------------------
(Updated July 30, 2014, 8:30 a.m.)
Review request for hive.
Changes
-------
1. use hadoop.io.utils to close stream
2. change integrated test due to code changes
3. add quotedCsv format instead of option according to discussion
4. add one constructor parameter to specify the status of quoted
Bugs: HIVE-7390
https://issues.apache.org/jira/browse/HIVE-7390
Repository: hive-git
Description
-------
HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
Diffs (updated)
-----
beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
beeline/src/java/org/apache/hive/beeline/BeeLine.java 528a98e29c23421f9352bdf7c5edd3a9fae0e3ea
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
Diff: https://reviews.apache.org/r/23799/diff/
Testing
-------
Thanks,
cheng xu
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by cheng xu <ch...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/
-----------------------------------------------------------
(Updated July 29, 2014, 2:04 a.m.)
Review request for hive.
Changes
-------
change format for pom file and exclude the dependency for zookeeper IOUtils
Bugs: HIVE-7390
https://issues.apache.org/jira/browse/HIVE-7390
Repository: hive-git
Description
-------
HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
Diffs (updated)
-----
beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 75f7d38cb97fb753a8f39c19488b9ce0a8d77590
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
Diff: https://reviews.apache.org/r/23799/diff/
Testing
-------
Thanks,
cheng xu
Re: Review Request 23799: HIVE-7390: refactor csv output format with in RFC
mode and add one more option to support formatting as the csv format in
hive cli
Posted by cheng xu <ch...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23799/
-----------------------------------------------------------
(Updated July 22, 2014, 8:48 a.m.)
Review request for hive.
Bugs: HIVE-7390
https://issues.apache.org/jira/browse/HIVE-7390
Repository: hive-git
Description
-------
HIVE-7390: refactor csv output format with in RFC mode and add one more option to support formatting as the csv format in hive cli
Diffs
-----
beeline/pom.xml 6ec1d1aff3f35c097aa6054aae84faf2d63854f1
beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java 75f7d38cb97fb753a8f39c19488b9ce0a8d77590
beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java 7853c3f38f3c3fb9ae0b9939c714f1dc940ba053
beeline/src/main/resources/BeeLine.properties 390d062b8dc52dfa790c7351f3db44c1e0dd7e37
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java 8888bd97aff5959fd9040fc0f0a1f6b782f2aa6f
pom.xml b5a5697e6a3b689c2b244ba0338be541261eaa3d
Diff: https://reviews.apache.org/r/23799/diff/
Testing
-------
Thanks,
cheng xu