Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5646

IllegalArgumentException: Invalid format: "00:00:00.000" is malformed at ":00:00.000"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.10.0
    • Fix Version/s: None
    • Component/s: Server
    • Labels:
      None
    • Environment:

      Drill 1.10

      Description

      Following example shows an exception thrown by a CAST from TIME to TIMESTAMP when data in a parquet file is accessed via a view.

      ALTER SESSION SET `store.format`='parquet';

      use dfs.certp

      create table dfs.certp.`/data/ttm` as
      select cast(RNUM as integer) RNUM, cast( CTM as TIME) CTM from
      (
      values
      ( 0, cast(NULL as varchar)),
      ( 1, '00:00:00'),
      ( 2, '12:00:00'),
      ( 3, '23:59:30')
      ) T (RNUM, CTM)

      refresh table metadata dfs.certp.`/data`

      create or replace view TTM as select cast(RNUM as integer) RNUM, cast ( CTM as time ) CTM from dfs.certp.`/data/ttm`;

      select RNUM, CAST ( CTM as TIMESTAMP ) from TTM

      Error: SYSTEM ERROR: IllegalArgumentException: Invalid format: "00:00:00.000" is malformed at ":00:00.000"

      meanwhile this does not throw the exception

      select RNUM, CAST( CAST ( CTM as TIME) as TIMESTAMP) CTM from
      (
      values
      ( 0, cast(NULL as varchar)),
      ( 1, '00:00:00'),
      ( 2, '12:00:00'),
      ( 3, '23:59:30')
      ) T (RNUM, CTM)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              the6campbells N Campbell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: