Tabnine Logo
TimestampDatum.asChars
Code IndexAdd Tabnine 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)

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

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Collectors (java.util.stream)
  • JLabel (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now