<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
@font-face
        {font-family:Corbel;
        panose-1:2 11 5 3 2 2 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Comic Sans MS";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1597787794;
        mso-list-type:hybrid;
        mso-list-template-ids:163609752 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS"">All,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS"">I’m generally in favor of going with number 4.  I’ve been moving towards this way of setting up Mapfiles for the last couple of years.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS"">Now having said that, I do have what I think is a good reason to keep the old FILTER container as a SQL fragment, I have used this as a process substitution using INCLUDE blocks. 
 This seems to work sometimes inside of a DATA definition, but fails more often than it works, but having the FILTER block available for adding to the SQL has proven useful to me in the past.  If the INCLUDE functionality were somehow possible to support inside
 of a SQL (seems/sounds real messy to me though), well then . . .<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS"">Are there other, similar, capabilities that might be missed by implementing option number 4?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS"">Bobb<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Comic Sans MS""><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> mapserver-dev-bounces@lists.osgeo.org [mailto:mapserver-dev-bounces@lists.osgeo.org]
<b>On Behalf Of </b>Lime, Steve D (MNIT)<br>
<b>Sent:</b> Wednesday, September 24, 2014 8:31 AM<br>
<b>To:</b> mapserver-dev@lists.osgeo.org<br>
<b>Subject:</b> [mapserver-dev] One more decision related to 7.0/RFC 91...<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">So, when you get into implementation of an RFC you notice things. One thing that has come up is ambiguity around the way native SQL is specified. In older versions of MapServer  you’d set FILTER with a string value
 and the underlying driver would interpret that as SQL. Easy enough at first glance. RFC 91 aims to enable translation from MapServer expression syntax to native SQL plus handling FILTER merging with query operations. That’s where the ambiguity sets in – it’s
 not clear how you define native SQL, even the codebase handled it differently. <o:p>
</o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">That ticket aims talks about ways to resolve this ambiguity and you can see the full discussion here:  <a href="https://github.com/mapserver/mapserver/issues/5001">https://github.com/mapserver/mapserver/issues/5001</a>.
  Ultimately we arrived at a point where we needed to bring the discussion back to the list.
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Here’s a summary of potential options:<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoListParagraph" style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Do nothing, live with the ambiguity and resulting code complexity.<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Adopt the current OGR method of prefixing the FILTER string with “WHERE “.<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Adopt a new delimiter (e.g. <>) to explicitly define native SQL.<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">4.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Remove the ability to set native SQL altogether – FILTERs would use MapServer expression syntax only and we rely on translations.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Option 4 sounds drastic but probably gets us the most streamlined code to maintain – merging is much more straight forward. The native SQL in FILTER functionality was added long ago before more complex DATA handling
 was implemented. It’s easy to argue that since all of the drivers that support some sort of SQL do so in the DATA definition that there’s no need for native SQL FILTERs at all.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Why now? We’ll we only want to break things at major releases so…<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Steve<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="margin-left:46.25pt;border-collapse:collapse">
<thead>
<tr style="height:.2in">
<td width="504" colspan="2" valign="top" style="width:5.25in;padding:2.9pt 5.75pt 2.9pt 5.75pt;height:.2in">
<p class="MsoNormal"><b><span style="font-size:8.0pt;text-transform:uppercase;letter-spacing:.2pt">StEVE LIME 
<span style="color:#990033">| </span></span></b><span style="font-size:8.0pt;text-transform:uppercase;letter-spacing:1.0pt">DATA & Applications MANAGER</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif";text-transform:uppercase;letter-spacing:1.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:7.0pt;text-transform:uppercase;letter-spacing:1.0pt">MN.IT Services
<span style="color:#990033">@ </span>MnDNR</span><span style="font-size:7.0pt;font-family:"Corbel","sans-serif""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:1.0pt;line-height:110%"><span style="font-size:7.0pt;line-height:110%">651-259-5473 (w) 
<b>|</b>  651-297-4946 (f) <b>|</b>  </span><a href="mailto:Your.name@state.mn.us"><span style="font-size:7.0pt;line-height:110%">steve.lime@state.mn.us</span></a><span style="font-size:7.5pt;line-height:110%;font-family:"Corbel","sans-serif";color:#5C83B4;text-transform:uppercase;letter-spacing:1.0pt"><o:p></o:p></span></p>
</td>
</tr>
</thead>
<tbody>
<tr style="height:1.1pt">
<td width="118" valign="bottom" style="width:88.8pt;padding:0in 0in 0in 0in;height:1.1pt">
<p class="MsoNormal"><a href="http://www.mn.gov/oet"><i><span style="font-size:8.0pt;font-family:"Corbel","sans-serif";color:#5C83B4;letter-spacing:1.0pt;text-decoration:none"><img border="0" width="117" height="42" id="Picture_x0020_5" src="cid:image001.jpg@01CFD7DB.562B9460"></span></i></a><i><span style="font-size:8.0pt;font-family:"Corbel","sans-serif";color:#5C83B4;letter-spacing:1.0pt"><o:p></o:p></span></i></p>
</td>
<td width="386" valign="bottom" style="width:289.2pt;padding:0in 0in 0in 0in;height:1.1pt">
<p class="MsoNormal"><span style="font-size:8.0pt">Information Technology for Minnesota Government 
</span><span style="font-size:7.0pt"> <b>|</b>  </span><span style="font-size:8.0pt;letter-spacing:1.0pt"> </span><a href="http://www.mn.gov/oet"><span style="font-size:8.0pt">mn.gov/oet</span></a><span style="font-size:8.0pt;color:#5C83B4;letter-spacing:1.0pt"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
</body>
</html>