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

"null" value support #34

Open
wangli1426 opened this issue May 26, 2014 · 0 comments
Open

"null" value support #34

wangli1426 opened this issue May 26, 2014 · 0 comments

Comments

@wangli1426
Copy link
Contributor

@fzhedu: Before supporting left/right join, we should first support "null" value.

There are typically two methods to support null in a database system:

  1. Assign one value as null for each data type. For instance, we can represent null in unsigned long as the maximum value. This method simplifies the implementation, but the value representing null cannot be used as a normal value.
  2. Use specific bit to mask whether a value is null.

In our system, as all tuples within a table share one schema, there is no additional schema information for each tuple. Consequently, supporting null value under the second method will need a complete rewrite of Claims and violent the design philosophy of data reorganization in Claims. For implementation simplicity and the performance concern, I believe we should take the first method.

@scdong: Could you please handle this enhancement.

To support null, I think we should

  • add a boolean in data_type to represent whether the type is nullable or not.
  • support setNull(), isNull() in operate class.
  • Also toValue() should prints "NULL" when the data type is nullable and the value to print represents "null".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants