[fix-32824][cassandra]sink with time\date\timestramp syntax error
@@ -61,6 +61,9 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.InetAddress;
+import java.sql.Time;
+import java.sql.Date;
+import java.sql.Timestamp;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.util.ArrayList;
@@ -234,7 +237,10 @@ public class CassandraOutputFormat extends AbstractDtRichOutputFormat<Tuple2> {
if (row.getField(index) == null) {
} else {
fields.append(fieldNames[index] + ",");
- if (row.getField(index) instanceof String) {
+ if (row.getField(index) instanceof String
+ || row.getField(index) instanceof Time
+ || row.getField(index) instanceof Date
+ || row.getField(index) instanceof Timestamp) {
values.append("'" + row.getField(index) + "'" + ",");
} else {
values.append(row.getField(index) + ",");
