twobeeb commented on a change in pull request #11575:
URL: https://github.com/apache/kafka/pull/11575#discussion_r808393677



##########
File path: 
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/TimestampConverter.java
##########
@@ -65,14 +66,22 @@
     public static final String FORMAT_CONFIG = "format";
     private static final String FORMAT_DEFAULT = "";
 
+    public static final String UNIX_PRECISION_CONFIG = "unix.precision";
+    private static final String UNIX_PRECISION_DEFAULT = "milliseconds";
+
     public static final ConfigDef CONFIG_DEF = new ConfigDef()
             .define(FIELD_CONFIG, ConfigDef.Type.STRING, FIELD_DEFAULT, 
ConfigDef.Importance.HIGH,
                     "The field containing the timestamp, or empty if the 
entire value is a timestamp")
             .define(TARGET_TYPE_CONFIG, ConfigDef.Type.STRING, 
ConfigDef.Importance.HIGH,
                     "The desired timestamp representation: string, unix, Date, 
Time, or Timestamp")
             .define(FORMAT_CONFIG, ConfigDef.Type.STRING, FORMAT_DEFAULT, 
ConfigDef.Importance.MEDIUM,
                     "A SimpleDateFormat-compatible format for the timestamp. 
Used to generate the output when type=string "
-                            + "or used to parse the input if the input is a 
string.");
+                            + "or used to parse the input if the input is a 
string.")
+            .define(UNIX_PRECISION_CONFIG, ConfigDef.Type.STRING, 
UNIX_PRECISION_DEFAULT, ConfigDef.Importance.LOW,

Review comment:
       Agreed, I've been misled by existing validation code which spans across 
2 fields, making it impossible to use Validator. I'll update accordingly.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to