Codota Logo
TimestampDatum.asChars
Code IndexAdd Codota to your IDE (free)

How to use
asChars
method
in
org.apache.tajo.datum.TimestampDatum

Best Java code snippets using org.apache.tajo.datum.TimestampDatum.asChars (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.apache.tajo/tajo-common

public String toString() {
 return asChars();
}
origin: apache/tajo

public String toString() {
 return asChars();
}
origin: org.apache.tajo/tajo-common

@Override
public byte[] asTextBytes() {
 return asChars().getBytes(TextDatum.DEFAULT_CHARSET);
}
origin: apache/tajo

@Override
public byte[] asTextBytes() {
 return asChars().getBytes(TextDatum.DEFAULT_CHARSET);
}
origin: org.apache.tajo/tajo-common

@Override
public String asChars() {
 TimeMeta tm = asTimeMeta();
 return asChars(tm, TimeZone.getDefault(), true);
}
origin: apache/tajo

@Override
public String asChars() {
 TimeMeta tm = asTimeMeta();
 return asChars(tm, TimeZone.getDefault(), true);
}
origin: org.apache.tajo/tajo-common

public String toString(TimeZone timeZone, boolean includeTimeZone) {
 return asChars(asTimeMeta(), timeZone, includeTimeZone);
}
origin: apache/tajo

public String toString(TimeZone timeZone, boolean includeTimeZone) {
 return asChars(asTimeMeta(), timeZone, includeTimeZone);
}
origin: apache/tajo

private String getString(Tuple tuple, int index) throws SQLException {
 if (handleNull(tuple, index)) {
  return null;
 }
 switch(tuple.type(index)) {
  case BOOLEAN:
   return String.valueOf(tuple.getBool(index));
  case TIMESTAMP:
   return TimestampDatum.asChars(tuple.getTimeDate(index), timezone, false);
  default :
   return tuple.asDatum(index).asChars();
 }
}
origin: org.apache.tajo/tajo-client

private String getString(Tuple tuple, int index) throws SQLException {
 if (handleNull(tuple, index)) {
  return null;
 }
 switch(tuple.type(index)) {
  case BOOLEAN:
   return String.valueOf(tuple.getBool(index));
  case TIMESTAMP:
   return TimestampDatum.asChars(tuple.getTimeDate(index), timezone, false);
  default :
   return tuple.asDatum(index).asChars();
 }
}
origin: org.apache.tajo/tajo-storage

 break;
case TIMESTAMP:
 bytes = ((TimestampDatum)datum).asChars(TajoConf.getCurrentTimeZone(), true).getBytes();
 length = bytes.length;
 out.write(bytes);
origin: apache/tajo

case TIMESTAMP:
 bytes = TimestampDatum.asChars(
   tuple.getTimeDate(columnIndex), tableTimezone, false).getBytes(Bytes.UTF8_CHARSET);
origin: org.apache.tajo/tajo-storage-hdfs

case TIMESTAMP:
 bytes = TimestampDatum.asChars(
   tuple.getTimeDate(columnIndex), tableTimezone, false).getBytes(Bytes.UTF8_CHARSET);
origin: apache/tajo

@Test
public void testCastWithNestedFunction() throws TajoException {
 QueryContext context = new QueryContext(getConf());
 context.put(SessionVars.TIMEZONE, "GMT-6");
 TimeZone tz = TimeZone.getTimeZone("GMT-6");
 int unixtime = 1389071574; // (int) (System.currentTimeMillis() / 1000);
 TimestampDatum expected = DatumFactory.createTimestampDatumWithUnixTime(unixtime);
 testSimpleEval(context, String.format("select to_timestamp(CAST(split_part('%d.999', '.', 1) as INT8));", unixtime),
   new String[] {TimestampDatum.asChars(expected.asTimeMeta(), tz, false)});
}
origin: apache/tajo

case TIMESTAMP:
 return TimestampDatum.asChars(tuple.getTimeDate(columnIndex), tableTimezone, false);
case BLOB:
 return Base64.encodeBase64String(tuple.getBytes(columnIndex));
origin: apache/tajo

TimestampDatum timestampDatum = (TimestampDatum)operandDatum;
if (tz != null) {
 return DatumFactory.createText(TimestampDatum.asChars(operandDatum.asTimeMeta(), tz, false));
} else {
 return DatumFactory.createText(timestampDatum.asChars());
origin: org.apache.tajo/tajo-common

TimestampDatum timestampDatum = (TimestampDatum)operandDatum;
if (tz != null) {
 return DatumFactory.createText(TimestampDatum.asChars(operandDatum.asTimeMeta(), tz, false));
} else {
 return DatumFactory.createText(timestampDatum.asChars());
origin: apache/tajo

 json.put(fieldName, TimestampDatum.asChars(input.getTimeDate(fieldIndex), timezone, false));
 break;
case TIME:
origin: org.apache.tajo/tajo-storage-hdfs

 json.put(fieldName, TimestampDatum.asChars(input.getTimeDate(fieldIndex), timezone, false));
 break;
case TIME:
origin: apache/tajo

String outTupleAsChars;
if (outTuple.type(i) == Type.TIMESTAMP) {
 outTupleAsChars = TimestampDatum.asChars(outTuple.getTimeDate(i), timeZone, false);
} else {
 outTupleAsChars = outTuple.asDatum(i).toString();
org.apache.tajo.datumTimestampDatumasChars

Popular methods of TimestampDatum

  • <init>
  • asTimeMeta
  • asInt8
  • getDayOfMonth
  • getHourOfDay
  • getMinuteOfHour
  • getMonthOfYear
  • getSecondOfMinute
  • getYear
  • toString
  • type
  • type

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Collectors (java.util.stream)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now