Skip to content

Commit

Permalink
fixing volt column selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Stevenson committed Sep 12, 2016
1 parent ebb8133 commit 2f0bd3b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ allprojects {

task compile(dependsOn: 'compileScala')

task fatJar(dependsOn: [test, shadowJar])

task collectJars(type: Copy){
into "${buildDir}/libs-dependencies"
from configurations.runtime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ object ReThinkSinkConverter extends StrictLogging {
fields.map(f => buildField(rethink, f, nested, mo))
hm.`with`(field.name, mo)
case Type.BYTES => {
logger.warn(s"Discarding binary field ${field.name()}")
hm
val str = new String(struct.getBytes(field.name()), "utf-8")
hm.`with`(field.name(), str)
}
case _ => hm.`with`(field.name(), struct.get(field.name()))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ object VoltDbMetadataReader extends StrictLogging {
val row = vt.fetchRow(i)
(row.getString("TABLE_NAME") ->
(row.getString("COLUMN_NAME") -> row.get("ORDINAL_POSITION", VoltType.INTEGER).asInstanceOf[Int]))
})
}).filter( {case (k,v) => k.equals(tableName)})

}.flatMap( t => t.map(s => s._2))
.sortBy(_._2)
.map(_._1)
Expand Down

0 comments on commit 2f0bd3b

Please sign in to comment.