Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#210 closed enhancement (fixed)

from clause in rasql select statements should be optional

Reported by: dmisev Owned by: vliaukevich
Priority: major Milestone: 9.0.x
Component: qlparser Version: 8.3
Keywords: Cc: pbaumann, j.bachhuber@…
Complexity: Medium

Description

.. or at least it would be nice, for queries where the result doesn't depend on any data in the database, e.g. simple tests like

select 0.1 + 0.2

or even selects on external files, e.g.

rasql -q 'select inv_png($1) * 5 + 10' -f file.png

Change History (9)

comment:1 Changed 5 years ago by pbaumann

  • Milestone set to Future

comment:2 Changed 3 years ago by dmisev

  • Cc j.bachhuber@… added
  • Complexity set to Medium
  • Milestone changed from Future to 9.0.x
  • Owner set to vliaukevich
  • Priority changed from minor to major
  • Status changed from new to assigned

This becomes necessary for the implementation of array SQL, so rising priority.

I've already done it for the "select version()", it should not be too hard to generalize it.

comment:3 Changed 3 years ago by dmisev

Patch(es) submitted by Veranika, I checked and it's all good. The solution with the QtEmptyStream is very elegant.

Originally the 'selects on external files' ticket is #53

comment:4 Changed 3 years ago by vliaukevich

Okay, in this case I can resend this patch with the ticket:53 mark on it as that ticket is more relevant, and someone needs to reject the current patch.

comment:5 Changed 3 years ago by dmisev

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:6 Changed 3 years ago by dmisev

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening, a query like

rasql -q 'SELECT marray x in [1:2, -1:0] values x[0] + x[1]' --out string

seems to segfault.

comment:7 Changed 3 years ago by dmisev

Stacktrace:

[bt]: (1) /lib/x86_64-linux-gnu/libc.so.6 (??:0) - +0x35250 [0x7fe2e8998250]
[bt]: (2) /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (??:0) - std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)+0x8 [0x7fe2e92e3e28]
[bt]: (3) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (qtdata.icc:41) - QtData::getIteratorName() const+0x27 [0x5dd3f7]
[bt]: (4) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (qtvariable.cc:213) - QtVariable::evaluate(std::vector<QtData*, std::allocator<QtData*> >*)+0xba [0x5dc17c]
[bt]: (5) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (qtdomainoperation.cc:740) - QtDomainOperation::evaluate(std::vector<QtData*, std::allocator<QtData*> >*)+0x11ed [0x5e5b27]
[bt]: (6) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (qtbinaryoperation.cc:220) - QtBinaryOperation::getOperands(std::vector<QtData*, std::allocator<QtData*> >*, QtData*&, QtData*&)+0x50 [0x61f616]
[bt]: (7) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (qtbinaryinduce.cc:427) - QtBinaryInduce::evaluate(std::vector<QtData*, std::allocator<QtData*> >*)+0x53 [0x5ccb97]
[bt]: (8) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (algebraops.cc:76) - QLMarrayOp::operator()(char*, r_Point const&)+0x7f [0x6a996b]
[bt]: (9) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (tile.cc:491) - Tile::execMarrayOp(MarrayOp*, r_Minterval const&, r_Minterval const&)+0x27e [0x685a8a]
[bt]: (10) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (qtmarrayop.cc:202) - QtMarrayOp::evaluate(std::vector<QtData*, std::allocator<QtData*> >*)+0x2dd [0x600b35]
[bt]: (11) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (qtoperationiterator.cc:230) - QtOperationIterator::next()+0x199 [0x5c92ef]
[bt]: (12) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (querytree.cc:167) - QueryTree::evaluateRetrieval()+0x530 [0x608584]
[bt]: (13) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (servercomm2.cc:1597) - ServerComm::executeQuery(unsigned long, char const*, ExecuteQueryRes&)+0x2fb [0x57ba0d]
[bt]: (14) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (rasserver_entry.cc:276) - RasServerEntry::compat_executeQueryRpc(char const*, ExecuteQueryRes&)+0x54 [0x5707e6]
[bt]: (15) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (rnpservercomm.cc:601) - RnpRasDaManComm::executeQueryRpc()+0x68 [0x58e9b4]
[bt]: (16) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (rnpservercomm.cc:285) - RnpRasDaManComm::decodeFragment()+0x149 [0x58e095]
[bt]: (17) /home/dimitar/projects/rasdaman/community/install/bin/rasserver (rnpservercomm.cc:132) - RnpRasDaManComm::processRequest(akg::CommBuffer*, akg::CommBuffer*, rnp::RnpTransport::CarrierProtocol, rnp::RnpServerJob*)+0x181 [0x58dbaf]
...

comment:8 Changed 3 years ago by vliaukevich

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:9 Changed 3 years ago by dmisev

Note: See TracTickets for help on using tickets.