-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
output: Add support for WEIGHT_FLOAT32
with text vector
#1448
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move tests to test/command/suite/select/columns/flags/vector/
because they are tests for WITH_WEIGHT
and WEIGHT_FLOAT32
flags with COLUMN_VECTOR
flag?
lib/output.c
Outdated
&_value, &weight, &domain); | ||
if (is_weight_float32) { | ||
length = grn_vector_get_element_float(ctx, vector, i, | ||
&_value, &weight_float, &domain); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&_value, &weight_float, &domain); | |
&_value, &weight_float, &domain); |
Thanks, I have addressed your comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you want to include cast
in test path? Is cast
important for this? Can we reproduce this with --columns[text_tags].type Tags
? If so, we should use it. We can add a test for --columns[text_tags].type ShortText
in a separated pull request.
How about
test/command/suite/select/columns/flags/vector/with_weight_weight_float32.test
test/command/suite/select/columns/flags/vector/with_weight.test
?
I tried it but didn't reproduce this.
Do you know why Groonga passes |
Because reference vector uses |
Then, how about the following?
|
Thanks.
|
WEIGHT_FLOAT32
when data type is vectorWEIGHT_FLOAT32
when data type is vector
Please re-review this. |
WEIGHT_FLOAT32
when data type is vectorWEIGHT_FLOAT32
with text vector
Could you update the description before we merge this? |
Oh, sorry, updated. |
Groonga regarded
weight
asuint32_t
even if its actual type isfloat32
ingrn_output_vector
.So even if we specified
WEIGHT_FLOAT32
like the query below, the output weight was notfloat32
butuint32_t
.How to reproduce:
In the query above,
is not expected, the expected result is like below.