frankgh commented on code in PR #45: URL: https://github.com/apache/cassandra-analytics/pull/45#discussion_r1546825765
########## cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/CassandraBulkWriterContext.java: ########## @@ -92,11 +92,17 @@ protected CassandraBulkWriterContext(@NotNull BulkSparkConf conf, Set<String> udts = CqlUtils.extractUdts(keyspaceSchema, keyspace); ReplicationFactor replicationFactor = CqlUtils.extractReplicationFactor(keyspaceSchema, keyspace); int indexCount = CqlUtils.extractIndexCount(keyspaceSchema, keyspace, table); - CqlTable cqlTable = bridge.buildSchema(createTableSchema, keyspace, replicationFactor, partitioner, udts, null, indexCount); + CqlTable cqlTable = bridge().buildSchema(createTableSchema, keyspace, replicationFactor, partitioner, udts, null, indexCount); TableInfoProvider tableInfoProvider = new CqlTableInfoProvider(createTableSchema, cqlTable); TableSchema tableSchema = initializeTableSchema(conf, dfSchema, tableInfoProvider, lowestCassandraVersion); - schemaInfo = new CassandraSchemaInfo(tableSchema); + schemaInfo = new CassandraSchemaInfo(tableSchema, udts, cqlTable); + } + + @Override + public CassandraBridge bridge() + { + return this.bridge; Review Comment: if this is serialized to executors, and it's declared as transient, we'll need to initialize it for the executors at some point. I suggest we add a field called `private final String lowestCassandraVersion;` and we initialize it in the constructor (line 72). I think at the executor level we'll see NPEs for the bridge -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org