Skip to content

Parquet path resolution: a dangling symlink or unreadable entry is silently skipped #114

Description

@jdatcmd

Follow-up from the review of #113, merged with the finding open.

pq_is_regular_file (src/columnar_parquet_reader.c) returns false on every stat failure, not only for a directory. A part-3.parquet that is a broken symlink, or one whose parent denies search, is now skipped silently: the query succeeds and returns the remaining files' rows. Before #113 the path was appended and the reader raised could not open file.

Silence is defensible for a directory listing, where a foo.parquet subdirectory is a normal thing to find in a Hive-style tree. It is harder to defend for a glob, because the user wrote the pattern that matched the name, and in both cases the failure mode is missing rows rather than an error.

Proposed change: skip S_ISDIR only, and let every other entry fall through to the reader's open, which already produces a clear per-path message.

Also open from the same review:

  • The pattern "%s" matched no regular files path added in Phase G multifile: skip non-regular-file matches; add the suite to the matrix #113 has no test. It is reachable only when a glob matches at least one path and every match is filtered out; a glob over a directory holding only *.parquet subdirectories would cover it, and would pin whichever behaviour the above settles on.
  • When a directory holds only *.parquet subdirectories, the error reads directory "..." contains no .parquet files, which is not what the user sees when they list it. contains no readable .parquet files describes it accurately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions