Buggy code:
@ Plugin ( type = "sink" ) @ Name ( "TPFSParquet" ) @ Description ( "PARQUET<seq2seq4repair_space>Sink<seq2seq4repair_space>with<seq2seq4repair_space>Time<seq2seq4repair_space>Partitioned<seq2seq4repair_space>File<seq2seq4repair_space>Dataset" ) public class TimePartitionedFileSetDatasetParquetSink extends BatchSink < StructuredRecord , Void , GenericRecord > { private static final String SCHEMA_DESC = "The<seq2seq4repair_space>schema<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>record" ; private static final String TPFS_NAME_DESC = "Name<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>Time<seq2seq4repair_space>Partitioned<seq2seq4repair_space>FileSet<seq2seq4repair_space>Dataset<seq2seq4repair_space>to<seq2seq4repair_space>which<seq2seq4repair_space>the<seq2seq4repair_space>records<seq2seq4repair_space>" + "have<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>written" ; private static final String BASE_PATH_DESC = "The<seq2seq4repair_space>base<seq2seq4repair_space>path<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>time<seq2seq4repair_space>partitioned<seq2seq4repair_space>fileset.<seq2seq4repair_space>Defaults<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>" + "name<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>dataset" ; private final StructuredToAvroTransformer recordTransformer = new StructuredToAvroTransformer ( ) ; public static class TPFSParquetSinkConfig extends PluginConfig { @ Description ( TimePartitionedFileSetDatasetParquetSink . TPFS_NAME_DESC ) private String name ; @ Description ( TimePartitionedFileSetDatasetParquetSink . SCHEMA_DESC ) private String schema ; @ Description ( TimePartitionedFileSetDatasetParquetSink . BASE_PATH_DESC ) @ Nullable private String basePath ; } private final TimePartitionedFileSetDatasetParquetSink . TPFSParquetSinkConfig tpfsParquetSinkConfig ; private String hiveSchema ; public TimePartitionedFileSetDatasetParquetSink ( TimePartitionedFileSetDatasetParquetSink . TPFSParquetSinkConfig tpfsParquetSinkConfig ) throws UnsupportedTypeException , IOException { } @ Override public void configurePipeline ( PipelineConfigurer pipelineConfigurer ) { String tpfsName = tpfsParquetSinkConfig . name ; String basePath = ( ( tpfsParquetSinkConfig . basePath ) == null ) ? tpfsName : tpfsParquetSinkConfig . basePath ; try { hiveSchema = SchemaConverter . toHiveSchema ( Schema . parseJson ( tpfsParquetSinkConfig . schema . toLowerCase ( ) ) ) ; } catch ( UnsupportedTypeException e ) { } catch ( IOException e ) { } <START_BUG> pipelineConfigurer . createDataset ( tpfsName , TimePartitionedFileSet . class . getName ( ) , FileSetProperties . builder ( ) . setBasePath ( basePath ) . setInputFormat ( AvroParquetInputFormat . class ) . setOutputFormat ( AvroParquetOutputFormat . class ) . setEnableExploreOnCreate ( true ) . setExploreFormat ( "PARQUET" ) . setExploreSchema ( hiveSchema . substring ( 1 , ( ( hiveSchema . length ( ) ) - 1 ) ) ) . build ( ) ) ; <END_BUG> } @ Override public void prepareRun ( BatchSinkContext context ) { } @ Override public void transform ( StructuredRecord input , Emitter < KeyValue < Void , GenericRecord > > emitter ) throws Exception { } }

Fix:
pipelineConfigurer . createDataset ( tpfsName , TimePartitionedFileSet . class . getName ( ) , FileSetProperties . builder ( ) . setBasePath ( basePath ) . setInputFormat ( AvroParquetInputFormat . class ) . setOutputFormat ( AvroParquetOutputFormat . class ) . setEnableExploreOnCreate ( true ) . setExploreFormat ( "parquet" ) . setExploreSchema ( hiveSchema . substring ( 1 , ( ( hiveSchema . length ( ) ) - 1 ) ) ) . build ( ) ) ;