You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "jychen7 (via GitHub)" <gi...@apache.org> on 2023/06/10 03:07:45 UTC

[GitHub] [avro] jychen7 commented on pull request #2278: AVRO-3776: [ruby] fix encoding for decimal logical type

jychen7 commented on PR #2278:
URL: https://github.com/apache/avro/pull/2278#issuecomment-1585440965

   Not an issue, I give wrong schema input
   
   It is tricky that logical type need to wrap inner
   
   ### Wrong
   ```
   {
               "type": "record",
               "name": "Order",
               "fields" : [
                   {
                       "name": "sales",
                         "type": "bytes",
                         "logicalType": "decimal",
                         "precision": 4,
                         "scale": 2    
                   }  
               ]
           }
   ```
   ### Valid
   ```
   {
               "type": "record",
               "name": "Order",
               "fields" : [
                   {
                       "name": "sales",
                       "type": {
                           "type": "bytes",
                           "logicalType": "decimal",
                           "precision": 4,
                           "scale": 2    
                       }
                   }  
               ]
           }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org