से बिगइंटर गुण प्राप्त करें मैं कैसंड्रा कॉलम परिवार में महत्वपूर्ण मूल्य जोड़े की संख्या प्राप्त करने का प्रयास कर रहा हूं। मेरे द्वारा उपयोग किया जाने वाला कोड निम्नलिखित है।कैसंड्रा परिणामसेट
PreparedStatement statement = client.session
.prepare("select count(*) from corpus.word_usage");
ResultSet results = client.session.execute(statement.bind());
Row row = results.one();
System.out.println(row.getVarint(0));
लेकिन जब मैं इस कोड को चलाता हूं, तो मुझे निम्नलिखित अपवाद मिल रहा है।
Exception in thread "main" com.datastax.driver.core.exceptions.InvalidTypeException: Column count is of type bigint
at com.datastax.driver.core.ColumnDefinitions.checkType(ColumnDefinitions.java:291)
at com.datastax.driver.core.ArrayBackedRow.getVarint(ArrayBackedRow.java:185)
at SimpleClient.main(SimpleClient.java:57)
datastax प्रलेखन के अनुसार (http://www.datastax.com/drivers/java/2.0/com/datastax/driver/core/Row.html) getVarint एक BigInteger लौटना चाहिए। तो मुझे यहां अपवाद क्यों मिल रहा है? मैं क्या गलत कर रहा हूँ?
हाँ यह मेरे लिए भी काम करता है, धन्यवाद। –