public TableFunctionTableSink(TableFunctionTable targetTable) {
        CloudConfiguration cloudConfiguration = CloudConfigurationFactory.buildCloudConfigurationForStorage(
                targetTable.getProperties());
        this.table = targetTable;
        this.cloudConfiguration = cloudConfiguration;
    }
@Test
    public void testTableFunctionTableSink() {
        List<Column> columns = ImmutableList.of(new Column("k1", Type.INT));
        Map<String, String> properties = new HashMap<>();
        properties.put("path", "s3://path/to/directory/");
        properties.put("format", "csv");
        properties.put("compression", "uncompressed");
        properties.put("csv.column_separator", ",");
        properties.put("csv.row_delimiter", "\n");
        TableFunctionTable tableFunctionTable = new TableFunctionTable(columns, properties, new SessionVariable());

        TableFunctionTableSink tableFunctionTableSink = new TableFunctionTableSink(tableFunctionTable);

        assertTrue(tableFunctionTableSink.canUsePipeLine());
        assertTrue(tableFunctionTableSink.canUseRuntimeAdaptiveDop());
        assertFalse(tableFunctionTableSink.isWriteSingleFile());

        assertEquals("TABLE FUNCTION TABLE SINK\n" +
                "  PATH: s3://path/to/directory/\n" +
                "  FORMAT: csv\n" +
                "  PARTITION BY: []\n" +
                "  SINGLE: false\n" +
                "  RANDOM\n", tableFunctionTableSink.getExplainString("", TExplainLevel.NORMAL));
        TDataSink tDataSink = tableFunctionTableSink.toThrift();
        assertEquals(tDataSink.getType(), TDataSinkType.TABLE_FUNCTION_TABLE_SINK);
    }