Decimals are being shown as array of bytes in Preview

Description

Screenshot of preview attached. 

  • Decimal types are shown as byte array in preview e.g. 0 is shown as [0]

  • StructuredRecordConvertor.toJsonString() as does the same. 

When decimals are shown to user, they should be readable. 

Release Notes

Preview shows logical types in iso format

Activity

Show:
Vinisha Shah
June 30, 2020, 7:37 PM
Vinisha Shah
June 23, 2020, 10:38 PM
Edited

There are 2 options for displaying logical types in preview:

1.) Make backend change to support correct serialization and deserialization of structured records with logical types. : 

https://github.com/cdapio/cdap/blob/develop/cdap-app-fabric/src/main/java/io/cdap/cdap/internal/app/store/preview/DefaultPreviewStore.java#L86

After this change, list of JsonElement returned from store would contain string values for logical types instead of corresponding primitive types. This means returned serialized structured record fields with logical type will not comply with the schema.

2.)  Make the changes in UI and have an open Jira to apply right fix in backend.

The proposed backend fix is an api response change. Considering this Jira is tied to the patch version, it would be good to explore if this can be fixed in UI.

NitinM
June 12, 2020, 6:54 PM

This has been committed for 6.1.4. For any changes please confirm with

Fixed

Assignee

Vinisha Shah

Reporter

NitinM

Labels

Docs Impact

None

UX Impact

None

Fix versions

Priority

Blocker