Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for is_full (0.29 sec)

  1. internal/s3select/sql/value.go

    		return false, errArithInvalidOperator
    	}
    	switch op {
    	case opIs:
    		if a.IsNull() {
    			// Missing is null
    			return v.IsNull() || v.IsMissing(), nil
    		}
    		if a.IsMissing() {
    			return v.IsMissing(), nil
    		}
    		// Forward to Equal
    		op = opEq
    	case opIsNot:
    		if a.IsNull() {
    			// Missing is not null
    			return !v.IsNull() && !v.IsMissing(), nil
    		}
    		if a.IsMissing() {
    			return !v.IsMissing(), nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 20.2K bytes
    - Viewed (0)
  2. internal/event/target/kafka.go

    		}
    		return err
    	}
    
    	// Delete the event from store.
    	return target.store.Del(key.Name)
    }
    
    func (target *KafkaTarget) addToBatch(key store.Key) error {
    	if target.batch.IsFull() {
    		if err := target.commitBatch(); err != nil {
    			return err
    		}
    	}
    	if _, ok := target.batch.GetByKey(key.Name); !ok {
    		eventData, err := target.store.Get(key.Name)
    		if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Feb 20 08:16:35 GMT 2024
    - 13K bytes
    - Viewed (0)
  3. internal/store/batch.go

    func (b *Batch[K, T]) Len() int {
    	b.Lock()
    	defer b.Unlock()
    
    	return len(b.keys)
    }
    
    // IsFull checks if the batch is full or not
    func (b *Batch[K, T]) IsFull() bool {
    	b.Lock()
    	defer b.Unlock()
    
    	return b.isFull()
    }
    
    func (b *Batch[K, T]) isFull() bool {
    	return len(b.items) >= int(b.limit)
    }
    
    // NewBatch creates a new batch
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  4. internal/s3select/sql/value_test.go

    			tests = append(tests, test{
    				name: fmt.Sprint(a.GetTypeString(), "!=", b.GetTypeString()),
    				fields: fields{
    					a: *a, b: *b,
    				},
    				// Only Null == Null
    				wantOk: a.IsNull() && b.IsNull() && i == 0 && j == 0,
    			})
    		}
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if gotOk := tt.fields.a.Equals(tt.fields.b); gotOk != tt.wantOk {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 12.5K bytes
    - Viewed (0)
  5. internal/bucket/lifecycle/noncurrentversion.go

    		NoncurrentDays:          val.NoncurrentDays,
    		NewerNoncurrentVersions: val.NewerNoncurrentVersions,
    	}
    	n.set = true
    	return nil
    }
    
    // IsNull returns if both NoncurrentDays and NoncurrentVersions are empty
    func (n NoncurrentVersionExpiration) IsNull() bool {
    	return n.IsDaysNull() && n.NewerNoncurrentVersions == 0
    }
    
    // IsDaysNull returns true if days field is null
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Dec 14 17:41:44 GMT 2021
    - 5.3K bytes
    - Viewed (1)
  6. internal/store/batch_test.go

    		}
    	}
    	err := batch.Add(101, 101)
    	if err == nil || !errors.Is(err, ErrBatchFull) {
    		t.Fatalf("Expected err %v but got %v", ErrBatchFull, err)
    	}
    	if !batch.IsFull() {
    		t.Fatal("Expected batch.IsFull to be true but got false")
    	}
    	batchLen := batch.Len()
    	if batchLen != int(limit) {
    		t.Fatalf("expected batch length to be %v but got %v", limit, batchLen)
    	}
    	keys, items, err := batch.GetAll()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  7. internal/bucket/lifecycle/expiration.go

    	return e.Days == ExpirationDays(0)
    }
    
    // IsDateNull returns true if date field is null
    func (e Expiration) IsDateNull() bool {
    	return e.Date.Time.IsZero()
    }
    
    // IsNull returns true if both date and days fields are null
    func (e Expiration) IsNull() bool {
    	return e.IsDaysNull() && e.IsDateNull()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Feb 21 20:28:34 GMT 2024
    - 6.6K bytes
    - Viewed (1)
  8. internal/bucket/lifecycle/lifecycle.go

    	}
    	return false
    }
    
    // HasExpiry returns 'true' if lifecycle document has Expiry enabled.
    func (lc Lifecycle) HasExpiry() bool {
    	for _, rule := range lc.Rules {
    		if !rule.Expiration.IsNull() || !rule.NoncurrentVersionExpiration.IsNull() {
    			return true
    		}
    	}
    	return false
    }
    
    // UnmarshalXML - decodes XML data.
    func (lc *Lifecycle) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 17.5K bytes
    - Viewed (0)
  9. internal/s3select/sql/funceval.go

    	}
    }
    
    func coalesce(args []*Value) (res *Value, err error) {
    	for _, arg := range args {
    		if arg.IsNull() {
    			continue
    		}
    		return arg, nil
    	}
    	return FromNull(), nil
    }
    
    func nullif(v1, v2 *Value) (res *Value, err error) {
    	// Handle Null cases
    	if v1.IsNull() || v2.IsNull() {
    		return v1, nil
    	}
    
    	err = inferTypesForCmp(v1, v2)
    	if err != nil {
    		return nil, err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 13.2K bytes
    - Viewed (0)
  10. internal/s3select/json/record.go

    		v = f
    	} else if i, ok := value.ToInt(); ok {
    		v = i
    	} else if t, ok := value.ToTimestamp(); ok {
    		v = sql.FormatSQLTimestamp(t)
    	} else if s, ok := value.ToString(); ok {
    		v = s
    	} else if value.IsNull() {
    		v = nil
    	} else if value.IsMissing() {
    		return r, nil
    	} else if b, ok := value.ToBytes(); ok {
    		// This can either be raw json or a CSV value.
    		// Only treat objects and arrays as JSON.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 5.2K bytes
    - Viewed (0)
Back to top