(SettableDateObjectInspector) outputOI); case TIMESTAMP: return new PrimitiveObjectInspectorConverter.TimestampConverter( inputOI, (SettableTimestampObjectInspector) outputOI);
break; case TIMESTAMP: timestampConverter = new TimestampConverter((PrimitiveObjectInspector) arguments[0], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
break; case TIMESTAMP: timestampConverter = new TimestampConverter((PrimitiveObjectInspector) arguments[0], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
break; case TIMESTAMP: dateConverter = new TimestampConverter((PrimitiveObjectInspector) arguments[0], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
break; case TIMESTAMP: dateConverter = new TimestampConverter((PrimitiveObjectInspector) arguments[0], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
break; case TIMESTAMP: timestampConverter = new TimestampConverter((PrimitiveObjectInspector) arguments[0], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
break; case TIMESTAMP: timestampConverter = new TimestampConverter(argumentOI, PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
break; case TIMESTAMP: converter = new TimestampConverter((PrimitiveObjectInspector) arguments[i], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
@Override public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException { if (arguments.length < 1) { throw new UDFArgumentLengthException( "The function TIMESTAMP requires at least one argument, got " + arguments.length); } SessionState ss = SessionState.get(); if (ss != null) { intToTimestampInSeconds = ss.getConf().getBoolVar(ConfVars.HIVE_INT_TIMESTAMP_CONVERSION_IN_SECONDS); } try { argumentOI = (PrimitiveObjectInspector) arguments[0]; } catch (ClassCastException e) { throw new UDFArgumentException( "The function TIMESTAMP takes only primitive types"); } tc = new TimestampConverter(argumentOI, PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); tc.setIntToTimestampInSeconds(intToTimestampInSeconds); return PrimitiveObjectInspectorFactory.writableTimestampObjectInspector; }
@Override public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException { if (arguments.length != 2) { throw new UDFArgumentLengthException("The function " + getName() + " requires two " + "argument, got " + arguments.length); } try { argumentOIs = new PrimitiveObjectInspector[2]; argumentOIs[0] = (PrimitiveObjectInspector) arguments[0]; argumentOIs[1] = (PrimitiveObjectInspector) arguments[1]; } catch (ClassCastException e) { throw new UDFArgumentException( "The function " + getName() + " takes only primitive types"); } timestampConverter = new TimestampConverter(argumentOIs[0], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); textConverter = new TextConverter(argumentOIs[1]); return PrimitiveObjectInspectorFactory.javaTimestampObjectInspector; }
break; case TIMESTAMP: dateConverter = new TimestampConverter((PrimitiveObjectInspector) arguments[0], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
break; case TIMESTAMP: dateConverter = new TimestampConverter((PrimitiveObjectInspector) arguments[0], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
break; case TIMESTAMP: timestampConverter = new TimestampConverter(argumentOI, PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
break; case TIMESTAMP: converter = new TimestampConverter((PrimitiveObjectInspector) arguments[i], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
break; case TIMESTAMP: timestampConverter = new TimestampConverter(argumentOI, PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); break;
PrimitiveObjectInspectorFactory.writableStringObjectInspector); case TIMESTAMP: return new TimestampConverter((PrimitiveObjectInspector) arguments[i], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); case TIMESTAMPLOCALTZ:
@Override public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException { if (arguments.length < 1) { throw new UDFArgumentLengthException( "The function TIMESTAMP requires at least one argument, got " + arguments.length); } SessionState ss = SessionState.get(); if (ss != null) { intToTimestampInSeconds = ss.getConf().getBoolVar(ConfVars.HIVE_INT_TIMESTAMP_CONVERSION_IN_SECONDS); } try { argumentOI = (PrimitiveObjectInspector) arguments[0]; } catch (ClassCastException e) { throw new UDFArgumentException( "The function TIMESTAMP takes only primitive types"); } tc = new TimestampConverter(argumentOI, PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); tc.setIntToTimestampInSeconds(intToTimestampInSeconds); return PrimitiveObjectInspectorFactory.writableTimestampObjectInspector; }
@Override public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException { if (arguments.length != 2) { throw new UDFArgumentLengthException("The function " + getName() + " requires two " + "argument, got " + arguments.length); } try { argumentOIs = new PrimitiveObjectInspector[2]; argumentOIs[0] = (PrimitiveObjectInspector) arguments[0]; argumentOIs[1] = (PrimitiveObjectInspector) arguments[1]; } catch (ClassCastException e) { throw new UDFArgumentException( "The function " + getName() + " takes only primitive types"); } timestampConverter = new TimestampConverter(argumentOIs[0], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); textConverter = new TextConverter(argumentOIs[1]); return PrimitiveObjectInspectorFactory.javaTimestampObjectInspector; }
@Override public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException { if (arguments.length < 1) { throw new UDFArgumentLengthException( "The function TIMESTAMP requires at least one argument, got " + arguments.length); } SessionState ss = SessionState.get(); if (ss != null) { intToTimestampInSeconds = ss.getConf().getBoolVar(ConfVars.HIVE_INT_TIMESTAMP_CONVERSION_IN_SECONDS); } try { argumentOI = (PrimitiveObjectInspector) arguments[0]; } catch (ClassCastException e) { throw new UDFArgumentException( "The function TIMESTAMP takes only primitive types"); } tc = new TimestampConverter(argumentOI, PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); tc.setIntToTimestampInSeconds(intToTimestampInSeconds); return PrimitiveObjectInspectorFactory.writableTimestampObjectInspector; }
@Override public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException { if (arguments.length != 2) { throw new UDFArgumentLengthException("The function " + getName() + " requires two " + "argument, got " + arguments.length); } try { argumentOIs = new PrimitiveObjectInspector[2]; argumentOIs[0] = (PrimitiveObjectInspector) arguments[0]; argumentOIs[1] = (PrimitiveObjectInspector) arguments[1]; } catch (ClassCastException e) { throw new UDFArgumentException( "The function " + getName() + " takes only primitive types"); } timestampConverter = new TimestampConverter(argumentOIs[0], PrimitiveObjectInspectorFactory.writableTimestampObjectInspector); textConverter = new TextConverter(argumentOIs[1]); return PrimitiveObjectInspectorFactory.javaTimestampObjectInspector; }