maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #12778
Re: Accessing read records during join for condition pushdown
-
To:
Sergei Golubchik <serg@xxxxxxxxxxx>
-
From:
"Berrocal, Eduardo" <eduardo.berrocal@xxxxxxxxx>
-
Date:
Thu, 8 Jul 2021 18:43:05 +0000
-
Accept-language:
en-US
-
Arc-authentication-results:
i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none
-
Arc-message-signature:
i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dx6JlHV6Vq9luNJOkF8AsiTSk6A0m5L/VNfxUC8Aj0U=; b=YlkgELMfGYSyv3ixgrp6bk7b8Aur7NJFL8ZIfwPy6p07OeBYbO3wO7gExYBk/JZy2H8GBrsfw3y4Gk6m7M1nLJCOFEll1SleWV8UdcWpTMa5zln1Xmz0e0A7EtleDa9e6cgWpquT1O0AIrCloLMXOr80sHdWc6iF+vK4eGDeItrB1wo2I/PW7cdc9xlFa0SVSm0SLeEjZoHQcl196Qj/c5eWbqlvg2OZLxhzFCQX+tjbzRCHTy7u6OaQAcr72b5Iil7YpP5Dma6ahsg4n00IASb7sDtGDGukLsLBkn0S7BZBkmBKUnXashviL5FRY7BiWEMpuAsqMNHU5EXLtX4gBg==
-
Arc-seal:
i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uc6FkGyOXIeBp8IDLa51gPZvCBvRkVLOZoe8YlhFnQXhQsAMCba2emFXVPSGKxN/byqFdEqOFh7QYEVRaxESWYWagwRELEdHMlsaXIWzeDXQ4ZYrcprYb1PU5h1f9N37A9GDQ0/Kp0C64mgjSDLMqe+yR19o3wGgeIPf9sGN28O+erdMiqRhJaC71kkmc7DXn+Q+zPuiQsHAriM/SUxv58DAvB33TdorzQ9tS1k5MFNSkZyqG9r10Mqv8trsg5Wf5eiAbPMQLytJOaLZu6kPof3W0L6F+Q3Lj+usYAfk5VRPXqgf/vEO1oXviD4zJf+dAqxNmFqC/aedazNjod0GQQ==
-
Authentication-results:
mariadb.org; dkim=none (message not signed) header.d=none;mariadb.org; dmarc=none action=none header.from=intel.com;
-
Cc:
"maria-developers@xxxxxxxxxxxxxxxxxxx" <maria-developers@xxxxxxxxxxxxxxxxxxx>
-
Dlp-product:
dlpe-windows
-
Dlp-reaction:
no-action
-
Dlp-version:
11.5.1.3
-
In-reply-to:
<YOaslcsRcTD1mqJQ@pweza>
-
Thread-index:
Addyu53/Di069vVzQH+2/nbHVe69JABEUwuAABbMdoA=
-
Thread-topic:
[Maria-developers] Accessing read records during join for condition pushdown
Hello Sergei,
Thanks a lot for your response.
I have tried to use that route but without success. The problem is that I can only access the last record read from table1.
Let say that, during the JOIN, 3 rows are read from table1. These 3 rows will be compared against all rows from table2. I want to avoid a full scan of table2 by passing the value for the field from those 3 rows down to the storage engine. When condition pushdown is called on table2, and I try to access those 3 rows, I can only access the last one read through f1->field->ptr (or f1->table->record[0]).
For what I understand, f1->table does not store an array of read records during JOIN. Am I right? That is stored in the JOIN_CACHE object. Please correct me if I am wrong here.
Thanks again for your help,
Eduardo Berrocal García de Carellán
Senior Software Engineer
Intel Corporation | intel.com
-----Original Message-----
From: Sergei Golubchik <serg@xxxxxxxxxxx>
Sent: Thursday, July 8, 2021 12:43 AM
To: Berrocal, Eduardo <eduardo.berrocal@xxxxxxxxx>
Cc: maria-developers@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Maria-developers] Accessing read records during join for condition pushdown
Hi, Berrocal,!
On Jul 06, Berrocal, Eduardo wrote:
> Hello list (first email here, hopefully sending it to the right
> address), I have been trying to solve this problem for a while now,
> and I am stuck. I wonder if what I am trying to do is even possible.
>
> I am implementing a new storage engine which handles engine condition
> pushdown. Now, when MariaDB is working on a JOIN using more than one
> table (for simplicity, let's assume 2), how can I access the read
> records for table 1 when working on a condition pushdown for table 2?
> When joining like this: table1.field1 = table2.field1, I can see 2
> Item objects of type FIELD in the condition. However, I can't find
> where the read records for table1 are so I can effectively filter
> records in table2 by those values.
if f1 is Item_field for table1.field1, then generally
f1->field->table->record[0]
is the current record for the table1, and
f1->field->ptr
is the pointer to the field1 value in that currect record
> Thanks a lot for your help,
>
> Eduardo Berrocal García de Carellán
> Senior Software Engineer
> Intel Corporation | intel.com<http://intel.com/>
Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx
Follow ups
References