Skip to content

Commit

Permalink
Clean up commented-out code
Browse files Browse the repository at this point in the history
  • Loading branch information
stevelowenthal committed Feb 28, 2016
1 parent df9ef44 commit 46982f7
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions kernel/src/main/scala/com/ibm/spark/magic/builtin/CqlHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,6 @@ object CqlHelper {
def escape = xml.Utility.escape(s)
}

// implicit class GettableAsString[RowOrUDT <: GettableByNameData](row: RowOrUDT) {
// def getAsString(colName: String, colType: DataType): String = {
// colType.getName match {
// case ASCII => row.getString(colName)
// case BIGINT => row.getLong(colName)
// case BLOB => row.getString(colName)
// case BOOLEAN => row.getBool(colName)
// case COUNTER => row.getLong(colName)
// case CUSTOM => row.getString(colName)
// case DECIMAL => row.getDecimal(colName)
// case DOUBLE => row.getDouble(colName)
// case FLOAT => row.getFloat(colName)
// case INET => row.getInet(colName)
// case INT => row.getInt(colName)
// case TEXT => row.getString(colName)
// case TIMESTAMP => df.format(row.getDate(colName))
// case TIMEUUID => row.getUUID(colName)
// case TUPLE => row.getTupleValue(colName)
// case UUID => row.getUUID(colName)
// case VARCHAR => row.getString(colName)
// case VARINT => row.getVarint(colName)
// case LIST => row.getList(colName, colType.getTypeArguments.get(0).asJavaClass())
// case MAP => row.getMap(colName, colType.getTypeArguments.get(0).asJavaClass, colType.getTypeArguments.get(1).asJavaClass)
// case SET => row.getSet(colName, colType.getTypeArguments.get(0).asJavaClass)
// case UDT => val v = row.getUDTValue(colName); "{" + v.getType.getFieldNames.map(n => n + ":" + v.getAsString(n, v.getType.getFieldType(n))).mkString(", ") + "}"
// }
// }.toString
// }

implicit class RowHelper(row: com.datastax.driver.core.Row) {
def getStringForCol(colDef: com.datastax.driver.core.ColumnDefinitions.Definition): String = {
val colName = colDef.getName
Expand Down

0 comments on commit 46982f7

Please sign in to comment.