From 9593bc63c0434395467e2f3169c817873fcc7902 Mon Sep 17 00:00:00 2001 From: Balaji Veeramani Date: Mon, 2 Dec 2024 12:49:41 -0800 Subject: [PATCH] Fix bug Signed-off-by: Balaji Veeramani --- python/ray/data/read_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/data/read_api.py b/python/ray/data/read_api.py index c0c2b853745..6ac4725cb1f 100644 --- a/python/ray/data/read_api.py +++ b/python/ray/data/read_api.py @@ -2158,7 +2158,7 @@ def create_connection(): Returns: A :class:`Dataset` containing the queried data. """ - if parallelism != -1 or parallelism != 1: + if parallelism != -1 and parallelism != 1: raise ValueError( "To ensure correctness, 'read_sql' always launches one task. The " "'parallelism' argument you specified can't be used."