Skip to content

[CALCITE-6549] Add LOG1P function (enabled in Spark library)#3934

Closed
caicancai wants to merge 1 commit intoapache:mainfrom
caicancai:6549
Closed

[CALCITE-6549] Add LOG1P function (enabled in Spark library)#3934
caicancai wants to merge 1 commit intoapache:mainfrom
caicancai:6549

Conversation

@caicancai
Copy link
Member

@caicancai caicancai commented Aug 27, 2024

@sonarqubecloud
Copy link

@caicancai
Copy link
Member Author

@NobiGo PTAL, thanks

@@ -4292,18 +4294,27 @@ private static List<Expression> args(RexCall call,
operand0 = operands.left;
operand1 = operands.right;
boolean nonPositiveIsNull = library == SqlLibrary.MYSQL ? true : false;
Copy link
Contributor

Choose a reason for hiding this comment

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

We should pass the library as the Parameter. Then the code logic will be clear. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should refactor the code in another issue. The current code here has poor extensibilit.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I have to admit this. https://issues.apache.org/jira/browse/CALCITE-6550 is already working on this. I'll close it first.

Copy link
Member Author

Choose a reason for hiding this comment

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

@NobiGo Could you please post your opinion at https://issues.apache.org/jira/browse/CALCITE-6550? I think it is a very complicated issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you should pass in a library at run time. The runtime should not be worrying about high-level concepts like llibrary.

@caicancai caicancai closed this Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants