def _get_nodes_by_glob_path_pattern(
        self,
        dataset_rows: "DataTable",
        path_list: list[str],
        glob_name: str,
        column="file",
    ) -> Iterator[Node]:
        """Finds all Nodes that correspond to GLOB like path pattern."""
        dr = dataset_rows
        de = dr.dir_expansion()
        q = de.query(
            dr.select().where(dr.c("is_latest") == true()).subquery()
        ).subquery()
        path_glob = "/".join([*path_list, glob_name])
        dirpath = path_glob[: -len(glob_name)]
        relpath = sa.func.substr(de.c(q, "path"), len(dirpath) + 1)

        return self.get_nodes(
            self.expand_query(de, q, dr)
            .where(
                (de.c(q, "path").op("GLOB")(path_glob))
                & ~self.instr(relpath, "/")
                & (de.c(q, "path") != dirpath)
            )
            .order_by(de.c(q, "source"), de.c(q, "path"), de.c(q, "version")),
            dr,
        )
Finds all Nodes that correspond to GLOB like path pattern.
src/datachain/data_storage/warehouse.py