On Thursday 08 April 2010 23:41:20 K. John Wu wrote:
> Hi, Andreas,

Hi John,

> Thanks for bring up this issue.  Our intent is to support queries on
> in-memory data tables.  Obviously, we have not done enough testing on
> this feature.  I will look into adding a bit more testing for this
> case.  Please let us know if you have something simple that we can
> test with.

I have attached a (hopefully) simple testcase.

BTW: I tried to install the latest fastbit snapshot (wanted to verify that it 
is still broken in the latest version - currently working with scm-2010-03-03) 
and got a compile error:

column.cpp:4667: error: no matching function for call to 
‘std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>::swap(std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>)’
/usr/include/c++/4.4/bits/basic_string.tcc:496: note: candidates are: void 
std::basic_string<_CharT, _Traits, _Alloc>::swap(std::basic_string<_CharT, 
_Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, 
_Alloc = std::allocator<char>]

Lines 4601 and 4634 seem to contain the same error.

Let me know if you need more details.

Kind regards,

        Andreas Streichardt

Attachment: data.tar.gz
Description: application/compressed-tar

#include <ibis.h>
#include <iostream>

using namespace ibis;

void print_table_info(table *tab)
{
  std::cout << "Resultset: " << tab->nColumns() << "x" << tab->nRows() << std::endl;
}

int main()
{
  part  *partition=0;
  table *tab=0;
  table *in_memory_select=0;
  table *select_on_select=0;

  try
  {
    partition=new part("/tmp/test");
    if (!partition)
    {
      std::cout << "Couldn't create partition" << std::endl;
      goto cleanup;
    }

    tab=table::create(*partition);
    if (!tab)
    {
      std::cout << "Couldn't create tab" << std::endl;
      goto cleanup;
    }

    print_table_info(tab);
    in_memory_select=tab->select("uid,m_0000","1=1");

    if (!in_memory_select)
    {
      std::cout << "Couldn't create in memory select" << std::endl;
      goto cleanup;
    }
    
    print_table_info(in_memory_select);
    select_on_select=in_memory_select->select("uid","1=1");

    if (!select_on_select)
      std::cout << "Failure!" << std::endl;
    else
      print_table_info(select_on_select);
  }
  catch (const std::exception& e)
  {
    std::cout << "Got an exception: " << e.what() << std::cout;
  }
  catch (char *s)
  {
    std::cout << "Got a string exception: " << s << std::endl;
  }
  
  cleanup:
    if (select_on_select)
      delete select_on_select;
    if (in_memory_select)
      delete in_memory_select;
    if (tab)
      delete tab;
    if (partition)
      delete partition;
}
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to