Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2392

Logical type time-micros and timestamp-micros generate as long types.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.9.1
    • Component/s: java, logical types
    • Labels:
      None

      Description

      With Java code gen time-micros and timestamp-micros logical types generate as long typed value with Joda. 

      Following will generate AvroLogicalTypeExample class, which has both `timeMicrosField` and 'timestampMicrosField` values as long typed instance variables.

      {
      "type": "record",
      "namespace": "com.shameera.test",
      "name": "AvroLogicalTypeExample",
      "fields": [
             {"name": "timeMicrosField",
               "type": { 
                    "type": "long",
                     "logicalType": "time-micros"
                 }
               },
              {"name": "timestampMicrosField",
                "type": {
                      "type": "long",
                      "logicalType": "timestamp-micros"
                    }
               }
           ]
      }
      

      https://issues.apache.org/jira/browse/AVRO-2123 partially address this issue, that is why I created a separate issue to track only the issue with micros times. 

       

       

        Attachments

          Activity

            People

            • Assignee:
              shameera Shameera
              Reporter:
              shameera Shameera
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: