Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362188 - SQL - incorrect validation on get a, b, c from rs
Summary: SQL - incorrect validation on get a, b, c from rs
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Justin Spadea CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 09:09 EDT by Paul Hoffman CLA
Modified: 2017-02-23 14:17 EST (History)
5 users (show)

See Also:


Attachments
library for loading database for test program (3.53 KB, application/octet-stream)
2011-10-27 09:10 EDT, Paul Hoffman CLA
no flags Details
Test case (1.36 KB, application/octet-stream)
2011-10-27 09:11 EDT, Paul Hoffman CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Hoffman CLA 2011-10-27 09:09:56 EDT
Validation prevents get from a result set into list of primitive scalars with following validation message:

Description	Resource	Path	Location	Type
IWN.VAL.8518.e 41/8 The with clause is required when the action target is a list of expressions that map to columns of zero or multiple tables in a data base.	GetFromRSntoScalarsValidationError.egl	/test.edt.sql.test/EGLSource/sql/test/defects	line 41	EDT Problem

With get from rs, the with clause is specified on the open, not the get.

I am not sure why the check is needed even for get from ds.    It's just as easy to code an incorrect primitive into list with a with clause as without one.
Comment 1 Paul Hoffman CLA 2011-10-27 09:10:29 EDT
Created attachment 206070 [details]
library for loading database for test program
Comment 2 Paul Hoffman CLA 2011-10-27 09:11:25 EDT
Created attachment 206071 [details]
Test case
Comment 3 Justin Spadea CLA 2011-10-27 14:11:56 EDT
Tim, can you verify that what Paul says is true? This check was made based on a conversation we had a few weeks ago. The update to the spec can be seen in bug 360021 comment 14:

"For GET statements: If the targets are primitives mapping to columns and they
do not all map to a single table, then the WITH clause is required."
Comment 4 Joseph Vincens CLA 2012-03-23 11:14:07 EDT
When the from is an SQLResultSet the scalars don't need to map to a table because we don't need to create SQL, the rs already contains the data.
Comment 5 Matt Heitz CLA 2013-01-03 10:48:52 EST
Moving old fixed bugs from the RESOLVED state to CLOSED.