: <i>data loss in `lsort -stride 2 -index 0 -command...` together with "-unique"</i> plus 7 other changes
by
.
D 2024-01-19T13:41:29.808
J closedate 2460329.07048389
J closer oehhar
J icomment Dear\sAndreas,\r\n\r\nthank\syou\sfor\sthe\sticket.\sIMHO,\sTCL\sworks\scorrectly.\r\n\r\nThe\s-unique\soption\smeans,\sthat\sidentical\scomparisons\sfollowing\sthe\scriteria\sare\sonly\sincluded\sonce.\r\n\r\nThe\scomparison\sfunction\sresult\sis\sdefined\sas\sfollows:\sThe\sscript\sshould\sreturn\san\sinteger\sless\sthan,\sequal\sto,\sor\sgreater\sthan\szero\sif\sthe\sfirst\selement\sis\sto\sbe\sconsidered\sless\sthan,\sequal\sto,\sor\sgreater\sthan\sthe\ssecond,\srespectively.\s\r\n\r\nSo,\sfor\sall\svalues\swhere\sit\sreturns\s0,\sonly\sone\sis\sreturned.\r\nThis\smeans,\sthat\sall\skeys\swith\sthe\ssame\slength\sare\sonly\sreturned\sonce.\r\n\r\nTo\sfind\sthis\sset,\sI\shave\swritten\sa\ssmall\sscript:\r\n\r\n<verbatim>\r\nset\slengthlist\s{}\r\nforeach\s{Index\sValue}\s$mapL\s{\r\n\tset\slength\s[string\slength\s$Index]\r\n\tif\s{$length\sin\s$lengthlist}\s{continue}\r\n\tlappend\slengthlist\s$length\r\n\tputs\s"$Index\s$Value"\r\n}\r\n</verbatim>\r\n\r\nThe\sresult\shas\sthe\ssame\snumber\sof\sitems,\sas\syour\sscript:\r\n\r\n<verbatim>\r\nsqlite3_create_filename\sLiteCreateFilename\r\nsqlite3_column_bytes\sStatementColumnBytes\r\nsqlite3_os_init\sLiteOsInit\r\nsqlite3_sourceid\sLiteSourceid\r\nsqlite3_column_type\sStatementColumnType\r\nsqlite3_blob_open\sLiteBlobOpen\r\nsqlite3_get_clientdata\sLiteGetClientdata\r\nsqlite3_wal_checkpoint_v2\sLiteWalCheckpoint\r\nsqlite3_extended_errcode\sLiteExtendedErrcode\r\nsqlite3_stmt_readonly\sStatementReadonly\r\nsqlite3_exec\sLiteExec\r\nsqlite3_libversion\sLiteLibversion\r\nsqlite3_bind_parameter_name\sStatementBindParameterName\r\nsqlite3_set_last_insert_rowid\sLiteSetLastInsertRowid\r\nsqlite3_bind_parameter_index\sStatementBindParameterIndex\r\nsqlite3_create_window_function\sLiteCreateWindowFunction\r\nsqlite3_reset\sStatementReset\r\nsqlite3_os_end\sLiteOsEnd\r\nsqlite3_wal_autocheckpoint\sLiteWalAutocheckpoint\r\nsqlite3_sql\sStatementSql\r\nsqlite3_rtree_geometry_callback\srtree_geometry_callback\r\n</verbatim>\r\n\r\nThe\schoice\sof\sthe\sreturned\sitems\sis\snot\sthe\ssame,\sas\sthe\sorder\sof\sthe\scomparison\sexecutions\sis\snot\sthe\ssame.\r\n\r\nAm\sI\soverlooking\ssomethingn\s?\r\n\r\nThank\syou\sand\stake\scare,\r\nHarald
J login oehhar
J mimetype text/x-fossil-wiki
J resolution Works\sFor\sMe
J status Closed
J username oehhar
K e68f0907ff597bfe00cd2f89d4a93ed30903cadf
U oehhar
Z 2ec4322d2cb25d4e04a77ccc0d2b0762