public static HiveStorageFormat getHiveStorageFormat(ConnectorSession session) { return HiveStorageFormat.valueOf(session.getProperty(HIVE_STORAGE_FORMAT, String.class).toUpperCase(ENGLISH)); }
config.getHiveStorageFormat(), false, value -> HiveStorageFormat.valueOf(((String) value).toUpperCase(ENGLISH)), HiveStorageFormat::toString), new PropertyMetadata<>(
String ds = partitionKeys.get(0).getValue(); String fileFormat = partitionKeys.get(1).getValue(); HiveStorageFormat fileType = HiveStorageFormat.valueOf(fileFormat.toUpperCase()); int dummyPartition = Integer.parseInt(partitionKeys.get(2).getValue());
String ds = partitionKeys.get(0).getValue(); String fileFormat = partitionKeys.get(1).getValue(); HiveStorageFormat fileType = HiveStorageFormat.valueOf(fileFormat.toUpperCase()); int dummyPartition = Integer.parseInt(partitionKeys.get(2).getValue());
@Inject public HiveTableProperties(TypeManager typeManager, HiveClientConfig config) { tableProperties = ImmutableList.of( new PropertyMetadata<>( STORAGE_FORMAT_PROPERTY, "Hive storage format for the table", VARCHAR, HiveStorageFormat.class, config.getHiveStorageFormat(), false, value -> HiveStorageFormat.valueOf(((String) value).toUpperCase(ENGLISH))), new PropertyMetadata<>( PARTITIONED_BY_PROPERTY, "Partition columns", typeManager.getParameterizedType(ARRAY, ImmutableList.of(VARCHAR.getTypeSignature()), ImmutableList.of()), List.class, ImmutableList.of(), false, value -> ImmutableList.copyOf(((List<String>) value).stream() .map(name -> name.toLowerCase(ENGLISH)) .collect(Collectors.toList())))); }
String ds = partitionKeys.get(0).getValue(); String fileFormat = partitionKeys.get(1).getValue(); HiveStorageFormat fileType = HiveStorageFormat.valueOf(fileFormat.toUpperCase()); long dummyPartition = Long.parseLong(partitionKeys.get(2).getValue());
String ds = partitionKeys.get(0).getValue(); String fileFormat = partitionKeys.get(1).getValue(); HiveStorageFormat fileType = HiveStorageFormat.valueOf(fileFormat.toUpperCase()); int dummyPartition = Integer.parseInt(partitionKeys.get(2).getValue());
String ds = partitionKeys.get(0).getValue(); String fileFormat = partitionKeys.get(1).getValue(); HiveStorageFormat fileType = HiveStorageFormat.valueOf(fileFormat.toUpperCase()); long dummyPartition = Long.parseLong(partitionKeys.get(2).getValue());
String ds = partitionKeys.get(0).getValue(); String fileFormat = partitionKeys.get(1).getValue(); HiveStorageFormat fileType = HiveStorageFormat.valueOf(fileFormat.toUpperCase()); int dummyPartition = Integer.parseInt(partitionKeys.get(2).getValue());