-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Expand push_back for arrayWriter support to generics and strings. #8334
Conversation
✅ Deploy Preview for meta-velox canceled.
|
This pull request was exported from Phabricator. Differential Revision: D52672124 |
…cebookincubator#8334) Summary: This simply functions alot in two ways: - one common pattern in functions is ``` if (inputArray[i].has_value()) { auto& newItem = out.add_item(); newItem.copy_from(inputArray[i].value()); } else { out.add_null(); } ```` now can be done in one line out.push_back(item); - since primitive and generic with this have same interface many duplicate of functions wont be needed. (See examples in the diff). Differential Revision: D52672124
5afaa5b
to
699454e
Compare
This pull request was exported from Phabricator. Differential Revision: D52672124 |
699454e
to
3f58877
Compare
This pull request was exported from Phabricator. Differential Revision: D52672124 |
…cebookincubator#8334) Summary: This simply functions alot in two ways: 1. one common pattern in functions is ``` if (inputArray[i].has_value()) { auto& newItem = out.add_item(); newItem.copy_from(inputArray[i].value()); } else { out.add_null(); } ```` now can be done in one line out.push_back(inputArray[i]); 2. since primitive and generic with this have same interface many duplicate of functions wont be needed. Differential Revision: D52672124
3f58877
to
896ff37
Compare
This pull request was exported from Phabricator. Differential Revision: D52672124 |
…cebookincubator#8334) Summary: This simply functions alot in two ways: 1. one common pattern in functions is ``` if (inputArray[i].has_value()) { auto& newItem = out.add_item(); newItem.copy_from(inputArray[i].value()); } else { out.add_null(); } ```` now can be done in one line out.push_back(inputArray[i]); 2. since primitive and generic with this have same interface many duplicate of functions wont be needed. Differential Revision: D52672124
896ff37
to
3d9b736
Compare
This pull request was exported from Phabricator. Differential Revision: D52672124 |
…cebookincubator#8334) Summary: This simplify functions in two ways: 1. one common pattern in functions is ``` if (inputArray[i].has_value()) { auto& newItem = out.add_item(); newItem.copy_from(inputArray[i].value()); } else { out.add_null(); } ```` now can be done in one line out.push_back(inputArray[i]); 2. since primitive and generic with this have same interface many duplicate of functions wont be needed. Differential Revision: D52672124
…cebookincubator#8334) Summary: This simplify functions in two ways: 1. one common pattern in functions is ``` if (inputArray[i].has_value()) { auto& newItem = out.add_item(); newItem.copy_from(inputArray[i].value()); } else { out.add_null(); } ```` now can be done in one line out.push_back(inputArray[i]); 2. since primitive and generic with this have same interface many duplicate of functions wont be needed. Differential Revision: D52672124
This pull request has been merged in 5e38168. |
…cebookincubator#8334) Summary: Pull Request resolved: facebookincubator#8334 This simplify functions in two ways: - one common pattern in functions is ``` if (inputArray[i].has_value()) { auto& newItem = out.add_item(); newItem.copy_from(inputArray[i].value()); } else { out.add_null(); } ```` now can be done in one line out.push_back(inputArray[i]);. - since primitive and generic with this have same interface many duplicate of functions body wont be needed. Reviewed By: amitkdutta Differential Revision: D52672124 fbshipit-source-id: 1397461b59a82d7aec99d762e6f1c955191df55a
…cebookincubator#8334) Summary: Pull Request resolved: facebookincubator#8334 This simplify functions in two ways: - one common pattern in functions is ``` if (inputArray[i].has_value()) { auto& newItem = out.add_item(); newItem.copy_from(inputArray[i].value()); } else { out.add_null(); } ```` now can be done in one line out.push_back(inputArray[i]);. - since primitive and generic with this have same interface many duplicate of functions body wont be needed. Reviewed By: amitkdutta Differential Revision: D52672124 fbshipit-source-id: 1397461b59a82d7aec99d762e6f1c955191df55a
Summary:
This simplify functions in two ways:
now can be done in one line
out.push_back(inputArray[i]);
Differential Revision: D52672124