ntshmah commented on a change in pull request #924:
URL: https://github.com/apache/phoenix/pull/924#discussion_r506773711



##########
File path: 
phoenix-core/src/main/java/org/apache/phoenix/exception/DataExceedsCapacityException.java
##########
@@ -31,11 +31,26 @@ public DataExceedsCapacityException(String message) {
                 
SQLExceptionCode.DATA_EXCEEDS_MAX_CAPACITY).setMessage(message).build().buildException());
     }
     
+    @Deprecated
     public DataExceedsCapacityException(PDataType type, Integer precision, 
Integer scale, String columnName, ImmutableBytesWritable value) {
         super(new 
SQLExceptionInfo.Builder(SQLExceptionCode.DATA_EXCEEDS_MAX_CAPACITY)
             .setMessage((columnName == null ? "" : columnName + " ") + 
getTypeDisplayString(type, precision, scale, value))
             .build().buildException());
     }
+
+    public DataExceedsCapacityException(String columnName, String mesage) {
+        super(new SQLExceptionInfo.Builder(
+                SQLExceptionCode.DATA_EXCEEDS_MAX_CAPACITY)
+                .setColumnName(columnName)
+                .setMessage(mesage).build()
+                .buildException());
+    }
+
+    public DataExceedsCapacityException(String columnName, int columnLength) {
+        this(columnName, "maxLength=" + columnLength);
+    }
+
+    @Deprecated
     public DataExceedsCapacityException(PDataType type, Integer precision, 
Integer scale) {
         this(type, precision, scale, null, null);

Review comment:
       You would also want to change this to call the new constructor: 
`this(type, precision, scale, null)` since this will be deprecated.




----------------------------------------------------------------
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.

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


Reply via email to