On Mon, Dec 13, 2021 at 5:58 AM Tiago Cardoso
wrote:
> Hi,
>
> I'd like to know if there's a "public API" way of merging two datasets.
> Something like, having the following:
>
> ```
> ds1 = db[table1].where(a: 1)
> ds2 = db[table2].where(b: 2)
>
> # I'd like
> ds1.merge(ds2) #=> would merge as
Hi,
I'd like to know if there's a "public API" way of merging two datasets.
Something like, having the following:
```
ds1 = db[table1].where(a: 1)
ds2 = db[table2].where(b: 2)
# I'd like
ds1.merge(ds2) #=> would merge as where(a: 1, b: 2)
# I'm working around it by:
ds1.where(ds2.opts[:where])
.intersect is definitely not covering my use-case.
I'd be for a simple Dataset#merge_where, but as you said, it's relatively
simple to do it. My only concerns would be if messing with Dataset#opts
would be considered implementation detail and private-ish API. If I can
rely on it working
On Mon, Dec 13, 2021 at 9:03 AM Tiago Cardoso
wrote:
> .intersect is definitely not covering my use-case.
>
Could you explain why? For the example you gave, results should be
identical.
> I'd be for a simple Dataset#merge_where, but as you said, it's relatively
> simple to do it. My only
A segunda-feira, 13 de dezembro de 2021 à(s) 18:12:19 UTC, Jeremy Evans
escreveu:
> On Mon, Dec 13, 2021 at 9:03 AM Tiago Cardoso
> wrote:
>
>> .intersect is definitely not covering my use-case.
>>
>
> Could you explain why? For the example you gave, results should be
> identical.
>
The
On Mon, Dec 13, 2021 at 10:29 AM Tiago Cardoso
wrote:
> A segunda-feira, 13 de dezembro de 2021 à(s) 18:12:19 UTC, Jeremy Evans
> escreveu:
>
>> On Mon, Dec 13, 2021 at 9:03 AM Tiago Cardoso
>> wrote:
>>
>>> .intersect is definitely not covering my use-case.
>>>
>>
>> Could you explain why?