Fesod version
Current main at 5a9a16b.
Description
The cached FieldCache depends on WriteHolder#orderByIncludeColumn, but ClassUtils.FieldCacheKey contains only the class and include/exclude collections. Two sheets using the same class and include list but different ordering settings can therefore share the wrong cached result.
Location
fesod-sheet/src/main/java/org/apache/fesod/sheet/util/ClassUtils.java:278-291
fesod-sheet/src/main/java/org/apache/fesod/sheet/util/ClassUtils.java:379-431
fesod-sheet/src/main/java/org/apache/fesod/sheet/util/ClassUtils.java:556-573
Reproduction
Use the same model and include list column4, column2, column3 in one writer:
- First sheet:
orderByIncludeColumn(false)
- Second sheet:
orderByIncludeColumn(true)
Observed second-sheet order after cache reuse:
column2, column3, column4
A fresh writer using only orderByIncludeColumn(true) produces the requested order:
column4, column2, column3
Expected behavior
Each sheet should honor its own orderByIncludeColumn setting regardless of a prior cache entry.
Suggested fix
Include orderByIncludeColumn in FieldCacheKey and add a multi-sheet regression test that changes only this setting.
Related existing work
None covers this cache collision.
Are you willing to submit a PR?
Yes.
Fesod version
Current
mainat5a9a16b.Description
The cached
FieldCachedepends onWriteHolder#orderByIncludeColumn, butClassUtils.FieldCacheKeycontains only the class and include/exclude collections. Two sheets using the same class and include list but different ordering settings can therefore share the wrong cached result.Location
fesod-sheet/src/main/java/org/apache/fesod/sheet/util/ClassUtils.java:278-291fesod-sheet/src/main/java/org/apache/fesod/sheet/util/ClassUtils.java:379-431fesod-sheet/src/main/java/org/apache/fesod/sheet/util/ClassUtils.java:556-573Reproduction
Use the same model and include list
column4, column2, column3in one writer:orderByIncludeColumn(false)orderByIncludeColumn(true)Observed second-sheet order after cache reuse:
A fresh writer using only
orderByIncludeColumn(true)produces the requested order:Expected behavior
Each sheet should honor its own
orderByIncludeColumnsetting regardless of a prior cache entry.Suggested fix
Include
orderByIncludeColumninFieldCacheKeyand add a multi-sheet regression test that changes only this setting.Related existing work
ClassUtilsbut retain the same cache-key semantics.None covers this cache collision.
Are you willing to submit a PR?
Yes.