Skip to content

Commit 3b412a9

Browse files
improvement(tables): lift the 10K-char per-string-cell limit
1 parent 431e177 commit 3b412a9

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

apps/sim/lib/table/__tests__/validation.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,11 @@ describe('Validation', () => {
278278
expect(result.valid).toBe(true)
279279
})
280280

281-
it('should reject string exceeding max length', () => {
282-
const longString = 'a'.repeat(TABLE_LIMITS.MAX_STRING_VALUE_LENGTH + 1)
281+
it('should allow long strings — cell size is bounded by the row byte cap, not per-value', () => {
282+
const longString = 'a'.repeat(100_000)
283283
const data = { name: longString }
284284
const result = validateRowAgainstSchema(data, schema)
285-
expect(result.valid).toBe(false)
286-
expect(result.errors[0]).toContain('exceeds max string length')
285+
expect(result.valid).toBe(true)
287286
})
288287
})
289288

apps/sim/lib/table/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export const TABLE_LIMITS = {
1212
MAX_COLUMNS_PER_TABLE: 50,
1313
MAX_TABLE_NAME_LENGTH: 128,
1414
MAX_COLUMN_NAME_LENGTH: 50,
15-
MAX_STRING_VALUE_LENGTH: 10000,
1615
MAX_DESCRIPTION_LENGTH: 500,
1716
DEFAULT_QUERY_LIMIT: 100,
1817
MAX_QUERY_LIMIT: 1000,

apps/sim/lib/table/validation.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@ export function validateRowAgainstSchema(data: RowData, schema: TableSchema): Va
228228
case 'string':
229229
if (typeof value !== 'string') {
230230
errors.push(`${column.name} must be string, got ${typeof value}`)
231-
} else if (value.length > TABLE_LIMITS.MAX_STRING_VALUE_LENGTH) {
232-
errors.push(`${column.name} exceeds max string length`)
233231
}
234232
break
235233
case 'number':

0 commit comments

Comments
 (0)