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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.8.2
    • 1.9.1
    • java, logical types
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: