File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
connectorx-python/connectorx Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 2121 not os .path .basename (os .path .abspath (os .path .join (dir_path , ".." )))
2222 == "connectorx-python"
2323):
24- if "J4RS_BASE_PATH" not in os .environ :
25- os .environ ["J4RS_BASE_PATH" ] = os .path .join (dir_path , "dependencies" )
26- if "CX_REWRITER_PATH" not in os .environ :
27- os .environ ["CX_REWRITER_PATH" ] = os .path .join (
28- dir_path , "dependencies/federated-rewriter.jar"
29- )
24+ os .environ .setdefault ("J4RS_BASE_PATH" , os .path .join (dir_path , "dependencies" ))
25+
26+ os .environ .setdefault (
27+ "CX_REWRITER_PATH" , os .path .join (dir_path , "dependencies/federated-rewriter.jar" )
28+ )
3029
3130
3231def rewrite_conn (conn : str , protocol : str | None = None ):
@@ -202,7 +201,6 @@ def read_sql(
202201 query = query [0 ]
203202 query = remove_ending_semicolon (query )
204203
205-
206204 if isinstance (conn , dict ):
207205 assert partition_on is None and isinstance (
208206 query , str
@@ -231,7 +229,6 @@ def read_sql(
231229 return df
232230
233231 if isinstance (query , str ):
234-
235232 query = remove_ending_semicolon (query )
236233
237234 if partition_on is None :
@@ -382,8 +379,8 @@ def reconstruct_pandas(df_infos: dict[str, Any]):
382379
383380
384381def remove_ending_semicolon (query : str ) -> str :
385- if query [- 1 ] == ';' :
386- query = list (query )
382+ if query [- 1 ] == ";" :
383+ query = list (query )
387384 query .pop (- 1 )
388385 query = "" .join (query )
389386 return query
You can’t perform that action at this time.
0 commit comments