Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-7647

READ_UTC_TIMEZONE doesn't affect log files for MOR tables

    XMLWordPrintableJSON

Details

    Description

      Write COPY_ON_WRITE table:

      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();

      Then read COW table with READ_UTC_TIMEZONE will recieve:

      +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' 
      

      But if create and write table with 'table.type' = 'COPY_ON_WRITE' will recieve:

      +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'
      

      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.

      Attachments

        Issue Links

          Activity

            People

              danny0405 Danny Chen
              alowator Mark Bukhner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: