You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhance Interval arithmetic to support String type. #7098
Is your feature request related to a problem or challenge?
Currently DataFusion does not support Interval arithmetic on string type, and the stats analyze process will be failed during CBO stats estimation process.
I think maybe we can normalize the string intervals to numeric intervals first and leverage the numeric intervals to estimate the selectivity.
Sounds good. However, I'm not entirely sure about the correctness of the weight calculation. Shouldn't the weight of the leading characters be higher (assuming the order of the strings is as in the dictionary)? Once the strings are accurately mapped to floats, I believe there wouldn't be any problem with calculating selectivity as you've proposed.
Sounds good. However, I'm not entirely sure about the correctness of the weight calculation. Shouldn't the weight of the leading characters be higher (assuming the order of the strings is as in the dictionary)? Once the strings are accurately mapped to floats, I believe there wouldn't be any problem with calculating selectivity as you've proposed.
Yes, you are right. The weigh is calculated based on the position of the char.
This version seems correct to calculate weights. I don't think there will be any problems and it would improve the interval arithmetic and statistics calculations. Thanks
Activity
mingmwang commentedon Jul 26, 2023
@berkaysynnada @ozankabak
Please share your thoughts on this.
mingmwang commentedon Jul 26, 2023
berkaysynnada commentedon Jul 26, 2023
Sounds good. However, I'm not entirely sure about the correctness of the weight calculation. Shouldn't the weight of the leading characters be higher (assuming the order of the strings is as in the dictionary)? Once the strings are accurately mapped to floats, I believe there wouldn't be any problem with calculating selectivity as you've proposed.
mingmwang commentedon Jul 26, 2023
This will output:
mingmwang commentedon Jul 26, 2023
Yes, you are right. The
weighis calculated based on the position of the char.berkaysynnada commentedon Jul 26, 2023
This version seems correct to calculate weights. I don't think there will be any problems and it would improve the interval arithmetic and statistics calculations. Thanks
alamb commentedon Oct 20, 2023
Started #7882 to collect improvement to interval arithmetic