private void init() throws SQLException {
        if (Objects.nonNull(partitionFields)) {
            // match ${field} from partitionFields
            Matcher matcher = STATIC_PARTITION_PATTERN.matcher(partitionFields);
            while (matcher.find()) {
                LOG.info("find static partition field: {}", matcher.group(1));
                staticPartitionFields.add(matcher.group(1));
            }
        }

        if (updateMode.equalsIgnoreCase(UPDATE_MODE)) {
            if (!storeType.equalsIgnoreCase(KUDU_TYPE)) {
                throw new IllegalArgumentException("update mode not support for non-kudu table!");
            }
            updateStatement = connection.prepareStatement(buildUpdateSql(schema, tableName, fieldNames, primaryKeys));
        } else {
            valueFieldNames = rebuildFieldNameListAndTypeList(fieldNames, staticPartitionFields, fieldTypes, partitionFields);
        }

    }
Date: 2020/10/14
Company: www.dtstack.com

@author tiezhu
impala/impala-sink/src/main/java/com/dtstack/flink/sql/sink/impala/ImpalaOutputFormat.java