map.get with no rows #3890
Unanswered
akshay-okahu
asked this question in
Q&A
Replies: 1 comment
-
this definitely looks like a bug. I opened up an issue and a subsequent PR to address this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
During dataframe operations if there are no rows after filtering, and I use map.get, I get a
daft.exceptions.DaftCoreException: DaftError::ValueError Need at least 1 series to perform concat
exceptionThe only way I found to avoid the exception is to check
df.count_rows() > 0
before using map.get, butcount_rows()
materialises the dataframe.Is there a better way to avoid the exception which avoids materialising the dataframe? Is it possible that map.get can avoid throwing the exception in case of no rows
Sample:
Stacktrace:
I noticed struct.get doesn't throw the exception:
Beta Was this translation helpful? Give feedback.
All reactions