[ 
https://issues.apache.org/jira/browse/HIVE-23807?focusedWorklogId=455237&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-455237
 ]

ASF GitHub Bot logged work on HIVE-23807:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Jul/20 05:24
            Start Date: 07/Jul/20 05:24
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on a change in pull request #1212:
URL: https://github.com/apache/hive/pull/1212#discussion_r450617751



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastStringToDate.java
##########
@@ -116,14 +118,16 @@ public void evaluate(VectorizedRowBatch batch) {
 
   private void evaluate(LongColumnVector outV, BytesColumnVector inV, int i) {
     String dateString = new String(inV.vector[i], inV.start[i], inV.length[i], 
StandardCharsets.UTF_8);
-    if (dateParser.parseDate(dateString, sqlDate)) {
+    try {
+      Date utilDate = Date.valueOf(dateString);

Review comment:
       Is this vectorized expression generated for `GenericUDFDate`? It seems 
that UDF still relies on DateParser in this branch: 
https://github.com/apache/hive/blob/b7f3e8ef399f510c3a6780209ebc688ef0acee8f/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDate.java#L112
   
   Since the change may have an effect on parsing of other dates, it may be 
good to have a test run. It seems we have a jenkins active for branch-2 
patches: http://130.211.9.232/job/hive-precommit/job/branch-2/ . I am wondering 
whether a PR against branch-2 will trigger it or whether we can trigger it 
manually. Could you verify?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 455237)
    Time Spent: 20m  (was: 10m)

> Wrong results with vectorization enabled
> ----------------------------------------
>
>                 Key: HIVE-23807
>                 URL: https://issues.apache.org/jira/browse/HIVE-23807
>             Project: Hive
>          Issue Type: Bug
>          Components: Vectorization
>    Affects Versions: 2.3.0
>            Reporter: Vineet Garg
>            Assignee: Vineet Garg
>            Priority: Major
>              Labels: compatibility, pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> *Repro*
> {code:sql}
> CREATE TABLE `test13`(
>   `portfolio_valuation_date` string,
>   `price_cut_off_datetime` string,
>   `portfolio_id_valuation_source` string,
>   `contributor_full_path` string,
>   `position_market_value` double,
>   `mandate_name` string)
> STORED AS ORC;
> INSERT INTO test13 values (
> "2020-01-31", "2020-02-07T03:14:48.007Z",     "37",   NULL,   -0.26,  "foo");
> INSERT INTO test13 values (
> "2020-01-31", "2020-02-07T03:14:48.007Z",     "37",   NULL,   0.33,   "foo");
> INSERT INTO test13 values (
> "2020-01-31", "2020-02-07T03:14:48.007Z",     "37",   NULL,   -0.03,  "foo");
> INSERT INTO test13 values (
> "2020-01-31", "2020-02-07T03:14:48.007Z",     "37",   NULL,   0.16,   "foo");
> INSERT INTO test13 values (
> "2020-01-31", "2020-02-07T03:14:48.007Z",     "37",   NULL,   0.08,   "foo");
> set hive.fetch.task.conversion=none;
> set hive.explain.user=false;
> set hive.vectorized.execution.enabled=false;
> select Cast(`test13`.`price_cut_off_datetime` AS date) from test13; <-- 
> produces NULL
> set hive.vectorized.execution.enabled=true;
> select Cast(`test13`.`price_cut_off_datetime` AS date) from test13; <-- 
> produces non-null values
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to