Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for if (0.14 sec)

  1. internal/s3select/json/reader.go

    }
    
    // Read - reads single record.
    func (r *Reader) Read(dst sql.Record) (sql.Record, error) {
    	v, ok := <-r.valueCh
    	if !ok {
    		if err := r.decoder.Err(); err != nil {
    			return nil, errJSONParsingError(err)
    		}
    		return nil, io.EOF
    	}
    
    	var kvs jstream.KVS
    	if v.ValueType == jstream.Object {
    		// This is a JSON object type (that preserves key
    		// order)
    		kvs = v.Value.(jstream.KVS)
    	} else {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 24 03:58:53 GMT 2022
    - 3K bytes
    - Viewed (0)
  2. internal/s3select/parquet/reader.go

    		var value interface{}
    		if v, ok := nextRow[col.FlatName()]; ok {
    			value, err = convertFromAnnotation(col.Element(), v)
    			if err != nil {
    				return nil, errParquetParsingError(err)
    			}
    		}
    		kvs = append(kvs, jstream.KV{Key: col.FlatName(), Value: value})
    	}
    
    	// Reuse destination if we can.
    	dstRec, ok := dst.(*jsonfmt.Record)
    	if !ok {
    		dstRec = &jsonfmt.Record{}
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 14 13:54:47 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  3. src/bytes/reader.go

    	if off >= int64(len(r.s)) {
    		return 0, io.EOF
    	}
    	n = copy(b, r.s[off:])
    	if n < len(b) {
    		err = io.EOF
    	}
    	return
    }
    
    // ReadByte implements the [io.ByteReader] interface.
    func (r *Reader) ReadByte() (byte, error) {
    	r.prevRune = -1
    	if r.i >= int64(len(r.s)) {
    		return 0, io.EOF
    	}
    	b := r.s[r.i]
    	r.i++
    	return b, nil
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. src/archive/tar/reader.go

    			// just a regular file with additional attributes.
    
    			if err := mergePAX(hdr, paxHdrs); err != nil {
    				return nil, err
    			}
    			if gnuLongName != "" {
    				hdr.Name = gnuLongName
    			}
    			if gnuLongLink != "" {
    				hdr.Linkname = gnuLongLink
    			}
    			if hdr.Typeflag == TypeRegA {
    				if strings.HasSuffix(hdr.Name, "/") {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  5. internal/s3select/simdj/reader.go

    	// Potentially racy if the stream decoder is still reading.
    	if r.readCloser != nil {
    		r.readCloser.Close()
    	}
    	if r.exitReader != nil {
    		close(r.exitReader)
    		r.readerWg.Wait()
    		r.exitReader = nil
    		r.input = nil
    	}
    	return nil
    }
    
    // startReader will start a reader that accepts input from r.input.
    // Input should be root -> object input. Each root indicates a record.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 30 17:02:22 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  6. internal/etag/reader.go

    // MD5 checksum of the content read from r as ETag.
    //
    // If the provided etag is not nil the returned
    // Reader compares the etag with the computed
    // MD5 sum once the r returns io.EOF.
    func NewReader(ctx context.Context, r io.Reader, etag ETag, forceMD5 []byte) *Reader {
    	if er, ok := r.(*Reader); ok {
    		if er.readN == 0 && Equal(etag, er.checksum) {
    			return er
    		}
    	}
    	if len(forceMD5) != 0 {
    		return &Reader{
    			src:      r,
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  7. src/archive/zip/reader.go

    	if r.nread > r.f.UncompressedSize64 {
    		return 0, ErrFormat
    	}
    	if err == nil {
    		return
    	}
    	if err == io.EOF {
    		if r.nread != r.f.UncompressedSize64 {
    			return 0, io.ErrUnexpectedEOF
    		}
    		if r.desr != nil {
    			if err1 := readDataDescriptor(r.desr, r.f); err1 != nil {
    				if err1 == io.EOF {
    					err = io.ErrUnexpectedEOF
    				} else {
    					err = err1
    				}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
  8. internal/hash/reader.go

    	r.bytesRead += int64(n)
    	if r.sha256 != nil {
    		r.sha256.Write(p[:n])
    	}
    	if r.contentHasher != nil {
    		r.contentHasher.Write(p[:n])
    	}
    
    	if err == io.EOF { // Verify content SHA256, if set.
    		if r.expectedMin > 0 {
    			if r.bytesRead < r.expectedMin {
    				return 0, SizeTooSmall{Want: r.expectedMin, Got: r.bytesRead}
    			}
    		}
    		if r.expectedMax > 0 {
    			if r.bytesRead > r.expectedMax {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.8K bytes
    - Viewed (0)
  9. internal/s3select/csv/reader.go

    		r.recordsRead = 0
    	}
    	csvRecord := r.current[r.recordsRead]
    	r.recordsRead++
    
    	// If no column names are set, use _(index)
    	if r.columnNames == nil {
    		r.columnNames = make([]string, len(csvRecord))
    		for i := range csvRecord {
    			r.columnNames[i] = fmt.Sprintf("_%v", i+1)
    		}
    	}
    
    	// If no index map, add that.
    	if r.nameIndexMap == nil {
    		r.nameIndexMap = make(map[string]int64)
    		for i := range r.columnNames {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  10. internal/bucket/bandwidth/reader.go

    	if r.throttle == nil {
    		return r.r.Read(buf)
    	}
    	if r.lastErr != nil {
    		err = r.lastErr
    		return
    	}
    	b := r.throttle.Burst()  // maximum available tokens
    	need := len(buf)         // number of bytes requested by caller
    	hdr := r.opts.HeaderSize // remaining header bytes
    	var tokens int           // number of tokens to request
    
    	if hdr > 0 { // available tokens go towards header first
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Sep 06 03:21:59 GMT 2023
    - 3.1K bytes
    - Viewed (0)
Back to top