Skip to content

Commit

Permalink
Fix too long integer for Table. (#4651)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

#4594

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh authored Jan 26, 2025
1 parent 4011c8f commit c24137b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rag/app/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ def column_data_type(arr):
for a in arr:
if a is None:
continue
if re.match(r"[+-]?[0-9]+(\.0+)?$", str(a).replace("%%", "")):
if re.match(r"[+-]?[0-9]{,19}(\.0+)?$", str(a).replace("%%", "")):
counts["int"] += 1
elif re.match(r"[+-]?[0-9.]+$", str(a).replace("%%", "")):
elif re.match(r"[+-]?[0-9.]{,19}$", str(a).replace("%%", "")):
counts["float"] += 1
elif re.match(r"(true|yes|是|\*|✓|✔|☑|✅|√|false|no|否|⍻|×)$", str(a), flags=re.IGNORECASE):
counts["bool"] += 1
Expand Down

0 comments on commit c24137b

Please sign in to comment.