Make sure all fields in sys.segments are JSON-serialized #10481
Make sure all fields in sys.segments are JSON-serialized #10481maytasm merged 6 commits intoapache:masterfrom
Conversation
| .add("is_realtime", ValueType.LONG) | ||
| .add("is_overshadowed", ValueType.LONG) | ||
| .add("shardSpec", ValueType.STRING) | ||
| .add("shard_spec", ValueType.STRING) |
There was a problem hiding this comment.
shardSpec was introduced in this change #9883 and changing it to shard_spec would be a breaking change. I don't think we should do this without an upgrade plan
There was a problem hiding this comment.
I don't think there is anything in Druid depending on shardSpec (similar to how the linked PR changed payload to shardSpec, metrics, dimensions). I can update the document but I don't think anything will break. I guess unless someone has a custom script reading this field which is probably unlikely and is why we should change this ASAP.
There was a problem hiding this comment.
The linked PR added those fields, so we didn't have to worry about backwards incompatibility.
@yuanlihan since you introduced this field, do you have any comments on changing the name of this field?
There was a problem hiding this comment.
The linked PR removed payload and added shardSpec, metrics, dimensions
|
Added Release Notes because this changes the behavior of an API - hopefully no one depends on it |
jon-wei
left a comment
There was a problem hiding this comment.
There are some real test failures and a spell check error, LGTM otherwise
| |dimensions|STRING|The dimensions of the segment| | ||
| |metrics|STRING|The metrics of the segment| | ||
| |last_compaction_state|STRING|The configurations of the compaction task which created this segment. May be null if segment was not created by compaction task.| | ||
| |shard_spec|STRING|JSON-serialized of the segment `ShardSpec`| |
There was a problem hiding this comment.
suggest "JSON-serialized form" instead here and elsewhere
* fix JSON format * Change all columns in sys segments to be JSON * Change all columns in sys segments to be JSON * add tests * fix failing tests * fix failing tests
Make sure all fields in sys.segments are JSON-serialized
Description
This PR:
This PR has: