Closed AdaZheng98 closed 5 years ago
First, the warning seems to be due to Java version. Can you tell me which version you are using?
Second, can you put quotes seperately for the schema name (=public) and the table name? I believe that is the correct syntax.
I'm using openjdk 11.0.3. I changed the syntax and now I'm able to create a scrambled table. However, when I look at it I see all entries in columns verdictdbtier and verdictdbblock are 0. Is it normal?
If # of rows < 1 million, then it’s expected. There are options (blocksize I remember) to change the behavior.
I believe warnings should disappear for jdk8, which is what we target.
I'm trying to create a scramble table using this command verdict_conn = pyverdict.postgres( host='localhost', user='postgres', password='', port=5432, dbname='postgres' )
verdict_conn.sql('SHOW search_path')
verdict_conn.sql('CREATE SCRAMBLE "public.tbl_flights_1GB_scrambled" from "public.tbl_flights_1GB" ')
from postgresql database. It's giving me this error: (base) yzheng11@yzheng11-desktop:~/Desktop$ python3 testpostgresql.py WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.rits.cloning.Cloner (file:/home/yzheng11/anaconda3/lib/python3.7/site-packages/pyverdict/verdict_jar/verdictdb-core-0.5.9-jar-with-dependencies.jar) to field java.util.TreeSet.m WARNING: Please consider reporting this to the maintainers of com.rits.cloning.Cloner WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Traceback (most recent call last): File "testpostgresql.py", line 14, in
verdict_conn.sql('CREATE SCRAMBLE "public.tbl_flights_1GB_scrambled" from "public.tbl_flights_1GB" ')
File "/home/yzheng11/anaconda3/lib/python3.7/site-packages/pyverdict/verdictcontext.py", line 227, in sql
return self.sql_raw_result(query).to_df()
File "/home/yzheng11/anaconda3/lib/python3.7/site-packages/pyverdict/verdictcontext.py", line 235, in sql_raw_result
java_resultset = self._context.sql(query)
File "/home/yzheng11/anaconda3/lib/python3.7/site-packages/py4j/java_gateway.py", line 1286, in call
answer, self.gateway_client, self.target_id, self.name)
File "/home/yzheng11/anaconda3/lib/python3.7/site-packages/py4j/protocol.py", line 328, in get_return_value
format(target_id, ".", name), value)
py4j.protocol.Py4JJavaError: An error occurred while calling o2.sql.
: org.verdictdb.exception.VerdictDBDbmsException: Issued the following query: create schema if not exists
ERROR: syntax error at end of input
Position: 29
at org.verdictdb.connection.JdbcConnection.executeSingle(JdbcConnection.java:240)
at org.verdictdb.connection.JdbcConnection.execute(JdbcConnection.java:200)
at org.verdictdb.connection.ConcurrentJdbcConnection.execute(ConcurrentJdbcConnection.java:149)
at org.verdictdb.connection.CachedDbmsConnection.execute(CachedDbmsConnection.java:51)
at org.verdictdb.coordinator.ScramblingCoordinator.scramble(ScramblingCoordinator.java:376)
at org.verdictdb.coordinator.ScramblingCoordinator.scramble(ScramblingCoordinator.java:302)
at org.verdictdb.coordinator.ExecutionContext.sql(ExecutionContext.java:199)
at org.verdictdb.VerdictContext.sql(VerdictContext.java:388)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:282)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.base/java.lang.Thread.run(Thread.java:834)
How do I solve it?