This commit is contained in:
John Kerl 2015-07-24 09:12:28 -04:00
parent 3881746022
commit d41120d914
3 changed files with 25 additions and 14 deletions

View file

@ -92,3 +92,22 @@ int lrec_slls_compare_lexically(
{
return -slls_lrec_compare_lexically(plist, prec, pkeys);
}
// ----------------------------------------------------------------
int lrec_keys_equal_list(
lrec_t* prec,
slls_t* plist)
{
lrece_t* pe = prec->phead;
sllse_t* pf = plist->phead;
while (TRUE) {
if (pe == NULL && pf == NULL)
return TRUE;
if (pe == NULL || pf == NULL)
return FALSE;
if (!streq(pe->value, pf->value))
return FALSE;
pe = pe->pnext;
pf = pf->pnext;
}
}

View file

@ -25,4 +25,9 @@ int lrec_slls_compare_lexically(
slls_t* pkeys,
slls_t* plist);
// xxx cmt for output writers
int lrec_keys_equal_list(
lrec_t* prec,
slls_t* plist);
#endif // MIXUTIL_H

View file

@ -9,18 +9,6 @@ TOP OF LIST
----------------------------------------------------------------
!! get rid of some unnecessary calls to slls_copy:
./containers/join_bucket_keeper.c:
slls_t* pnext_field_values = mlr_selected_values_from_record(pkeeper->prec_peek,
pkeeper->pleft_field_names);
int cmp = slls_compare_lexically(pkeeper->pbucket->pleft_field_values, pnext_field_values);
int slls_lrec_compare_lexically(
slls_t* plist,
lrec_t* prec,
slls_t* pkeys)
{
}
./output/lrec_writer_pprint.c:
// xxx make a fcn which does the cmp of lrec & slls w/o the copy
pcurr_keys = mlr_keys_from_record(prec);
@ -45,8 +33,7 @@ TOP OF LIST
of one format??
!! join
-> cmp w/o slls method; & propagate throughout miller
-> xxx cleanup
-> cleanup of xxx cmts
-> left/right-prefix UTs
-> het UTs
-> mixed-format/separator UT cases