Opened 12 years ago

Closed 11 years ago

Last modified 10 years ago

#210 closed enhancement (fixed)

from clause in rasql select statements should be optional

Reported by: Dimitar Misev Owned by: Veranika Liaukevich
Priority: major Milestone: 9.0.x
Component: qlparser Version: 8.3
Keywords: Cc: Peter Baumann, 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 by Peter Baumann, 12 years ago

Milestone: Future

comment:2 by Dimitar Misev, 11 years ago

Cc: j.bachhuber@… added
Complexity: Medium
Milestone: Future9.0.x
Owner: set to Veranika Liaukevich
Priority: minormajor
Status: newassigned

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 by Dimitar Misev, 11 years ago

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 by Veranika Liaukevich, 11 years ago

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 by Dimitar Misev, 11 years ago

Resolution: fixed
Status: assignedclosed

comment:6 by Dimitar Misev, 11 years ago

Resolution: fixed
Status: closedreopened

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 by Dimitar Misev, 11 years ago

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 by Veranika Liaukevich, 11 years ago

Resolution: fixed
Status: reopenedclosed

comment:9 by Dimitar Misev, 10 years ago

Note: See TracTickets for help on using tickets.