// canProjectionBeEliminatedStrict checks whether a projection can be
// eliminated, returns true if the projection just copy its child's output.
324623
func canProjectionBeEliminatedStrict(p *PhysicalProjection) bool {
	// If this projection is specially added for `DO`, we keep it.
	if p.CalculateNoDelay {
		return false
	}
	if p.Schema().Len() == 0 {
		return true
	}
	child := p.Children()[0]
	if p.Schema().Len() != child.Schema().Len() {
		return false
	}
	for i, expr := range p.Exprs {
		col, ok := expr.(*expression.Column)
		if !ok || !col.Equal(nil, child.Schema().Columns[i]) {
			return false
		}
	}
	return true
}
490657
func IsExactlySinglePointer(target interface{}) bool {
	//	va, isVa := target.(reflect.Value)
	//	if isVa {
	//		return IsExactlySinglePointerType(va.Type())
	//	}
	typ := reflect.ValueOf(target).Type()
	return IsExactlySinglePointerType(typ)
}
893821
func (c *contractMaturityReport) AddLimboStage2Htlc(kid *kidOutput) {
	c.limboBalance += kid.Amount()

	htlcReport := htlcMaturityReport{
		outpoint: *kid.OutPoint(),
		amount:   kid.Amount(),
		stage:    2,
	}

	// If the confirmation height is set, then this means the first stage
	// has been confirmed, and we know the final maturity height of the CSV
	// delay.
	if kid.ConfHeight() != 0 {
		htlcReport.maturityHeight = kid.ConfHeight() + kid.BlocksToMaturity()
	}

	c.htlcs = append(c.htlcs, htlcReport)
}
868421
func (s *SetTerminationProtectionInput) SetTerminationProtected(v bool) *SetTerminationProtectionInput {
	s.TerminationProtected = &v
	return s
}
731563
func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) {
	f.d.arrayCannotExpand(sliceLen, streamLen)
}
1260254
func (ref *ShapeRef) CanBeEmpty() bool {
	switch ref.Shape.Type {
	case "string":
		return !(ref.Location == "uri" || ref.HostLabel)
	case "blob", "map", "list":
		return !(ref.Location == "uri")
	default:
		return true
	}
}
788355
func isDestRelative(base, dest string) bool {
	fullPath := dest
	if !filepath.IsAbs(dest) {
		fullPath = filepath.Join(base, dest)
	}
	relative, err := filepath.Rel(base, fullPath)
	if err != nil {
		return false
	}
	return relative == "." || relative == stripPathShortcuts(relative)
}
75827
func execAction(action Action, opts map[string]interface{}) bool {
	a := Action{
		Bee:  action.Bee,
		Name: action.Name,
	}

	for _, opt := range action.Options {
		ph := Placeholder{
			Name: opt.Name,
		}

		switch opt.Value.(type) {
		case string:
			var value bytes.Buffer

			tmpl, err := template.New(action.Bee + "_" + action.Name + "_" + opt.Name).Funcs(templatehelper.FuncMap).Parse(opt.Value.(string))
			if err == nil {
				err = tmpl.Execute(&value, opts)
			}
			if err != nil {
				panic(err)
			}

			ph.Type = "string"
			ph.Value = value.String()

		default:
			ph.Type = opt.Type
			ph.Value = opt.Value
		}
		a.Options = append(a.Options, ph)
	}

	bee := GetBee(a.Bee)
	if (*bee).IsRunning() {
		(*bee).LogAction()

		log.Println("\tExecuting action:", a.Bee, "/", a.Name, "-", GetActionDescriptor(&a).Description)
		for _, v := range a.Options {
			log.Println("\t\tOptions:", v)
		}

		(*bee).Action(a)
	} else {
		log.Println("\tNot executing action on stopped bee:", a.Bee, "/", a.Name, "-", GetActionDescriptor(&a).Description)
		for _, v := range a.Options {
			log.Println("\t\tOptions:", v)
		}
	}

	return true
}
1276912
func (version *Version) HasBeenActivated(activatedOn NetworkValue) (bool, error) {
	properties := NewProperties()
	property := NewProperty(properties)
	property.PropertyID = version.parent.PropertyID

	property.Group = NewGroup(NewGroups())
	property.Group.GroupID = version.parent.GroupID

	property.Contract = NewContract(NewContracts())
	property.Contract.ContractID = version.parent.ContractID

	activations, err := property.GetActivations()
	if err != nil {
		return false, err
	}

	for _, activation := range activations.Activations.Items {
		if activation.PropertyVersion == version.PropertyVersion && (activatedOn == "" || activation.Network == activatedOn) {
			return true, nil
		}
	}

	return false, nil
}
1265822
func IsExtension(p *xpp.XMLPullParser) bool {
	space := strings.TrimSpace(p.Space)
	if prefix, ok := p.Spaces[space]; ok {
		return !(prefix == "" || prefix == "rss" || prefix == "rdf" || prefix == "content")
	}

	return p.Space != ""
}
555119
func (a *imageLimitRangerPlugin) SupportsLimit(limitRange *corev1.LimitRange) bool {
	if limitRange == nil {
		return false
	}

	for _, limit := range limitRange.Spec.Limits {
		if limit.Type == imagev1.LimitTypeImage {
			return true
		}
	}
	return false
}
1157634
func (t *awsElasticBlockStoreCSITranslator) CanSupport(pv *v1.PersistentVolume) bool {
	return pv != nil && pv.Spec.AWSElasticBlockStore != nil
}
690076
func IsLimitExceeded(e error) bool {
	type ad interface {
		IsLimitExceededError() bool
	}
	_, ok := Unwrap(e).(ad)
	return ok
}
1372366
func (sys *NotificationSys) RemoteTargetExist(bucketName string, targetID event.TargetID) bool {
	sys.Lock()
	defer sys.Unlock()

	targetMap, ok := sys.bucketRemoteTargetRulesMap[bucketName]
	if ok {
		_, ok = targetMap[targetID]
	}

	return ok
}
693376
func (f PackedFormat) IsSupported(bitsPerValue int) bool {
	switch int(f) {
	case PACKED_SINGLE_BLOCK:
		return is64Supported(bitsPerValue)
	}
	return bitsPerValue >= 1 && bitsPerValue <= 64
}
711370
func (s *CommonStorageDB) IsBulkOptimizable() bool {
	_, ok := s.VersionedDB.(statedb.BulkOptimizable)
	return ok
}
364164
func isExported(fieldName string) bool {
	if len(fieldName) < 1 {
		return false
	}

	if string(fieldName[0]) == strings.ToUpper(string(fieldName[0])) {
		return true
	}

	return false
}