Kevin Hu
commited on
Commit
Β·
cd19d72
1
Parent(s):
3828585
Fix too long integer for `Table`. (#4651)
Browse files### What problem does this PR solve?
#4594
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- rag/app/table.py +2 -2
rag/app/table.py
CHANGED
@@ -102,9 +102,9 @@ def column_data_type(arr):
|
|
102 |
for a in arr:
|
103 |
if a is None:
|
104 |
continue
|
105 |
-
if re.match(r"[+-]?[0-9]
|
106 |
counts["int"] += 1
|
107 |
-
elif re.match(r"[+-]?[0-9.]
|
108 |
counts["float"] += 1
|
109 |
elif re.match(r"(true|yes|ζ―|\*|β|β|β|β
|β|false|no|ε¦|β»|Γ)$", str(a), flags=re.IGNORECASE):
|
110 |
counts["bool"] += 1
|
|
|
102 |
for a in arr:
|
103 |
if a is None:
|
104 |
continue
|
105 |
+
if re.match(r"[+-]?[0-9]{,19}(\.0+)?$", str(a).replace("%%", "")):
|
106 |
counts["int"] += 1
|
107 |
+
elif re.match(r"[+-]?[0-9.]{,19}$", str(a).replace("%%", "")):
|
108 |
counts["float"] += 1
|
109 |
elif re.match(r"(true|yes|ζ―|\*|β|β|β|β
|β|false|no|ε¦|β»|Γ)$", str(a), flags=re.IGNORECASE):
|
110 |
counts["bool"] += 1
|