public static long timestampPartitionKey(String value, DateTimeZone zone, String name) { try { return parseHiveTimestamp(value, zone); } catch (IllegalArgumentException e) { throw new PrestoException(HIVE_INVALID_PARTITION_VALUE, format("Invalid partition value '%s' for TIMESTAMP partition key: %s", value, name)); } }
private static long parse(DateTime time, String pattern) { return parseHiveTimestamp(DateTimeFormat.forPattern(pattern).print(time), nonDefaultTimeZone()); }
public static long timestampPartitionKey(String value, DateTimeZone zone, String name) { try { return parseHiveTimestamp(value, zone); } catch (IllegalArgumentException e) { throw new PrestoException(HIVE_INVALID_PARTITION_VALUE, format("Invalid partition value '%s' for TIMESTAMP partition key: %s", value, name)); } }
private static long parse(DateTime time, String pattern) { return parseHiveTimestamp(DateTimeFormat.forPattern(pattern).print(time), nonDefaultTimeZone()); }
private void parseLongColumn(int column, byte[] bytes, int start, int length) { boolean wasNull; if (length == 0 || (length == "\\N".length() && bytes[start] == '\\' && bytes[start + 1] == 'N')) { wasNull = true; } else if (hiveTypes[column].equals(HiveType.HIVE_DATE)) { String value = new String(bytes, start, length); longs[column] = parseHiveDate(value); wasNull = false; } else if (hiveTypes[column].equals(HiveType.HIVE_TIMESTAMP)) { String value = new String(bytes, start, length); longs[column] = parseHiveTimestamp(value, hiveStorageTimeZone); wasNull = false; } else { longs[column] = parseLong(bytes, start, length); wasNull = false; } nulls[column] = wasNull; }
private static long parse(DateTime time, String pattern) { return parseHiveTimestamp(DateTimeFormat.forPattern(pattern).print(time), nonDefaultTimeZone()); }
vector[i] = parseHiveTimestamp(value, hiveStorageTimeZone);
return NullableValue.asNull(TIMESTAMP); return NullableValue.of(TIMESTAMP, parseHiveTimestamp(value, timeZone));