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

Bigtable - Condition filter doesn't return rows unless "fail" condition is set #1458

Closed
imathews opened this issue Jul 30, 2016 · 3 comments
Closed
Assignees
Labels
api: bigtable Issues related to the Bigtable API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@imathews
Copy link

As I understand from the API docs, the fail attribute of a condition filter should be optional, effectively being the same as providing [{ all: false }]. However, if I don't provide the fail attribute, I get zero rows back; the condition filter behaves as I'd expect with fail explicitly set to [{ all: false }]

Environment details

OSX @10.11.4
node @6.2.0
npm @3.8.9
gcloud-node @0.37.0

Steps to reproduce

filter = [{
    condition: {
        test: [
            {
                "column": "SEX",
                "value": "F"
            }
        ],
        pass: [{
            all: true
        }],

        // Returns zero rows unless these lines are uncommented

        // fail: [
        //  {
        //      all: false
        //  }
        // ]
    }
}]

table.getRows({
        filter,
        limit: 100,
}).on('data', (row) => {
    // Do things
});
@callmehiphop callmehiphop added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: bigtable Issues related to the Bigtable API. labels Jul 31, 2016
@callmehiphop callmehiphop self-assigned this Jul 31, 2016
@callmehiphop
Copy link
Contributor

@imathews Thanks for reporting! I've opened a PR to remedy this (#1459). Would you mind giving it a look through to ensure it resolves your issue?

@imathews
Copy link
Author

imathews commented Aug 1, 2016

@callmehiphop thanks for the quick fix! PR #1459 seems to solve the issue

@stephenplusplus
Copy link
Contributor

The fix was merged in via aa4bf39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants