Skip to content
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

feature(types): function in support other datatypes #5011

Merged
merged 1 commit into from
Apr 23, 2022

Conversation

fkuner
Copy link
Contributor

@fkuner fkuner commented Apr 23, 2022

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

function in support datatypes

Changelog

  • New Feature

Related Issues

Fixes #4995

@vercel
Copy link

vercel bot commented Apr 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Apr 23, 2022 at 2:28AM (UTC)

@mergify
Copy link
Contributor

mergify bot commented Apr 23, 2022

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label Apr 23, 2022
@sundy-li sundy-li merged commit 2536180 into databendlabs:main Apr 23, 2022
}
TypeID::DateTime => {
scalar_contains!(i64, input_col, input_rows, columns, least_super_dt);
}
_ => {
unimplemented!()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to return error instead of the unimplemented panic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i will open a new pr to fix it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, seems some unimplemented both in the common/functions and common/datavalues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because there are some judges before and the program can't reach unimplementd. But I think return error seems better.

{
true => columns[0].field().data_type().clone(),
false => {
return Result::Err(ErrorCode::BadDataValueType("test"));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forget to change the err info and i will fix it in a new pr together.

match columns[1..]
.iter()
.map(|column| column.field().data_type().data_type_id())
.all(|t| t.is_string() || t.is_date_or_date_time())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find some bugs just now. The TypeID may be nullable. I will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-review pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Function In support other datatypes
4 participants