-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
select_ipc can not handle empty query result. #19
Comments
That would be much more expected behavior.
Dr. Michael Flaxman
Director of Product
… On Oct 20, 2021, at 4:38 PM, norci ***@***.***> wrote:
If the result of a select statement is empty, then select_ipc will raise an error:
TTransportException('TSocket read 0 bytes')
File "/home/coder/.conda/envs/conda_jl/lib/python3.8/site-packages/pymapd/connection.py", line 489, in select_ipc
tdf = self._client.sql_execute_df(
File "/home/coder/.conda/envs/conda_jl/lib/python3.8/site-packages/omnisci/thrift/OmniSci.py", line 1798, in sql_execute_df
return self.recv_sql_execute_df()
File "/home/coder/.conda/envs/conda_jl/lib/python3.8/site-packages/omnisci/thrift/OmniSci.py", line 1814, in recv_sql_execute_df
(fname, mtype, rseqid) = iprot.readMessageBegin()
File "/home/coder/.conda/envs/conda_jl/lib/python3.8/site-packages/thrift/protocol/TBinaryProtocol.py", line 134, in readMessageBegin
sz = self.readI32()
File "/home/coder/.conda/envs/conda_jl/lib/python3.8/site-packages/thrift/protocol/TBinaryProtocol.py", line 217, in readI32
buff = self.trans.readAll(4)
File "/home/coder/.conda/envs/conda_jl/lib/python3.8/site-packages/thrift/transport/TTransport.py", line 62, in readAll
chunk = self.read(sz - have)
File "/home/coder/.conda/envs/conda_jl/lib/python3.8/site-packages/thrift/transport/TTransport.py", line 164, in read
self.__rbuf = BufferIO(self.__trans.read(max(sz, self.__rbuf_size)))
File "/home/coder/.conda/envs/conda_jl/lib/python3.8/site-packages/thrift/transport/TSocket.py", line 142, in read
raise TTransportException(type=TTransportException.END_OF_FILE,
the bug is in
https://github.com/omnisci/pymapd/blob/7750cec20ee4904ccec1f3828144fd14ada00e04/omnisci/thrift/OmniSci.py#L1814
What about catch this exception, and returns an empty dataframe?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the result of a
select
statement is empty, thenselect_ipc
will raise an error:the bug is in
https://github.com/omnisci/pymapd/blob/7750cec20ee4904ccec1f3828144fd14ada00e04/omnisci/thrift/OmniSci.py#L1814
What about catch this exception, and returns an empty dataframe?
The text was updated successfully, but these errors were encountered: