code: func ComputeBitNeg(sc *variable.StatementContext, a Datum) (d Datum, err error) {
  	aKind := a.Kind()
  	if aKind == KindInt64 || aKind == KindUint64 {
  		d.SetUint64(^a.GetUint64())
  		return
  	}
  	// If either is not integer, we round the operands and then use uint64 to calculate.
  	x, err := convertNonInt2RoundUint64(sc, a)
  	if err != nil {
  		return d, errors.Trace(err)
  	}
  
  	d.SetUint64(^x)
  	return d, nil
  }
docs: // ComputeBitNeg computes the result of ~a.