Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2379#discussion_r196440793
--- Diff:
core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java
---
@@ -289,6 +289,12 @@ public void putDouble(int rowId, double value) {
@Override
public void putBytes(int rowId, byte[] bytes) {
+ // rowId * 4 represents the length of L in LV
+ if (bytes.length > (Integer.MAX_VALUE - totalLength - rowId * 4)) {
--- End diff --
Better to add a check in FieldEncoder to validate if it crosses 67104 bytes
for varchar datatype, it should be fail first mechanism, here it will fail
while writing which is too late as most of the data transformation is done.
---