You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We do have decorator that resolves nested column / signal names in DataChain method arguments (e.g file.name -> file__name), but it doesn't work if columns are arguments to a SQL function.
Example that doesn't work, but should if this is fixed:
fromdatachain.sql.functions.stringimportlengthfromdatachain.lib.dcimportC, DataChainnames= ["aa.txt", "aaa.txt", "a.txt", "aaaaaa.txt", "aa.txt"]
dc=DataChain.from_values(file=[File(name=name) fornameinnames])
dc=dc.order_by(length(C("file.name"))) # this works if file__name is set instead.assertdc.collect_one("file.name") == ["a.txt", "aa.txt", "aa.txt", "aaa.txt", "aaaaaa.txt"]
The text was updated successfully, but these errors were encountered:
Looks like this already works as C from datachain.lib.dc resolves name by replacing . to __ automatically so no additional changes needed and I'm closing the issue.
We do have decorator that resolves nested column / signal names in
DataChain
method arguments (e.gfile.name
->file__name
), but it doesn't work if columns are arguments to a SQL function.Example that doesn't work, but should if this is fixed:
The text was updated successfully, but these errors were encountered: