Skip to content

Commit b4cc332

Browse files
author
王平10304955
committed
Merge branch 'temp_cloudberry' of https://github.com/ZTE-EBASE/cloudberry into temp_cloudberry
2 parents ecf10ac + a356cf9 commit b4cc332

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

  • src/backend/utils/misc/fstream

src/backend/utils/misc/fstream/gfile.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,17 @@ bz_file_read(gfile_t *fd, void *ptr, size_t len)
241241

242242
while (z->in_size < sizeof z->in)
243243
{
244-
s = read_and_retry(fd, z->in + z->in_size, sizeof z->in
245-
- z->in_size);
244+
if (fd->is_sftp)
245+
{
246+
#ifdef LIBSSH2
247+
gfile_printf_then_putc_newline("sftp_rean : Read bz files from an SFTP server");
248+
s = sftp_read(fd, z->in + z->in_size, sizeof z->in - z->in_size);
249+
#endif
250+
}
251+
252+
else
253+
s = read_and_retry(fd, z->in + z->in_size, sizeof z->in
254+
- z->in_size);
246255
if (s == 0)
247256
break;
248257
if (s < 0)

0 commit comments

Comments
 (0)