def select_node_fields_by_parent_path_tar(
        self, dataset_rows: "DataTable", parent_path: str, fields: Iterable[str]
    ) -> Iterator[tuple[Any, ...]]:
        """
        Gets latest-version file nodes from the provided parent path
        """
        dr = dataset_rows
        dirpath = f"{parent_path}/"

        def field_to_expr(f):
            if f == "name":
                return pathfunc.name(dr.c("path"))
            return dr.c(f)

        q = (
            sa.select(*(field_to_expr(f) for f in fields))
            .where(
                dr.c("path").like(f"{sql_escape_like(dirpath)}%"),
                ~self.instr(pathfunc.name(dr.c("path")), "/"),
                dr.c("is_latest") == true(),
            )
            .order_by(dr.c("source"), dr.c("path"), dr.c("version"), dr.c("etag"))
        )
        return self.db.execute(q)

        Gets latest-version file nodes from the provided parent path
        
src/datachain/data_storage/warehouse.py