<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29929</bug_id>
          
          <creation_ts>2016-10-11 10:43:58 +0000</creation_ts>
          <short_desc>map:merge: duplicates=unspecified</short_desc>
          <delta_ts>2016-12-16 19:55:37 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 3.1</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christian Gruen">christian.gruen</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>127709</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2016-10-11 10:43:58 +0000</bug_when>
    <thetext>I did not find any hint in the XQFO specification why the &quot;unspecified&quot; option was added for the &quot;duplicates&quot; option in map:merge. I did not find a similar solution for any other function, and I assume that most users of XQuery prefer to have results they can rely on, no matter which implementation they use. Would it hurt anyone to simply drop this value?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127746</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-12 08:47:10 +0000</bug_when>
    <thetext>One member of the WG persuaded his colleagues that there were many situations where the user would know that duplicates would never be encountered, and therefore didn&apos;t care how they were handled, and therefore wanted the implementation to use whatever approach would be most efficient; and that different implementation strategies might lead to a different answer to what the most efficient choice would be.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127747</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-12 08:57:38 +0000</bug_when>
    <thetext>Digging deeper into my memory of this, I think we were particularly concerned that an implementation that evaluated all the input maps in parallel should not be required to retain information about the ordering of the input maps purely in order to decide which duplicate to retain, when the user might not care.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127809</commentid>
    <comment_count>3</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2016-10-16 11:24:48 +0000</bug_when>
    <thetext>Thanks for the clarification, Michael.

Just a guess: It could be helpful for the user of this function to name the value &quot;ignore&quot; (or &quot;use-any&quot;? &quot;use-one&quot;? because &quot;unspecified&quot; hides the fact that only one value will be retained), and to add a little note that this option may improve parallelized execution in some implementations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127835</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-18 15:36:35 +0000</bug_when>
    <thetext>The WG agreed to rename the option &quot;use-any&quot; and to add a justificatory note.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127843</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-18 22:22:06 +0000</bug_when>
    <thetext>The changes have been applied and the only test case I could find has been updated.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>