yiyutian1 commented on code in PR #25763: URL: https://github.com/apache/flink/pull/25763#discussion_r1886088390
########## flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/ToTimestampLtzTypeStrategy.java: ########## @@ -23,19 +23,54 @@ import org.apache.flink.table.types.DataType; import org.apache.flink.table.types.inference.CallContext; import org.apache.flink.table.types.inference.TypeStrategy; +import org.apache.flink.table.types.logical.LogicalTypeRoot; +import java.util.List; import java.util.Optional; /** Type strategy of {@code TO_TIMESTAMP_LTZ}. */ @Internal public class ToTimestampLtzTypeStrategy implements TypeStrategy { + private static final int DEFAULT_PRECISION = 3; + @Override public Optional<DataType> inferType(CallContext callContext) { - if (callContext.isArgumentLiteral(1)) { - final int precision = callContext.getArgumentValue(1, Integer.class).get(); - return Optional.of(DataTypes.TIMESTAMP_LTZ(precision)); + List<DataType> argumentTypes = callContext.getArgumentDataTypes(); Review Comment: Added unit tests. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org