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

IllegalArgumentException: Unexpected number of columns: expected 2 or 1, returned 1 #71

Open
gypsysunny opened this issue Jan 15, 2018 · 1 comment

Comments

@gypsysunny
Copy link

def map(data: HBaseData): T =
if(data.size==n)
tupleMap(data)
else if(data.size==n+1)
tupleMap(data.drop(1))
else
throw new IllegalArgumentException(s"Unexpected number of columns: expected $n or ${n-1}, returned ${data.size}")

i've got such an exception. what are the typical scenarios for this exception?
thanks a lot.

@nicolaferraro
Copy link
Contributor

It's for ensuring that you invoke the API in the correct way. If you select 2 columns, you need to specify 2 type parameters on the data shape, or 3 if you want the rowkey too. See the examples in the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants