[ 
https://issues.apache.org/jira/browse/HUDI-7647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Danny Chen reassigned HUDI-7647:
--------------------------------

    Assignee: Danny Chen

> READ_UTC_TIMEZONE doesn't affect log files for MOR tables
> ---------------------------------------------------------
>
>                 Key: HUDI-7647
>                 URL: https://issues.apache.org/jira/browse/HUDI-7647
>             Project: Apache Hudi
>          Issue Type: Bug
>            Reporter: Mark Bukhner
>            Assignee: Danny Chen
>            Priority: Major
>              Labels: flink, pull-request-available
>             Fix For: 1.0.0
>
>
> Write COPY_ON_WRITE table:
> {code:java}
> tableEnv.executeSql("CREATE TABLE test_2(\n"
>     + "  uuid VARCHAR(40),\n"
>     + "  name VARCHAR(10),\n"
>     + "  age INT,\n"
>     + "  ts TIMESTAMP(3),\n"
>     + "  `partition` VARCHAR(20)\n"
>     + ")\n"
>     + "PARTITIONED BY (`partition`)\n"
>     + "WITH (\n"
>     + "  'connector' = 'hudi',\n"
>     + "  'path' = '...',\n"
>     + "  'table.type' = 'COPY_ON_WRITE',\n"
>     + "  'write.utc-timezone' = 'true',\n"
>     + "  'index.type' = 'INMEMORY'\n"
>     + ");").await(); 
> tableEnv.executeSql("insert into test_2 \n" 
>     + "values ('ab', 'cccx', 12, TIMESTAMP '1972-01-01 00:00:01', 'xx'),\n"
>     + " ('ab', 'cccx', 12, TIMESTAMP '1970-01-01 00:00:01', 
> 'xx');").await();{code}
> Then read COW table with READ_UTC_TIMEZONE will recieve:
> {code:java}
> +I[ab, cccx, 12, 1972-01-01T00:00:01, xx] // if READ_UTC_TIMEZONE = 'true' 
> +I[ab, cccx, 12, 1972-01-01T07:00:01, xx] // if READ_UTC_TIMEZONE = 'false' 
> {code}
> But if create and write table with 'table.type' = 'COPY_ON_WRITE' will 
> recieve:
> {code:java}
> +I[ab, cccx, 12, 1972-01-01T00:00:01, xx] // if READ_UTC_TIMEZONE = 'true'
> +I[ab, cccx, 12, 1972-01-01T00:00:01, xx] // if READ_UTC_TIMEZONE = 'false'
> {code}
> There is no difference between READ_UTC_TIMEZONE equals true or false while 
> read log files (MOR table), but 7h difference while read COW table.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to