Github user mattyb149 commented on a diff in the pull request: https://github.com/apache/nifi/pull/3057#discussion_r224126176 --- Diff: nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/orc/PutORC.java --- @@ -157,19 +155,17 @@ public String getDefaultCompressionType(final ProcessorInitializationContext con public HDFSRecordWriter createHDFSRecordWriter(final ProcessContext context, final FlowFile flowFile, final Configuration conf, final Path path, final RecordSchema schema) throws IOException, SchemaNotFoundException { - final Schema avroSchema = AvroTypeUtil.extractAvroSchema(schema); - final long stripeSize = context.getProperty(STRIPE_SIZE).asDataSize(DataUnit.B).longValue(); final int bufferSize = context.getProperty(BUFFER_SIZE).asDataSize(DataUnit.B).intValue(); final CompressionKind compressionType = CompressionKind.valueOf(context.getProperty(COMPRESSION_TYPE).getValue()); final boolean normalizeForHive = context.getProperty(HIVE_FIELD_NAMES).asBoolean(); - TypeInfo orcSchema = NiFiOrcUtils.getOrcField(avroSchema, normalizeForHive); + TypeInfo orcSchema = NiFiOrcUtils.getOrcSchema(schema, normalizeForHive); final Writer orcWriter = NiFiOrcUtils.createWriter(path, conf, orcSchema, stripeSize, compressionType, bufferSize); final String hiveTableName = context.getProperty(HIVE_TABLE_NAME).isSet() ? context.getProperty(HIVE_TABLE_NAME).evaluateAttributeExpressions(flowFile).getValue() - : NiFiOrcUtils.normalizeHiveTableName(avroSchema.getFullName()); + : NiFiOrcUtils.normalizeHiveTableName(schema.toString());// TODO --- End diff -- Yep that's not the right thing to put there :) Will investigate getting a name from the record somehow, or defaulting to a hardcoded table name if none is provided.
---