feat: block_stock_relation 增加 block_level(行业层级标注) - #41
Merged
Conversation
- 层级=自身及前缀 key 数量,不依赖 key 长度约定 - block_level=2 即通达信导出 CSV 的行业口径(板块强弱迭代的 127+1 个二级行业), 消费端无需名单即可取"全部二级行业" - 非行业类型为 NULL;文档同步查询示例 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
xbfighting
added a commit
that referenced
this pull request
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
内部切换前的易用性补齐(#39 数据审计发现):行业板块缺层级标注,消费端取"全部二级行业"(板块强弱迭代口径)需要靠名单。补
block_level列。What Changed
WHERE block_type='行业' AND block_level=2≈ 原导出 CSV 的行业口径How to Test
pytest(63 passed);merge 后重跑tdx2db blocks --db-only,验证SELECT COUNT(DISTINCT block_name) ... block_level=2= 128Risks / Tradeoffs
🤖 Generated with Claude Code