Repository navigation
fix(fileservice): honor explicit hidden paths in external scans - #28362
Merged
XuPeng-SH merged 1 commit intoSep 8, 2026
Merged
Conversation
XuPeng-SH
requested review from
LeftHandCold,
aptend,
aunjgr and
fengttt
as code owners
September 8, 2026 00:41
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…ixorigin#28362) ## What type of PR is this? - [x] BUG - [x] Test and CI ## Which issue(s) this PR fixes: Fixes matrixorigin#28270 ## What this PR does / why we need it: Local external-file discovery lists each path component. `LocalETLFS.List` previously removed dot-prefixed entries before the planner could match even an explicit `.data` component, silently turning existing input into an empty list. - Add an opt-in `LocalETLFS.ListWithHidden` backed by the existing listing loop. `ReadDir` uses it only when a local path component starts with `.`. This covers literal hidden directories/files, dot-prefixed globs, and hidden components after a wildcard. - Preserve ordinary `List` semantics for every existing consumer, including filtering temporary files used by atomic writes. Ordinary `*` still does not discover hidden entries. Other filesystem implementations remain unchanged. - Keep component-by-component existence/type checks: missing components match nothing and do not create directories. Bypassing listing through dynamic local filesystem construction would risk creating missing parent directories. - Cover absolute and named `etl:` paths, returned file sizes/cardinality, visible/hidden wildcard controls, directory symlinks, invalid patterns, cancellation, and file-vs-directory boundaries. Four one-row CSV fixtures support an isolated public LOAD/external-table case. ## Validation Linux/amd64, Go 1.26.4, controlled native CPU test wrapper; base and merge-base `074bc173a5b64ed0ff0b6ad6ab091f478bf76c27` (fresh main). - Pre-fix `TestReadDirHiddenPaths`: FAIL with missing explicitly selected files. The same regression and nearby controls pass after the fix. - Focused `TestLocalETLFSListExplicitHiddenEntries` and `TestReadDirHiddenPaths`: PASS. Final strengthened cardinality oracle also passed after review. - Owning packages: `mo-cgo-test -count=1 -timeout=10m ./pkg/fileservice ./pkg/sql/plan` PASS (30.154s and 5.440s). - All five Parquet compile tests named in matrixorigin#28270 passed with both TMPDIR and GOTMPDIR beneath an explicitly hidden directory. This includes file fanout, empty-file/schema validation, and cancellation consumer paths. - `make -j8 build`: PASS. - New `load_hidden_paths.sql`: 17/17 twice on the same standalone instance, 0.240s and 0.166s, normal comparison mode with independently specified results. Zero residual fixture databases/tables and no created `.missing` directory were verified. SQL and ISCP readiness were checked before running. - Entire `load_data` directory: PASS, 1057 successful, 0 failed, 2 existing ignored statements, approximately 5s reported case time. No new skips or weakened assertions. Initial local harness runs lacked LOCAL INFILE enablement and output cleanup; both settings were aligned with mo-tester configuration before the successful group run. The literal CSV LOAD is a compatibility control; external-table scans exercise the public `ReadDir` regression, while existing Parquet compile tests exercise the LOAD fanout consumer. No additional service fixture was added to UT. ## Pre-PR review Reviewed all 10 delivery files and the shared closure from public LOAD/external scan callers through `ReadDir`, filesystem selection, entry matching, and iterator cleanup. R2 local filesystem/public result contract; ordinary bug fix, no design document gate. No shared mutable state, new worker/cache, persisted/wire format, or distributed routing change. The opt-in flag is call-local, and the existing deferred directory close covers completion, error, and early iterator stop. Default discovery and all its other consumers keep the same behavior and I/O shape; no new scan or allocation layer is introduced. Race/restart/multi-CN stress is not the discriminating evidence for this sequential selection change. No unresolved in-scope review blockers. CI is not waited for.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…ixorigin#28362) ## What type of PR is this? - [x] BUG - [x] Test and CI ## Which issue(s) this PR fixes: Fixes matrixorigin#28270 ## What this PR does / why we need it: Local external-file discovery lists each path component. `LocalETLFS.List` previously removed dot-prefixed entries before the planner could match even an explicit `.data` component, silently turning existing input into an empty list. - Add an opt-in `LocalETLFS.ListWithHidden` backed by the existing listing loop. `ReadDir` uses it only when a local path component starts with `.`. This covers literal hidden directories/files, dot-prefixed globs, and hidden components after a wildcard. - Preserve ordinary `List` semantics for every existing consumer, including filtering temporary files used by atomic writes. Ordinary `*` still does not discover hidden entries. Other filesystem implementations remain unchanged. - Keep component-by-component existence/type checks: missing components match nothing and do not create directories. Bypassing listing through dynamic local filesystem construction would risk creating missing parent directories. - Cover absolute and named `etl:` paths, returned file sizes/cardinality, visible/hidden wildcard controls, directory symlinks, invalid patterns, cancellation, and file-vs-directory boundaries. Four one-row CSV fixtures support an isolated public LOAD/external-table case. ## Validation Linux/amd64, Go 1.26.4, controlled native CPU test wrapper; base and merge-base `074bc173a5b64ed0ff0b6ad6ab091f478bf76c27` (fresh main). - Pre-fix `TestReadDirHiddenPaths`: FAIL with missing explicitly selected files. The same regression and nearby controls pass after the fix. - Focused `TestLocalETLFSListExplicitHiddenEntries` and `TestReadDirHiddenPaths`: PASS. Final strengthened cardinality oracle also passed after review. - Owning packages: `mo-cgo-test -count=1 -timeout=10m ./pkg/fileservice ./pkg/sql/plan` PASS (30.154s and 5.440s). - All five Parquet compile tests named in matrixorigin#28270 passed with both TMPDIR and GOTMPDIR beneath an explicitly hidden directory. This includes file fanout, empty-file/schema validation, and cancellation consumer paths. - `make -j8 build`: PASS. - New `load_hidden_paths.sql`: 17/17 twice on the same standalone instance, 0.240s and 0.166s, normal comparison mode with independently specified results. Zero residual fixture databases/tables and no created `.missing` directory were verified. SQL and ISCP readiness were checked before running. - Entire `load_data` directory: PASS, 1057 successful, 0 failed, 2 existing ignored statements, approximately 5s reported case time. No new skips or weakened assertions. Initial local harness runs lacked LOCAL INFILE enablement and output cleanup; both settings were aligned with mo-tester configuration before the successful group run. The literal CSV LOAD is a compatibility control; external-table scans exercise the public `ReadDir` regression, while existing Parquet compile tests exercise the LOAD fanout consumer. No additional service fixture was added to UT. ## Pre-PR review Reviewed all 10 delivery files and the shared closure from public LOAD/external scan callers through `ReadDir`, filesystem selection, entry matching, and iterator cleanup. R2 local filesystem/public result contract; ordinary bug fix, no design document gate. No shared mutable state, new worker/cache, persisted/wire format, or distributed routing change. The opt-in flag is call-local, and the existing deferred directory close covers completion, error, and early iterator stop. Default discovery and all its other consumers keep the same behavior and I/O shape; no new scan or allocation layer is introduced. Race/restart/multi-CN stress is not the discriminating evidence for this sequential selection change. No unresolved in-scope review blockers. CI is not waited for.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…ixorigin#28362) ## What type of PR is this? - [x] BUG - [x] Test and CI ## Which issue(s) this PR fixes: Fixes matrixorigin#28270 ## What this PR does / why we need it: Local external-file discovery lists each path component. `LocalETLFS.List` previously removed dot-prefixed entries before the planner could match even an explicit `.data` component, silently turning existing input into an empty list. - Add an opt-in `LocalETLFS.ListWithHidden` backed by the existing listing loop. `ReadDir` uses it only when a local path component starts with `.`. This covers literal hidden directories/files, dot-prefixed globs, and hidden components after a wildcard. - Preserve ordinary `List` semantics for every existing consumer, including filtering temporary files used by atomic writes. Ordinary `*` still does not discover hidden entries. Other filesystem implementations remain unchanged. - Keep component-by-component existence/type checks: missing components match nothing and do not create directories. Bypassing listing through dynamic local filesystem construction would risk creating missing parent directories. - Cover absolute and named `etl:` paths, returned file sizes/cardinality, visible/hidden wildcard controls, directory symlinks, invalid patterns, cancellation, and file-vs-directory boundaries. Four one-row CSV fixtures support an isolated public LOAD/external-table case. ## Validation Linux/amd64, Go 1.26.4, controlled native CPU test wrapper; base and merge-base `074bc173a5b64ed0ff0b6ad6ab091f478bf76c27` (fresh main). - Pre-fix `TestReadDirHiddenPaths`: FAIL with missing explicitly selected files. The same regression and nearby controls pass after the fix. - Focused `TestLocalETLFSListExplicitHiddenEntries` and `TestReadDirHiddenPaths`: PASS. Final strengthened cardinality oracle also passed after review. - Owning packages: `mo-cgo-test -count=1 -timeout=10m ./pkg/fileservice ./pkg/sql/plan` PASS (30.154s and 5.440s). - All five Parquet compile tests named in matrixorigin#28270 passed with both TMPDIR and GOTMPDIR beneath an explicitly hidden directory. This includes file fanout, empty-file/schema validation, and cancellation consumer paths. - `make -j8 build`: PASS. - New `load_hidden_paths.sql`: 17/17 twice on the same standalone instance, 0.240s and 0.166s, normal comparison mode with independently specified results. Zero residual fixture databases/tables and no created `.missing` directory were verified. SQL and ISCP readiness were checked before running. - Entire `load_data` directory: PASS, 1057 successful, 0 failed, 2 existing ignored statements, approximately 5s reported case time. No new skips or weakened assertions. Initial local harness runs lacked LOCAL INFILE enablement and output cleanup; both settings were aligned with mo-tester configuration before the successful group run. The literal CSV LOAD is a compatibility control; external-table scans exercise the public `ReadDir` regression, while existing Parquet compile tests exercise the LOAD fanout consumer. No additional service fixture was added to UT. ## Pre-PR review Reviewed all 10 delivery files and the shared closure from public LOAD/external scan callers through `ReadDir`, filesystem selection, entry matching, and iterator cleanup. R2 local filesystem/public result contract; ordinary bug fix, no design document gate. No shared mutable state, new worker/cache, persisted/wire format, or distributed routing change. The opt-in flag is call-local, and the existing deferred directory close covers completion, error, and early iterator stop. Default discovery and all its other consumers keep the same behavior and I/O shape; no new scan or allocation layer is introduced. Race/restart/multi-CN stress is not the discriminating evidence for this sequential selection change. No unresolved in-scope review blockers. CI is not waited for.
This branch was previously deployed
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.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #28270
What this PR does / why we need it:
Local external-file discovery lists each path component.
LocalETLFS.Listpreviously removed dot-prefixed entries before the planner could match even an
explicit
.datacomponent, silently turning existing input into an empty list.LocalETLFS.ListWithHiddenbacked by the existing listing loop.ReadDiruses it only when a local path component starts with.. This coversliteral hidden directories/files, dot-prefixed globs, and hidden components
after a wildcard.
Listsemantics for every existing consumer, includingfiltering temporary files used by atomic writes. Ordinary
*still does notdiscover hidden entries. Other filesystem implementations remain unchanged.
nothing and do not create directories. Bypassing listing through dynamic local
filesystem construction would risk creating missing parent directories.
etl:paths, returned file sizes/cardinality,visible/hidden wildcard controls, directory symlinks, invalid patterns,
cancellation, and file-vs-directory boundaries. Four one-row CSV fixtures
support an isolated public LOAD/external-table case.
Validation
Linux/amd64, Go 1.26.4, controlled native CPU test wrapper; base and merge-base
074bc173a5b64ed0ff0b6ad6ab091f478bf76c27(fresh main).TestReadDirHiddenPaths: FAIL with missing explicitly selected files.The same regression and nearby controls pass after the fix.
TestLocalETLFSListExplicitHiddenEntriesandTestReadDirHiddenPaths: PASS. Final strengthened cardinality oracle alsopassed after review.
mo-cgo-test -count=1 -timeout=10m ./pkg/fileservice ./pkg/sql/planPASS (30.154s and 5.440s).
GOTMPDIR beneath an explicitly hidden directory. This includes file fanout,
empty-file/schema validation, and cancellation consumer paths.
make -j8 build: PASS.load_hidden_paths.sql: 17/17 twice on the same standalone instance,0.240s and 0.166s, normal comparison mode with independently specified results.
Zero residual fixture databases/tables and no created
.missingdirectorywere verified. SQL and ISCP readiness were checked before running.
load_datadirectory: PASS, 1057 successful, 0 failed, 2 existingignored statements, approximately 5s reported case time. No new skips or
weakened assertions. Initial local harness runs lacked LOCAL INFILE enablement
and output cleanup; both settings were aligned with mo-tester configuration
before the successful group run.
The literal CSV LOAD is a compatibility control; external-table scans exercise
the public
ReadDirregression, while existing Parquet compile tests exercisethe LOAD fanout consumer. No additional service fixture was added to UT.
Pre-PR review
Reviewed all 10 delivery files and the shared closure from public LOAD/external
scan callers through
ReadDir, filesystem selection, entry matching, and iteratorcleanup. R2 local filesystem/public result contract; ordinary bug fix, no design
document gate. No shared mutable state, new worker/cache, persisted/wire format,
or distributed routing change. The opt-in flag is call-local, and the existing
deferred directory close covers completion, error, and early iterator stop.
Default discovery and all its other consumers keep the same behavior and I/O
shape; no new scan or allocation layer is introduced. Race/restart/multi-CN
stress is not the discriminating evidence for this sequential selection change.
No unresolved in-scope review blockers. CI is not waited for.