[Groonga-commit] [Broken] groonga/groonga#1614 (master - 5a179f4)

Back to archive index

Travis-CI notif****@travi*****
Thu Mar 7 16:02:21 JST 2013


Build Update for groonga/groonga
-------------------------------------

Build: #1614
Status: Broken

Duration: 15 minutes and 6 seconds
Commit: 5a179f4 (master)
Author: Kouhei Sutou
Message: Add a new function: sub_filter()

sub_filter() resolves the following situation:

Schema:

  table_create Files TABLE_PAT_KEY ShortText
  column_create Files revision COLUMN_SCALAR UInt32

  table_create Packages TABLE_PAT_KEY ShortText
  column_create Packages files COLUMN_VECTOR Files

  column_create Files packages_files_index COLUMN_INDEX Packages files

  table_create Revisions TABLE_PAT_KEY UInt32
  column_create Revisions files_revision COLUMN_INDEX Files revision

Data:

  load --table Files
  [
  {"_key": "include/groonga.h", "revision": 100},
  {"_key": "src/groonga.c",     "revision": 29},
  {"_key": "lib/groonga.rb",    "revision": 12},
  {"_key": "README.textile",    "revision": 24},
  {"_key": "ha_mroonga.cc",     "revision": 40},
  {"_key": "ha_mroonga.hpp",    "revision": 6}
  ]

  load --table Packages
  [
  {"_key": "groonga", "files": ["include/groonga.h", "src/groonga.c"]},
  {"_key": "rroonga", "files": ["lib/groonga.rb", "README.textile"]},
  {"_key": "mroonga", "files": ["ha_mroonga.cc", "ha_mroonga.hpp"]}
  ]

We want to search packages that have any files where 10 <= revision < 40.

We can't use the following query for this puropose:

  select Packages \
    --filter 'files.revision >= 10 && files.revision < 40' \
    --output_columns '_key, files, files.revision'

It matches all packages because the query means that all of the
following conditions should be true:

  * revision >= 10 for each file in files
  * revision < 40 for each file in files

Let's consider about mroonga package. "revision >= 10" is matched
against "ha_mroonga.cc" (revision: 40). "revision < 40" is matched
against "ha_mroonga.hpp" (revision: 6). So mroonga package is
matched.

It is not what we want.

We want packages that matches the following condition:

  * There is any file that matches both revision >= 10 and revision < 40.

Let's consider about mroonga package. "ha_mroonga.cc" (revision: 40)
doesn't match "revision >= 10 && revision <
40". "ha_mroonga.hpp" (revision: 6) doesn't match "revision >= 10 &&
revision < 40". So mroonga packages isn't matched.

It is what we want.

The following query is for the search condition:

  select Packages \
    --filter 'sub_filter(files, "revision >= 10 && revision < 40")' \
    --output_columns '_key, files, files.revision'

It requires sub_filter().

View the changeset: https://github.com/groonga/groonga/compare/3a6fedd17927...5a179f498e50

View the full build log and details: https://travis-ci.org/groonga/groonga/builds/5306469

--

You can configure recipients for build notifications in your .travis.yml file. See http://bit.ly/lCybCJ

The delivery of this notification was kindly sponsored by Postmark. Send transactional email confidently using http://postmarkapp.com



-------------- next part --------------
An HTML attachment was scrubbed...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index