Skip to content

Instantly share code, notes, and snippets.

@abhilater
Created June 1, 2019 17:44
Show Gist options
  • Save abhilater/ec59aeb07a0b2caa7b5209898a066270 to your computer and use it in GitHub Desktop.
Save abhilater/ec59aeb07a0b2caa7b5209898a066270 to your computer and use it in GitHub Desktop.
/**
* WHY SQL?
**/
"SELECT * FROM foo WHERE bar > 30"
"versus"
HTable t = new HTable("foo");
RegionScanner s = t.getScanner(new Scan(..,
new ValueFilter(CompareOp.GT,
new CustomTypedComparator(30)),..));
while((Result result = s.next())!= null) {
// blah blah blah Java Java Java
}
s.close();
t.close(); // And we didn't even include exception handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment