This is how the table was created:

transactions = parts.map(lambda p: Row(customer_id=long(p[0]),
chain=int(p[1]), dept=int(p[2]), category=int(p[3]), company=int(p[4]),
brand=int(p[5]), date=str(p[6]), productsize=float(p[7]),
productmeasure=str(p[8]), purchasequantity=int(p[9]),
purchaseamount=float(p[10])))

# Infer the schema, and register the Schema RDD as a table
schemaTransactions = sqlContext.inferSchema(transactions)
schemaTransactions.registerTempTable("transactions")
sqlContext.cacheTable("transactions")

t = sqlContext.sql("SELECT * FROM transactions WHERE purchaseamount >= 50")
t.count()


Thank you,
poiuytrez



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Spark-SQL-Exception-only-when-using-cacheTable-tp16031p16262.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to