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

[feldera] first commit: add preliminary support #1

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

abhizer
Copy link
Collaborator

@abhizer abhizer commented Oct 23, 2024

No description provided.

@abhizer abhizer self-assigned this Oct 23, 2024
* also use the blackbox method for non optimizing query in NoREC

Signed-off-by: Abhinav Gyawali <[email protected]>
src/sqlancer/feldera/FelderaGlobalState.java Show resolved Hide resolved
implements FelderaExpression {

public enum FelderaUnaryPostfixOperator implements BinaryOperatorNode.Operator {
IS_NULL("IS NULL"), IS_NOT_NULL("IS NOT NULL"), IS_FALSE("IS FALSE"), IS_NOT_TRUE("IS NOT TRUE"),

Choose a reason for hiding this comment

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

In general this doesn't adhere to our java style guidelines (which are unspecified).
But for enums I think these should really be one per line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it is the mvn formatter that puts them all together in one line.

return expr;
}

public String getStringRepresentation() {

Choose a reason for hiding this comment

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

Frankly I think that CAST(e AS type) is more robust.
This syntax is Postgres specific.
But who knows, maybe it will just work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I found that this works, and is easier to read. But we can switch to CAST(e AS type) if you want.

src/sqlancer/feldera/FelderaProvider.java Show resolved Hide resolved
import java.util.Map;
import java.util.Objects;

public class FelderaClient {

Choose a reason for hiding this comment

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

this file may be useful as an alternative SDK for interacting with Feldera, in addition to the Python one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, but this no where as close to being as good as the python one. It might be worth investing some time to improve this.

src/sqlancer/feldera/gen/FelderaCommon.java Show resolved Hide resolved
}

private FelderaExpression generateStringExpression(int depth) {
// TODO

Choose a reason for hiding this comment

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

in general any of these can have a call to a function with a suitable return type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this is a todo.

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.

2 participants