APISonar


com.dremio.common.types.TypeProtos.MinorType.TIME

> com > dremio > common > types > TypeProtos > MinorType > TIME
com APIs dremio APIs common APIs types APIs TypeProtos APIs MinorType APIs TIME APIs

Example 1
public void testTimeStampAndTime() {
    final List<MinorType> inputTypes = Lists.newArrayList();
    inputTypes.add(MinorType.TIME);
    inputTypes.add(MinorType.TIMESTAMP);
    final OptionManager optionManager = mock(OptionManager.class);
    Mockito.when(optionManager.getOption(PlannerSettings.ENABLE_DECIMAL_V2_KEY)).thenReturn
      (OptionValue.createBoolean(OptionValue.OptionType.SYSTEM, PlannerSettings
        .ENABLE_DECIMAL_V2_KEY, true));
    final MinorType result = TypeCastRules.getLeastRestrictiveType(inputTypes);

    assertEquals(result, MinorType.TIME);
  }
Example 2
public static TypeProtos.MinorType getMinorTypeFromArrowMinorType(MinorType arrowMinorType) {
    switch (arrowMinorType) {
    case TIMESTAMPMILLI:
      return TypeProtos.MinorType.TIMESTAMP;
    case TIMESTAMPMILLITZ:
      return TypeProtos.MinorType.TIMESTAMPTZ;
    case TIMEMILLI:
      return TypeProtos.MinorType.TIME;
    case DATEMILLI:
      return TypeProtos.MinorType.DATE;
    default:
      return TypeProtos.MinorType.valueOf(arrowMinorType.name());
    }
  }