Fix projection string formatting in bin/canonicalize_bgp.pl.
Gregory Todd Williams
9 years ago
54 | 54 | |
55 | 55 | my ($canon, $mapping) = $bgp->canonical_bgp_with_mapping(); |
56 | 56 | my $hash = sha1_hex( join("\n", map { $_->tuples_string } (@{$canon->triples}) ) ); |
57 | my @proj = sort map { sprintf("(?v_%03d AS $_)", $mapping->{$_}{id}) } grep { $mapping->{$_}{type} eq 'variable' } (keys %$mapping); | |
57 | my @proj = sort map { sprintf("(?%s AS $_)", $mapping->{$_}{id}) } grep { $mapping->{$_}{type} eq 'variable' } (keys %$mapping); | |
58 | 58 | say "# Hash key: $hash"; |
59 | 59 | say "SELECT " . join(' ', @proj) . " WHERE {"; |
60 | 60 | foreach my $t (@{$canon->triples}) { |