delta-io/delta

[Kernel][Testing] Add more thorough testing for DataType.toJson

Closed

#2,313 opened on Nov 20, 2023

 (6 comments) (0 reactions) (0 assignees)Scala (2,159 forks)batch import
enhancementgood first issuekernelstale

Repository metrics

Stars
 (8,950 stars)
PR merge metrics
 (PR metrics pending)

Description

Feature request

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Overview

All of our DataType classes provide toJson which serializes the type following the delta protocol schema serialization rules https://github.com/delta-io/delta/blob/master/PROTOCOL.md#schema-serialization-format. We use this method to serialize the physical and logical schemas in ScanStateRow.

toJson is only tested by the 2 round-trip tests in DefaultJsonHandlerSuite. We should add more thorough tests for toJson.

Contributor guide