Tabnine Logo
TimeType
Code IndexAdd Tabnine to your IDE (free)

How to use
TimeType
in
io.prestosql.spi.type

Best Java code snippets using io.prestosql.spi.type.TimeType (Showing top 10 results out of 315)

origin: prestosql/presto

else if (TIME.equals(type)) {
origin: prestosql/presto

public static Block createTestBlock()
{
  BlockBuilder blockBuilder = TIME.createBlockBuilder(null, 15);
  TIME.writeLong(blockBuilder, 1111);
  TIME.writeLong(blockBuilder, 1111);
  TIME.writeLong(blockBuilder, 1111);
  TIME.writeLong(blockBuilder, 2222);
  TIME.writeLong(blockBuilder, 2222);
  TIME.writeLong(blockBuilder, 2222);
  TIME.writeLong(blockBuilder, 2222);
  TIME.writeLong(blockBuilder, 2222);
  TIME.writeLong(blockBuilder, 3333);
  TIME.writeLong(blockBuilder, 3333);
  TIME.writeLong(blockBuilder, 4444);
  return blockBuilder.build();
}
origin: io.prestosql/presto-main

  @SqlType(StandardTypes.BOOLEAN)
  public static boolean isDistinctFrom(
      @BlockPosition @SqlType(value = StandardTypes.TIME, nativeContainerType = long.class) Block left,
      @BlockIndex int leftPosition,
      @BlockPosition @SqlType(value = StandardTypes.TIME, nativeContainerType = long.class) Block right,
      @BlockIndex int rightPosition)
  {
    if (left.isNull(leftPosition) != right.isNull(rightPosition)) {
      return true;
    }
    if (left.isNull(leftPosition)) {
      return false;
    }
    return notEqual(TIME.getLong(left, leftPosition), TIME.getLong(right, rightPosition));
  }
}
origin: prestosql/presto

  @SqlType(StandardTypes.BOOLEAN)
  public static boolean isDistinctFrom(
      @BlockPosition @SqlType(value = StandardTypes.TIME, nativeContainerType = long.class) Block left,
      @BlockIndex int leftPosition,
      @BlockPosition @SqlType(value = StandardTypes.TIME, nativeContainerType = long.class) Block right,
      @BlockIndex int rightPosition)
  {
    if (left.isNull(leftPosition) != right.isNull(rightPosition)) {
      return true;
    }
    if (left.isNull(leftPosition)) {
      return false;
    }
    return notEqual(TIME.getLong(left, leftPosition), TIME.getLong(right, rightPosition));
  }
}
origin: prestosql/presto

  return DateTimeFormatter.ISO_LOCAL_DATE.parse(((String) value), LocalDate::from);
else if (TIME.equals(type)) {
  return DateTimeFormatter.ISO_LOCAL_TIME.parse(((String) value), LocalTime::from);
origin: io.prestosql/presto-main

public static Block createTestBlock()
{
  BlockBuilder blockBuilder = TIME.createBlockBuilder(null, 15);
  TIME.writeLong(blockBuilder, 1111);
  TIME.writeLong(blockBuilder, 1111);
  TIME.writeLong(blockBuilder, 1111);
  TIME.writeLong(blockBuilder, 2222);
  TIME.writeLong(blockBuilder, 2222);
  TIME.writeLong(blockBuilder, 2222);
  TIME.writeLong(blockBuilder, 2222);
  TIME.writeLong(blockBuilder, 2222);
  TIME.writeLong(blockBuilder, 3333);
  TIME.writeLong(blockBuilder, 3333);
  TIME.writeLong(blockBuilder, 4444);
  return blockBuilder.build();
}
origin: prestosql/presto

  return value;
if (TIME.equals(type)) {
  return ISO8601_FORMATTER.print(parseTimeLiteral(timeZoneKey, (String) value));
origin: prestosql/presto

  return value;
if (TIME.equals(type)) {
  return ISO8601_FORMATTER.print(parseTimeLiteral(timeZoneKey, (String) value));
origin: prestosql/presto

  type.writeLong(blockBuilder, days);
else if (TIME.equals(type)) {
  SqlTime time = (SqlTime) value;
  if (time.isLegacyTimestamp()) {
origin: io.prestosql/presto-main

  type.writeLong(blockBuilder, days);
else if (TIME.equals(type)) {
  SqlTime time = (SqlTime) value;
  if (time.isLegacyTimestamp()) {
io.prestosql.spi.typeTimeType

Most used methods

  • equals
  • createBlockBuilder
  • getLong
  • writeLong

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JButton (javax.swing)
  • JLabel (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • CodeWhisperer 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