GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: fix global @explain not effective by Zhengcy05 · Pull Request #860 · APIJSON/APIJSON

Conversation

@Zhengcy05

@Zhengcy05 Zhengcy05 commented Jun 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Ⅰ. Describe what this PR did

This PR fixes the global @Explain propagation logic in AbstractObjectParser.

Previously, root-level @Explain was parsed correctly as a global option, but when the framework applied global defaults to table objects, it checked globalSchema instead of globalExplain before injecting KEY_EXPLAIN. As a result, global @Explain only worked when global @Schema was also present.

This change updates the condition to check the global explain flag itself, so root-level @Explain now works as documented without depending on @Schema.

Ⅱ. Does this pull request fix one issue?

fixes #851

Ⅲ. Why don't you add test cases (unit test/integration test)?

This repository currently does not have an existing test structure under APIJSONORM/src/test, and this PR keeps the change minimal and focused to a one-line bug fix.

The change was verified by compilation and by tracing the request parsing path against the reported issue scenario.

Ⅳ. Describe how to verify it

Run:

mvn -f APIJSONORM/pom.xml -DskipTests compile

Ⅴ. Special notes for reviews

This is a minimal fix that only corrects the propagation condition for global @Explain.
It does not change:
subquery behavior
object-level @Explain behavior
any SQL generation logic beyond the global default injection path

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TommyLemon reacted with thumbs up emoji TommyLemon reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction
@Zhengcy05
fix: fix global @Explain not effective
5789d66
TommyLemon
TommyLemon approved these changes Jun 11, 2026
View reviewed changes
@TommyLemon
TommyLemon merged commit 461a5cf into APIJSON:master Jun 11, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@TommyLemon

TommyLemon commented Jun 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

@Zhengcy05 Thank you for your contribution~
The HTTP API test cases for APIJSON is on http://apijson.cn/api and http://apijson.cn:8080/api
The admin account 13000082001 is for general cases and 13000088888 is for advanced features and complex cases.
image
Screenshot 2026-06-12 at 00 09 25

However, this PR is too tiny to run the test cases.
But if you are intrested in, you can run them online or locally deploy the server and the SQL files(Document.sql, TestRecord.sql, Random.sql, Chain.sql, etc for MySQL, PostgreSQL etc) and run them to view the effect.
https://github.com/APIJSON/APIJSON-Demo

Zhengcy05 reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@TommyLemon TommyLemon TommyLemon approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug] global @explain doesn't work

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Zhengcy05 @TommyLemon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.