Comments (4)
This seems like a footgun, since any mistakes in filter specification that result in empty arguments (like an incorrect list comprehension) will silently pass through and appear to have no effect.
We'd also want to make this behavior consistent throughout our APIs if we did do it.
For example order_by
must be called with at least one key, do we now want to allow that to do nothing if no keys are passed. What about mutate
, should that also be no-op with nothing passed? select
? What about drop_null
/fill_null
, rename
, relocate
? All of these need thinking through for such a change.
It's not as convenient for your particular case, but as the application/library developer you're the only person that knows whether an empty filter is reasonable thing to pass into Ibis from your API.
from ibis.
I'm going to close this out as unplanned.
That said, @NickCrews your anywidget
thing looks awesome!
from ibis.
I didn't do the "if not filters" and then I accidentally passed in no filters and I got an error.
Not necessarily fun, but much better to get a loud error than a silent one.
from ibis.
Hmmm good point, we would need to change all the other APIs too. I could be convinced that all those changes are good too. I think they're solvable, but this is definitely not a huge pain so let's leave for now.
To play devils advocate for a moment though: I footgunned myself with the inverse: In my application code, at first I didn't do the "if not filters" and then I accidentally passed in no filters and I got an error. So both choices lead to footguns, just ones of different characteristics. I think I agree your example footgun is more likely than mine though.
from ibis.
Related Issues (20)
- feat(duckdb): set secrets via SecretsManager HOT 1
- fix(hierarchy): make ibis self-consistent with usage of `catalog.database`
- test(postgres): after `reconnect`, temp tables are still visible HOT 1
- docs(ops): operation matrix for streaming ops
- bug: Error Reading Delta Lake Tables With New delta_scan Call HOT 3
- feat: Windowing/aggregating over literals HOT 2
- feat: Support `QUALIFY` syntax to filter on analytic expression HOT 1
- feat: `to_interval` for Snowflake backend
- refactor(api): rename `to_*` methods for type coercion to something else
- bug: unable to deserialize using cloudpickle HOT 4
- bug(pkl): some case expressions cannot be pickled HOT 2
- feat: ArrayCollect aggregation for Flink backend HOT 2
- feat: pandas backend cannot use sql, can you add this? HOT 2
- feat: add Excel backend is necessary HOT 2
- bug: repr for count now includes np.int64 or whatever type HOT 5
- [meta]: Expression IR performance
- feat: Connecting snowflake using Key Pair Authentication HOT 2
- feat: MonetDB as backend HOT 3
- bug: mssql pandas data can't be converted by correct type
- feat: MariaDB as new Backend HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ibis.