Skip to content

JSONUtil duplicates JSONUtils.JSONToMap byte-for-byte #4813

@Yicong-Huang

Description

@Yicong-Huang

What happened?

Two files contain the same JSONToMap implementation byte-for-byte (modulo package + object name):

  • common/workflow-core/src/main/scala/org/apache/texera/amber/util/JSONUtils.scala
  • common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/scan/json/JSONUtil.scala

Both share the same docstring, same logic, and consequently the same array-of-primitives flatten drops elements divergence already filed as #4729. The duplicate forces every fix or test improvement to land in two places.

How to reproduce?

$ diff -u \
    common/workflow-core/src/main/scala/org/apache/texera/amber/util/JSONUtils.scala \
    common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/scan/json/JSONUtil.scala

The diff shows only the package line, the object name (JSONUtils vs JSONUtil), and the surrounding objectMapper config that lives only in the workflow-core copy. The JSONToMap method body is identical.

Version

1.1.0-incubating (Pre-release/Master)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions