ソースを参照

Fix:Better Support Table Value Type (#8822)

### What problem does this PR solve?

https://github.com/infiniflow/ragflow/issues/8782

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.20.0
Stephen Hu 3ヶ月前
コミット
ce140f1393
コミッターのメールアドレスに関連付けられたアカウントが存在しません
1個のファイルの変更2行の追加2行の削除
  1. 2
    2
      rag/app/table.py

+ 2
- 2
rag/app/table.py ファイルの表示

@@ -96,12 +96,12 @@ def column_data_type(arr):
for a in arr:
if a is None:
continue
if re.match(r"[+-]?[0-9]+$", str(a).replace("%%", "")):
if re.match(r"[+-]?[0-9]+$", str(a).replace("%%", "")) and not str(a).replace("%%", "").startswith("0"):
counts["int"] += 1
if int(str(a)) > 2**63 - 1:
float_flag = True
break
elif re.match(r"[+-]?[0-9.]{,19}$", str(a).replace("%%", "")):
elif re.match(r"[+-]?[0-9.]{,19}$", str(a).replace("%%", "")) and not str(a).replace("%%", "").startswith("0"):
counts["float"] += 1
elif re.match(r"(true|yes|是|\*|✓|✔|☑|✅|√|false|no|否|⍻|×)$", str(a), flags=re.IGNORECASE):
counts["bool"] += 1

読み込み中…
キャンセル
保存