You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Mehant Baid <ba...@gmail.com> on 2014/02/12 05:14:07 UTC
Review Request 17988: JIRA-366: Cast function from VarChar to BigInt
produces wrong results
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17988/
-----------------------------------------------------------
Review request for drill.
Repository: drill-git
Description
-------
This patch resolves a minor issue in Casting from VarChar to BigInt.
Summary:
While casting VarChar to BigInt make sure the getByte() method is invoked with the appropriate byte offset.
CastFunctionsSrcVarLen.java:
Use in.start as starting index to invoke getBytes() instead of 0. We always end up with the same row when we use 0
TestCastVarCharToBigInt.java, *.json
Added a test case to read varchar and convert it to BigInt.
Diffs
-----
exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLen.java 370597d
exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java PRE-CREATION
exec/java-exec/src/test/resources/functions/cast/test_cast_varchar_to_bigint.json PRE-CREATION
exec/java-exec/src/test/resources/scan_json_test_cast.json PRE-CREATION
Diff: https://reviews.apache.org/r/17988/diff/
Testing
-------
Added unit test
Thanks,
Mehant Baid
Re: Review Request 17988: JIRA-366: Cast function from VarChar to BigInt
produces wrong results
Posted by Timothy Chen <tn...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17988/#review34460
-----------------------------------------------------------
exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLen.java
<https://reviews.apache.org/r/17988/#comment64577>
a bit odd spacing?
- Timothy Chen
On Feb. 12, 2014, 4:14 a.m., Mehant Baid wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17988/
> -----------------------------------------------------------
>
> (Updated Feb. 12, 2014, 4:14 a.m.)
>
>
> Review request for drill.
>
>
> Repository: drill-git
>
>
> Description
> -------
>
> This patch resolves a minor issue in Casting from VarChar to BigInt.
>
> Summary:
> While casting VarChar to BigInt make sure the getByte() method is invoked with the appropriate byte offset.
>
> CastFunctionsSrcVarLen.java:
> Use in.start as starting index to invoke getBytes() instead of 0. We always end up with the same row when we use 0
>
> TestCastVarCharToBigInt.java, *.json
> Added a test case to read varchar and convert it to BigInt.
>
>
> Diffs
> -----
>
> exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLen.java 370597d
> exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java PRE-CREATION
> exec/java-exec/src/test/resources/functions/cast/test_cast_varchar_to_bigint.json PRE-CREATION
> exec/java-exec/src/test/resources/scan_json_test_cast.json PRE-CREATION
>
> Diff: https://reviews.apache.org/r/17988/diff/
>
>
> Testing
> -------
>
> Added unit test
>
>
> Thanks,
>
> Mehant Baid
>
>
Re: Review Request 17988: JIRA-366: Cast function from VarChar to BigInt
produces wrong results
Posted by Timothy Chen <tn...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17988/#review34461
-----------------------------------------------------------
Ship it!
Ship It!
- Timothy Chen
On Feb. 12, 2014, 4:14 a.m., Mehant Baid wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17988/
> -----------------------------------------------------------
>
> (Updated Feb. 12, 2014, 4:14 a.m.)
>
>
> Review request for drill.
>
>
> Repository: drill-git
>
>
> Description
> -------
>
> This patch resolves a minor issue in Casting from VarChar to BigInt.
>
> Summary:
> While casting VarChar to BigInt make sure the getByte() method is invoked with the appropriate byte offset.
>
> CastFunctionsSrcVarLen.java:
> Use in.start as starting index to invoke getBytes() instead of 0. We always end up with the same row when we use 0
>
> TestCastVarCharToBigInt.java, *.json
> Added a test case to read varchar and convert it to BigInt.
>
>
> Diffs
> -----
>
> exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLen.java 370597d
> exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java PRE-CREATION
> exec/java-exec/src/test/resources/functions/cast/test_cast_varchar_to_bigint.json PRE-CREATION
> exec/java-exec/src/test/resources/scan_json_test_cast.json PRE-CREATION
>
> Diff: https://reviews.apache.org/r/17988/diff/
>
>
> Testing
> -------
>
> Added unit test
>
>
> Thanks,
>
> Mehant Baid
>
>
Re: Review Request 17988: DRILL-366: Cast function from VarChar to BigInt
produces wrong results
Posted by Mehant Baid <ba...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17988/
-----------------------------------------------------------
(Updated Feb. 15, 2014, 12:11 p.m.)
Review request for drill.
Summary (updated)
-----------------
DRILL-366: Cast function from VarChar to BigInt produces wrong results
Repository: drill-git
Description
-------
This patch resolves a minor issue in Casting from VarChar to BigInt.
Summary:
While casting VarChar to BigInt make sure the getByte() method is invoked with the appropriate byte offset.
CastFunctionsSrcVarLen.java:
Use in.start as starting index to invoke getBytes() instead of 0. We always end up with the same row when we use 0
TestCastVarCharToBigInt.java, *.json
Added a test case to read varchar and convert it to BigInt.
Diffs
-----
exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLen.java 370597d
exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java PRE-CREATION
exec/java-exec/src/test/resources/functions/cast/test_cast_varchar_to_bigint.json PRE-CREATION
exec/java-exec/src/test/resources/scan_json_test_cast.json PRE-CREATION
Diff: https://reviews.apache.org/r/17988/diff/
Testing
-------
Added unit test
Thanks,
Mehant Baid