-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
add method 'toChar[class java.lang.Object]' in class class org.apach… #3752
base: main
Are you sure you want to change the base?
add method 'toChar[class java.lang.Object]' in class class org.apach… #3752
Conversation
….calcite.runtime.SqlFunctions
Can you also provide a test which fails in the absence of this function? |
@mihaibudiu |
No, not unit tests. An end-to-end test is more valuable. Like something with your dummy connector. |
OK, I probably can extract a simple snippet in order to reproduce the issue. But how should I send it to you ? |
Do write a junit test, but not a unit test for toChar. |
If you can post here a failing snippet I can perhaps try to look around the codebase to see where similar stuff is tested. |
I added a snippet. In order to reproduce the original issue:
The bug is triggered in:
If you uncomment the |
Sorry, busy with many reviews for the 1.37 release, didn't have time to properly look at this. |
Hello @mihaibudiu |
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.
I have tried to create a smaller reproduction and I failed.
I guess we could accept this change without a test...
Or a very involved one, like the one you wrote.
I am inclined to suggest for you to just submit a PR with the new toChar function.
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions. |
When I was working on a dummy Apache Connector (in order to understand how to use this framework),
I encountered this error:
So I added the required method:
org.apache.calcite.runtime.SqlFunctions.toChar(java.lang.Object)
For information, there are already many similar methods for other primitive types (int, bool ...).
So the new
toChar(Object)
method is similar to those other primitive methods