MCPcopy Create free account
hub / github.com/bytebase/bytebase / tessellationConfigsEqual

Function tessellationConfigsEqual

backend/plugin/schema/differ.go:918–943  ·  view source on GitHub ↗

tessellationConfigsEqual checks if two tessellation configurations are equal.

(cfg1, cfg2 *storepb.TessellationConfig)

Source from the content-addressed store, hash-verified

916
917// tessellationConfigsEqual checks if two tessellation configurations are equal.
918func tessellationConfigsEqual(cfg1, cfg2 *storepb.TessellationConfig) bool {
919 if cfg1 == nil && cfg2 == nil {
920 return true
921 }
922 if cfg1 == nil || cfg2 == nil {
923 return false
924 }
925
926 if cfg1.Scheme != cfg2.Scheme {
927 return false
928 }
929
930 if !boundingBoxesEqual(cfg1.BoundingBox, cfg2.BoundingBox) {
931 return false
932 }
933
934 if !gridLevelsEqual(cfg1.GridLevels, cfg2.GridLevels) {
935 return false
936 }
937
938 if cfg1.CellsPerObject != cfg2.CellsPerObject {
939 return false
940 }
941
942 return true
943}
944
945// boundingBoxesEqual checks if two bounding boxes are equal.
946func boundingBoxesEqual(bb1, bb2 *storepb.BoundingBox) bool {

Callers 1

spatialConfigsEqualFunction · 0.85

Calls 2

boundingBoxesEqualFunction · 0.85
gridLevelsEqualFunction · 0.85

Tested by

no test coverage detected