Skip to content

Commit 27d451c

Browse files
committed
Revert unintended changes to test_jdbc.py.
1 parent f4af7e2 commit 27d451c

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

test/test_jdbc.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,12 @@
2121

2222
from sqlalchemy import create_engine
2323

24-
# It is usually not a good idea to bury starting the JVM in a library. Doing so would
25-
# make it so that JPype can only be used in the module and not available for other things.
26-
# You would also have to handle cases were the JVM is already started or the JVM was started
27-
# with a different thread than main.
28-
import jpype
29-
#jpype.startJVM("-ea")
30-
jpype.startJVM("-ea", classpath="lib/*")
24+
engine = create_engine('drill+sadrill://localhost:8047/dfs?use_ssl=False')
3125

32-
#engine = create_engine('drill+sadrill://localhost:8047/dfs?use_ssl=False')
33-
#
34-
#with engine.connect() as con:
35-
# rs = con.execute('SELECT * FROM cp.`employee.json` LIMIT 5')
36-
# for row in rs:
37-
# print(row)
26+
with engine.connect() as con:
27+
rs = con.execute('SELECT * FROM cp.`employee.json` LIMIT 5')
28+
for row in rs:
29+
print(row)
3830

3931
print("Now JDBC")
4032
jdbc_engine = create_engine('drill+jdbc://admin:password@localhost:31010')

0 commit comments

Comments
 (0)