[jira] [Updated] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types
[ https://issues.apache.org/jira/browse/HIVE-19695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ashutosh Chauhan updated HIVE-19695: Resolution: Fixed Fix Version/s: 3.1.0 Status: Resolved (was: Patch Available) Pushed to master and branch-3. Thanks, Slim! > Year Month Day extraction functions need to add an implicit cast for column > that are String types > - > > Key: HIVE-19695 > URL: https://issues.apache.org/jira/browse/HIVE-19695 > Project: Hive > Issue Type: Bug > Components: Druid integration, Query Planning >Affects Versions: 3.0.0 >Reporter: slim bouguerra >Assignee: slim bouguerra >Priority: Major > Fix For: 3.1.0 > > Attachments: HIVE-19695.1.patch, HIVE-19695.2.patch, > HIVE-19695.patch, HIVE-19695.patch > > > To avoid surprising/wrong results, Hive Query plan shall add an explicit cast > over non date/timestamp column type when user try to extract Year/Month/Hour > etc.. > This is an example of misleading results. > {code} > create table test_base_table(`timecolumn` timestamp, `date_c` string, > `timestamp_c` string, `metric_c` double); > insert into test_base_table values ('2015-03-08 00:00:00', '2015-03-10', > '2015-03-08 00:00:00', 5.0); > CREATE TABLE druid_test_table > STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' > TBLPROPERTIES ("druid.segment.granularity" = "DAY") > AS select > cast(`timecolumn` as timestamp with local time zone) as `__time`, `date_c`, > `timestamp_c`, `metric_c` FROM test_base_table; > select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table; > {code} > will return the following wrong results: > {code} > PREHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > PREHOOK: type: QUERY > PREHOOK: Input: default@druid_test_table > A masked pattern was here > POSTHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > POSTHOOK: type: QUERY > POSTHOOK: Input: default@druid_test_table > A masked pattern was here > 1969 12 31 16 196912 31 16 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types
[ https://issues.apache.org/jira/browse/HIVE-19695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] slim bouguerra updated HIVE-19695: -- Attachment: HIVE-19695.2.patch > Year Month Day extraction functions need to add an implicit cast for column > that are String types > - > > Key: HIVE-19695 > URL: https://issues.apache.org/jira/browse/HIVE-19695 > Project: Hive > Issue Type: Bug > Components: Druid integration, Query Planning >Affects Versions: 3.0.0 >Reporter: slim bouguerra >Assignee: slim bouguerra >Priority: Major > Attachments: HIVE-19695.1.patch, HIVE-19695.2.patch, > HIVE-19695.patch, HIVE-19695.patch > > > To avoid surprising/wrong results, Hive Query plan shall add an explicit cast > over non date/timestamp column type when user try to extract Year/Month/Hour > etc.. > This is an example of misleading results. > {code} > create table test_base_table(`timecolumn` timestamp, `date_c` string, > `timestamp_c` string, `metric_c` double); > insert into test_base_table values ('2015-03-08 00:00:00', '2015-03-10', > '2015-03-08 00:00:00', 5.0); > CREATE TABLE druid_test_table > STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' > TBLPROPERTIES ("druid.segment.granularity" = "DAY") > AS select > cast(`timecolumn` as timestamp with local time zone) as `__time`, `date_c`, > `timestamp_c`, `metric_c` FROM test_base_table; > select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table; > {code} > will return the following wrong results: > {code} > PREHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > PREHOOK: type: QUERY > PREHOOK: Input: default@druid_test_table > A masked pattern was here > POSTHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > POSTHOOK: type: QUERY > POSTHOOK: Input: default@druid_test_table > A masked pattern was here > 1969 12 31 16 196912 31 16 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types
[ https://issues.apache.org/jira/browse/HIVE-19695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] slim bouguerra updated HIVE-19695: -- Attachment: HIVE-19695.1.patch > Year Month Day extraction functions need to add an implicit cast for column > that are String types > - > > Key: HIVE-19695 > URL: https://issues.apache.org/jira/browse/HIVE-19695 > Project: Hive > Issue Type: Bug > Components: Druid integration, Query Planning >Affects Versions: 3.0.0 >Reporter: slim bouguerra >Assignee: slim bouguerra >Priority: Major > Attachments: HIVE-19695.1.patch, HIVE-19695.patch, HIVE-19695.patch > > > To avoid surprising/wrong results, Hive Query plan shall add an explicit cast > over non date/timestamp column type when user try to extract Year/Month/Hour > etc.. > This is an example of misleading results. > {code} > create table test_base_table(`timecolumn` timestamp, `date_c` string, > `timestamp_c` string, `metric_c` double); > insert into test_base_table values ('2015-03-08 00:00:00', '2015-03-10', > '2015-03-08 00:00:00', 5.0); > CREATE TABLE druid_test_table > STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' > TBLPROPERTIES ("druid.segment.granularity" = "DAY") > AS select > cast(`timecolumn` as timestamp with local time zone) as `__time`, `date_c`, > `timestamp_c`, `metric_c` FROM test_base_table; > select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table; > {code} > will return the following wrong results: > {code} > PREHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > PREHOOK: type: QUERY > PREHOOK: Input: default@druid_test_table > A masked pattern was here > POSTHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > POSTHOOK: type: QUERY > POSTHOOK: Input: default@druid_test_table > A masked pattern was here > 1969 12 31 16 196912 31 16 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types
[ https://issues.apache.org/jira/browse/HIVE-19695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ashutosh Chauhan updated HIVE-19695: Target Version/s: 3.1.0 Fix Version/s: (was: 3.1.0) > Year Month Day extraction functions need to add an implicit cast for column > that are String types > - > > Key: HIVE-19695 > URL: https://issues.apache.org/jira/browse/HIVE-19695 > Project: Hive > Issue Type: Bug > Components: Druid integration, Query Planning >Affects Versions: 3.0.0 >Reporter: slim bouguerra >Assignee: slim bouguerra >Priority: Major > Attachments: HIVE-19695.patch, HIVE-19695.patch > > > To avoid surprising/wrong results, Hive Query plan shall add an explicit cast > over non date/timestamp column type when user try to extract Year/Month/Hour > etc.. > This is an example of misleading results. > {code} > create table test_base_table(`timecolumn` timestamp, `date_c` string, > `timestamp_c` string, `metric_c` double); > insert into test_base_table values ('2015-03-08 00:00:00', '2015-03-10', > '2015-03-08 00:00:00', 5.0); > CREATE TABLE druid_test_table > STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' > TBLPROPERTIES ("druid.segment.granularity" = "DAY") > AS select > cast(`timecolumn` as timestamp with local time zone) as `__time`, `date_c`, > `timestamp_c`, `metric_c` FROM test_base_table; > select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table; > {code} > will return the following wrong results: > {code} > PREHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > PREHOOK: type: QUERY > PREHOOK: Input: default@druid_test_table > A masked pattern was here > POSTHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > POSTHOOK: type: QUERY > POSTHOOK: Input: default@druid_test_table > A masked pattern was here > 1969 12 31 16 196912 31 16 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types
[ https://issues.apache.org/jira/browse/HIVE-19695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ashutosh Chauhan updated HIVE-19695: Attachment: HIVE-19695.patch > Year Month Day extraction functions need to add an implicit cast for column > that are String types > - > > Key: HIVE-19695 > URL: https://issues.apache.org/jira/browse/HIVE-19695 > Project: Hive > Issue Type: Bug > Components: Druid integration, Query Planning >Affects Versions: 3.0.0 >Reporter: slim bouguerra >Assignee: slim bouguerra >Priority: Major > Fix For: 3.1.0 > > Attachments: HIVE-19695.patch, HIVE-19695.patch > > > To avoid surprising/wrong results, Hive Query plan shall add an explicit cast > over non date/timestamp column type when user try to extract Year/Month/Hour > etc.. > This is an example of misleading results. > {code} > create table test_base_table(`timecolumn` timestamp, `date_c` string, > `timestamp_c` string, `metric_c` double); > insert into test_base_table values ('2015-03-08 00:00:00', '2015-03-10', > '2015-03-08 00:00:00', 5.0); > CREATE TABLE druid_test_table > STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' > TBLPROPERTIES ("druid.segment.granularity" = "DAY") > AS select > cast(`timecolumn` as timestamp with local time zone) as `__time`, `date_c`, > `timestamp_c`, `metric_c` FROM test_base_table; > select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table; > {code} > will return the following wrong results: > {code} > PREHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > PREHOOK: type: QUERY > PREHOOK: Input: default@druid_test_table > A masked pattern was here > POSTHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > POSTHOOK: type: QUERY > POSTHOOK: Input: default@druid_test_table > A masked pattern was here > 1969 12 31 16 196912 31 16 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types
[ https://issues.apache.org/jira/browse/HIVE-19695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ashutosh Chauhan updated HIVE-19695: Status: Patch Available (was: Open) > Year Month Day extraction functions need to add an implicit cast for column > that are String types > - > > Key: HIVE-19695 > URL: https://issues.apache.org/jira/browse/HIVE-19695 > Project: Hive > Issue Type: Bug > Components: Druid integration, Query Planning >Affects Versions: 3.0.0 >Reporter: slim bouguerra >Assignee: slim bouguerra >Priority: Major > Fix For: 3.1.0 > > Attachments: HIVE-19695.patch, HIVE-19695.patch > > > To avoid surprising/wrong results, Hive Query plan shall add an explicit cast > over non date/timestamp column type when user try to extract Year/Month/Hour > etc.. > This is an example of misleading results. > {code} > create table test_base_table(`timecolumn` timestamp, `date_c` string, > `timestamp_c` string, `metric_c` double); > insert into test_base_table values ('2015-03-08 00:00:00', '2015-03-10', > '2015-03-08 00:00:00', 5.0); > CREATE TABLE druid_test_table > STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' > TBLPROPERTIES ("druid.segment.granularity" = "DAY") > AS select > cast(`timecolumn` as timestamp with local time zone) as `__time`, `date_c`, > `timestamp_c`, `metric_c` FROM test_base_table; > select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table; > {code} > will return the following wrong results: > {code} > PREHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > PREHOOK: type: QUERY > PREHOOK: Input: default@druid_test_table > A masked pattern was here > POSTHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > POSTHOOK: type: QUERY > POSTHOOK: Input: default@druid_test_table > A masked pattern was here > 1969 12 31 16 196912 31 16 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types
[ https://issues.apache.org/jira/browse/HIVE-19695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ashutosh Chauhan updated HIVE-19695: Status: Open (was: Patch Available) > Year Month Day extraction functions need to add an implicit cast for column > that are String types > - > > Key: HIVE-19695 > URL: https://issues.apache.org/jira/browse/HIVE-19695 > Project: Hive > Issue Type: Bug > Components: Druid integration, Query Planning >Affects Versions: 3.0.0 >Reporter: slim bouguerra >Assignee: slim bouguerra >Priority: Major > Fix For: 3.1.0 > > Attachments: HIVE-19695.patch, HIVE-19695.patch > > > To avoid surprising/wrong results, Hive Query plan shall add an explicit cast > over non date/timestamp column type when user try to extract Year/Month/Hour > etc.. > This is an example of misleading results. > {code} > create table test_base_table(`timecolumn` timestamp, `date_c` string, > `timestamp_c` string, `metric_c` double); > insert into test_base_table values ('2015-03-08 00:00:00', '2015-03-10', > '2015-03-08 00:00:00', 5.0); > CREATE TABLE druid_test_table > STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' > TBLPROPERTIES ("druid.segment.granularity" = "DAY") > AS select > cast(`timecolumn` as timestamp with local time zone) as `__time`, `date_c`, > `timestamp_c`, `metric_c` FROM test_base_table; > select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table; > {code} > will return the following wrong results: > {code} > PREHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > PREHOOK: type: QUERY > PREHOOK: Input: default@druid_test_table > A masked pattern was here > POSTHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > POSTHOOK: type: QUERY > POSTHOOK: Input: default@druid_test_table > A masked pattern was here > 1969 12 31 16 196912 31 16 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types
[ https://issues.apache.org/jira/browse/HIVE-19695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] slim bouguerra updated HIVE-19695: -- Status: Patch Available (was: Open) > Year Month Day extraction functions need to add an implicit cast for column > that are String types > - > > Key: HIVE-19695 > URL: https://issues.apache.org/jira/browse/HIVE-19695 > Project: Hive > Issue Type: Bug > Components: Druid integration, Query Planning >Affects Versions: 3.0.0 >Reporter: slim bouguerra >Assignee: slim bouguerra >Priority: Major > Fix For: 3.1.0 > > Attachments: HIVE-19695.patch > > > To avoid surprising/wrong results, Hive Query plan shall add an explicit cast > over non date/timestamp column type when user try to extract Year/Month/Hour > etc.. > This is an example of misleading results. > {code} > create table test_base_table(`timecolumn` timestamp, `date_c` string, > `timestamp_c` string, `metric_c` double); > insert into test_base_table values ('2015-03-08 00:00:00', '2015-03-10', > '2015-03-08 00:00:00', 5.0); > CREATE TABLE druid_test_table > STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' > TBLPROPERTIES ("druid.segment.granularity" = "DAY") > AS select > cast(`timecolumn` as timestamp with local time zone) as `__time`, `date_c`, > `timestamp_c`, `metric_c` FROM test_base_table; > select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table; > {code} > will return the following wrong results: > {code} > PREHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > PREHOOK: type: QUERY > PREHOOK: Input: default@druid_test_table > A masked pattern was here > POSTHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > POSTHOOK: type: QUERY > POSTHOOK: Input: default@druid_test_table > A masked pattern was here > 1969 12 31 16 196912 31 16 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HIVE-19695) Year Month Day extraction functions need to add an implicit cast for column that are String types
[ https://issues.apache.org/jira/browse/HIVE-19695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] slim bouguerra updated HIVE-19695: -- Attachment: HIVE-19695.patch > Year Month Day extraction functions need to add an implicit cast for column > that are String types > - > > Key: HIVE-19695 > URL: https://issues.apache.org/jira/browse/HIVE-19695 > Project: Hive > Issue Type: Bug > Components: Druid integration, Query Planning >Affects Versions: 3.0.0 >Reporter: slim bouguerra >Assignee: slim bouguerra >Priority: Major > Fix For: 3.1.0 > > Attachments: HIVE-19695.patch > > > To avoid surprising/wrong results, Hive Query plan shall add an explicit cast > over non date/timestamp column type when user try to extract Year/Month/Hour > etc.. > This is an example of misleading results. > {code} > create table test_base_table(`timecolumn` timestamp, `date_c` string, > `timestamp_c` string, `metric_c` double); > insert into test_base_table values ('2015-03-08 00:00:00', '2015-03-10', > '2015-03-08 00:00:00', 5.0); > CREATE TABLE druid_test_table > STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' > TBLPROPERTIES ("druid.segment.granularity" = "DAY") > AS select > cast(`timecolumn` as timestamp with local time zone) as `__time`, `date_c`, > `timestamp_c`, `metric_c` FROM test_base_table; > select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table; > {code} > will return the following wrong results: > {code} > PREHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > PREHOOK: type: QUERY > PREHOOK: Input: default@druid_test_table > A masked pattern was here > POSTHOOK: query: select > year(date_c), month(date_c),day(date_c), hour(date_c), > year(timestamp_c), month(timestamp_c),day(timestamp_c), hour(timestamp_c) > from druid_test_table > POSTHOOK: type: QUERY > POSTHOOK: Input: default@druid_test_table > A masked pattern was here > 1969 12 31 16 196912 31 16 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)