internal override async Task <bool> NextAsync()
        {
            if (isClosed)
            {
                throw new SnowflakeDbException(SFError.DATA_READER_ALREADY_CLOSED);
            }

            _currentChunkRowIdx++;
            if (_currentChunkRowIdx < _currentChunkRowCount)
            {
                return(true);
            }

            if (_chunkDownloader != null)
            {
                // GetNextChunk could be blocked if download result is not done yet.
                // So put this piece of code in a seperate task
                Logger.Info("Get next chunk from chunk downloader");
                IResultChunk nextChunk = await _chunkDownloader.GetNextChunkAsync();

                if (nextChunk != null)
                {
                    resetChunkInfo(nextChunk);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

            return(false);
        }
        internal override bool Next()
        {
            if (isClosed)
            {
                throw new SnowflakeDbException(SFError.DATA_READER_ALREADY_CLOSED);
            }

            _currentChunkRowIdx++;
            if (_currentChunkRowIdx < _currentChunkRowCount)
            {
                return(true);
            }

            Logger.Info("Get next chunk from chunk downloader");
            SFResultChunk nextChunk;

            if ((nextChunk = _chunkDownloader?.GetNextChunkAsync().Result) != null)
            {
                resetChunkInfo(nextChunk);
                return(true);
            }

            return(false);
        }