Examples of asBool()


Examples of com.creativewidgetworks.goldparser.parser.Variable.asBool()

        if (theOperator.equals("==")) {
           if (bothValuesAreNumbers()) {
               b = lValue.asNumber().compareTo(rValue.asNumber()) == 0;
               result = new Variable(Boolean.valueOf(b));
           } else if (bothValuesAreBooleans()) {
               b = lValue.asBool() == rValue.asBool();
               result = new Variable(Boolean.valueOf(b));
           } else if (bothValuesAreTimestamps()) {
               b = lValue.asTimestamp().compareTo(rValue.asTimestamp()) == 0;
               result = new Variable(Boolean.valueOf(b));
           } else if (oneOrBothValuesAreStrings()) {
View Full Code Here

Examples of com.creativewidgetworks.goldparser.parser.Variable.asBool()

        } else if (theOperator.equals("<>")) {
            if (bothValuesAreNumbers()) {
                b = lValue.asNumber().compareTo(rValue.asNumber()) != 0;
                result = new Variable(Boolean.valueOf(b));
            } else if (bothValuesAreBooleans()) {
                b = lValue.asBool() != rValue.asBool();
                result = new Variable(Boolean.valueOf(b));
            } else if (bothValuesAreTimestamps()) {
                b = lValue.asTimestamp().compareTo(rValue.asTimestamp()) != 0;
                result = new Variable(Boolean.valueOf(b));
            } else if (oneOrBothValuesAreStrings()) {
View Full Code Here

Examples of com.creativewidgetworks.goldparser.parser.Variable.asBool()

        if (theOperator.equals("==")) {
           if (bothValuesAreNumbers()) {
               b = lValue.asNumber().compareTo(rValue.asNumber()) == 0;
               result = new Variable(Boolean.valueOf(b));
           } else if (bothValuesAreBooleans()) {
               b = lValue.asBool() == rValue.asBool();
               result = new Variable(Boolean.valueOf(b));
           } else if (bothValuesAreTimestamps()) {
               b = lValue.asTimestamp().compareTo(rValue.asTimestamp()) == 0;
               result = new Variable(Boolean.valueOf(b));
           } else if (oneOrBothValuesAreStrings()) {
View Full Code Here

Examples of com.creativewidgetworks.goldparser.parser.Variable.asBool()

        } else if (theOperator.equals("<>")) {
            if (bothValuesAreNumbers()) {
                b = lValue.asNumber().compareTo(rValue.asNumber()) != 0;
                result = new Variable(Boolean.valueOf(b));
            } else if (bothValuesAreBooleans()) {
                b = lValue.asBool() != rValue.asBool();
                result = new Variable(Boolean.valueOf(b));
            } else if (bothValuesAreTimestamps()) {
                b = lValue.asTimestamp().compareTo(rValue.asTimestamp()) != 0;
                result = new Variable(Boolean.valueOf(b));
            } else if (oneOrBothValuesAreStrings()) {
View Full Code Here

Examples of org.apache.tajo.datum.Datum.asBool()

  @Override
  public boolean getBoolean(int fieldId) throws SQLException {
    Datum datum = cur.get(fieldId - 1);
    handleNull(datum);
    return datum.asBool();
  }

  @Override
  public boolean getBoolean(String colName) throws SQLException {
    Datum datum = cur.get(findColumn(colName));
View Full Code Here

Examples of org.apache.tajo.datum.Datum.asBool()

  @Override
  public boolean getBoolean(String colName) throws SQLException {
    Datum datum = cur.get(findColumn(colName));
    handleNull(datum);
    return datum.asBool();
  }

  @Override
  public byte getByte(int fieldId) throws SQLException {
    Datum datum = cur.get(fieldId - 1);
View Full Code Here

Examples of org.apache.tajo.datum.Datum.asBool()

    handleNull(d);

    TajoDataTypes.Type dataType = schema.getColumn(fieldId - 1).getDataType().getType();

    switch(dataType) {
      case BOOLEAN:  return d.asBool();
      case INT1:
      case INT2: return d.asInt2();
      case INT4: return d.asInt4();
      case INT8: return d.asInt8();
      case TEXT:
View Full Code Here

Examples of org.apache.tajo.datum.Datum.asBool()

   */
  @Override
  public boolean getBoolean(int fieldId) throws SQLException {
    Datum datum = cur.get(fieldId - 1);
    handleNull(datum);
    return datum.asBool();
  }

  /*
   * (non-Javadoc)
   *
 
View Full Code Here

Examples of org.apache.tajo.datum.Datum.asBool()

   */
  @Override
  public boolean getBoolean(String colName) throws SQLException {
    Datum datum = cur.get(findColumn(colName));
    handleNull(datum);
    return datum.asBool();
  }

  /*
   * (non-Javadoc)
   *
 
View Full Code Here

Examples of org.apache.tajo.datum.Datum.asBool()

            case BOOLEAN: {
              datum = tuple.get(i);
              if (datum instanceof NullDatum) {
                //null datum is zero length byte array
              } else {
                outputStream.write(datum.asBool() ? trueBytes : falseBytes);   //Compatibility with Apache Hive
              }
              break;
            }
            case NULL:
              break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.