Skip to content

refactor: refactor json extension as built-in functionality#337

Merged
shirly121 merged 8 commits into
alibaba:mainfrom
shirly121:remove_json_ext
May 18, 2026
Merged

refactor: refactor json extension as built-in functionality#337
shirly121 merged 8 commits into
alibaba:mainfrom
shirly121:remove_json_ext

Conversation

@shirly121
Copy link
Copy Markdown
Collaborator

What do these changes do?

Related issue number

Fixes #335

@shirly121 shirly121 changed the title refact: refactor json extension as built-in functionality refactor: refactor json extension as built-in functionality May 9, 2026
]
statements = []

for desc, stmt in statements:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dummy code here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted in 0c7d432

Comment thread doc/source/data_io/import_data.md Outdated
COPY person FROM "person.jsonl";
```

> **Version Note:** In NeuG < 0.1.2, JSON support was provided via the [JSON Extension](../extensions/load_json) and required `INSTALL json; LOAD json;` before use. Since v0.1.2, this step is no longer needed.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since version v0.1.2, we made json support as built-in functionality, so you donot need to install the json extension before using it. For NeuG version < 0.1.2, JSON support was provided via the JSON Extension and required INSTALL json; LOAD json; before use. 得差不多这样写一下

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 0c7d432, include:

# Priority Issue File Fix
1 Medium compareVersion silently returns 0.0.0 on malformed version strings (e.g. 0.1.2-rc1) src/execution/execute/ops/admin/extension.cc Check sscanf return value; log WARNING and return false on parse failure (safe fallback: deprecation check is skipped)
2 Medium doc/source/extensions/load_json.md has no mention that JSON is now built-in; link from load_data.md leads to outdated content doc/source/extensions/load_json.md Add a deprecation note at the top stating JSON is built-in since v0.1.2, with a link to the LOAD FROM reference
3 Medium run_json_extension_suite name implies extension testing, but JSON is now built-in tools/python_bind/example/complex_test.py Rename to run_json_builtin_suite; update section title, log messages, and temp dir prefix; remove NEUG_RUN_EXTENSION_TESTS gate so JSON tests always run
4 Low CMake comment does not explain why Arrow JSON is always enabled CMakeLists.txt Add comment: JSON is now a core feature since v0.1.2, not an optional extension.
5 Medium Dummy code: empty statements = [] with useless for-loop (zhanglei) tools/python_bind/example/complex_test.py Remove the empty statements list and its for-loop in run_json_builtin_suite
6 Medium Version notes emphasize old behavior first; should lead with built-in (longbin) doc/source/data_io/import_data.md, load_data.md, export_data.md, doc/source/extensions/load_json.md Rewrite version notes to state built-in functionality first, then mention legacy extension behavior

No Changes Needed

# Issue Reason
1 JSON tests not covered in core workflow neug-test.yml already runs test_load.py and test_export.py without -k filter in Phase 3 — JSON tests are fully covered
6 Missing newline at end of file Already fixed in the PR
8 @extension_test decorator removal impact The decorator only skips tests based on NEUG_RUN_EXTENSION_TESTS env var; removal does not affect test isolation or environment setup

shirly121 and others added 4 commits May 14, 2026 16:07
- Add sscanf return value check in compareVersion to handle malformed
  version strings gracefully
- Remove dummy empty statements list in run_json_builtin_suite (zhanglei)
- Rewrite version notes in docs to lead with built-in functionality
  instead of old extension behavior (longbin)
- Rename run_json_extension_suite to run_json_builtin_suite and remove
  NEUG_RUN_EXTENSION_TESTS gate since JSON is now built-in
- Add deprecation note to extensions/load_json.md
- Improve CMake comment explaining why Arrow JSON is always enabled

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
zhanglei1949
zhanglei1949 previously approved these changes May 18, 2026
Copy link
Copy Markdown
Member

@zhanglei1949 zhanglei1949 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@zhanglei1949 zhanglei1949 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shirly121 shirly121 merged commit 838d798 into alibaba:main May 18, 2026
21 checks passed
@lnfjpt lnfjpt mentioned this pull request May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Internalize JSON extension as built-in functionality

3 participants