datachain
datachain copied to clipboard
`filter` with function call is broken
This doesn't work:
read_storage("...")
.filter(file_stem("file.path") == "file.parquet")
.save("index")
How were you importing file_stem, is that from datachain.func.path.file_stem or datachain.sql.functions.path.file_stem? If latter, that is not supported. You have to use the former one.
I tested with following which seem to work:
import datachain as dc
from datachain.func import file_stem
chain = dc.read_storage("file:///Users/user/Projects/iterative/datachain/")
chain.filter(file_stem("file.path") == "file.path").show()
Hmm, okay, what is the difference? Is func.path deprecated now? (we probably should cleanup docs then)
Is
func.pathdeprecated now?
I think so, but I am not the best person to answer to that. cc @dreadatour @ilongin.