We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The current schema doesn't show if the field is non-nullable
>>> ibis.schema([ ... ('foo', 'int64'), ... ('bar', ibis.expr.datatypes.int64(nullable=False)), ... ('baz', 'boolean*') ... ]) ibis.Schema { foo int64 bar int64 baz boolean }
Desired behavior:
The output should show if the type is non-nullable, eg:
ibis.Schema { foo int64 bar int64[non-nullable] baz boolean }
The text was updated successfully, but these errors were encountered:
suggestion: change DataType.__str__ method:
DataType.__str__
diff --git a/ibis/expr/datatypes.py b/ibis/expr/datatypes.py index 9f469fb9..ec9998c9 100644 --- a/ibis/expr/datatypes.py +++ b/ibis/expr/datatypes.py @@ -83,7 +83,10 @@ class DataType: ) def __str__(self) -> str: - return self.name.lower() + return '{}{}'.format( + self.name.lower(), + '[non-nullable]' if not self.nullable else '' + ) @property def name(self) -> str:
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
The current schema doesn't show if the field is non-nullable
Desired behavior:
The output should show if the type is non-nullable, eg:
The text was updated successfully, but these errors were encountered: