Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
57724: optbuilder: add ST_Collect/ST_MakeLine to isOrderingSensitive r=rytaft a=otan Release note (bug fix): Fix a bug where ST_MakeLine and ST_Collect did not respect ordering when used over a window clause. 57745: cloudimpl: fix short-read on EOF of compressed GCS file r=dt a=dt Previously the helper for reading GCS files that handled resuming after errors would return the amount read from Read() calls that did not return an error, or would move to its retries for those that did return an error. However the io.Reader interface allows a Read call to return n > 0 *and* a non-nil error, and expects the caller to handle the n read bytes before the error, particularly if err = EOF, where the last Read() call might read the last X bytes and then return (X, EOF). This changes the resuming reader to return n and err from the underlying reader as-is if err is nil or, after this change, if it is EOF. Other errors are left as is -- they will cause it to return 0 regardless of n -- a future change may wish to change these as well, however EOF is a special case in that it is expected. Interestingly the regular underlying reader does not do this -- it seems that it returns (n, nil) and then (0, EOF) on the next call, so this bug wasn't caught before. However a user observed that files stored using the SDK's native compression functionality were read incorrectly, so it seems like the decompressing implementation of the underlying reader does utilize the (n>0, EOF) option in the interface specification. The included test case thus exercises this change by comparing the content of /usr/share/dict/words as stored on GCS with and without native gzip compression enabled (gsutil's -Z option). Release note (bug fix): Fix a bug that could cause IMPORT to incorrectly read files stored on Google Cloud if uploaded using its compression option (gsutil -Z). Fixes #56152 Co-authored-by: Oliver Tan <[email protected]> Co-authored-by: David Taylor <[email protected]>
- Loading branch information