Add thrift annotations to SchemaTableName
*/
package com.facebook.presto.spi;
+import com.facebook.drift.annotations.ThriftConstructor;
+import com.facebook.drift.annotations.ThriftField;
+import com.facebook.drift.annotations.ThriftStruct;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -21,12 +24,14 @@ import java.util.Objects;
import static com.facebook.presto.spi.SchemaUtil.checkNotEmpty;
import static java.util.Locale.ENGLISH;
+@ThriftStruct
public class SchemaTableName
{
private final String schemaName;
private final String tableName;
@JsonCreator
+ @ThriftConstructor
public SchemaTableName(@JsonProperty("schema") String schemaName, @JsonProperty("table") String tableName)
{
this.schemaName = checkNotEmpty(schemaName, "schemaName").toLowerCase(ENGLISH);
@@ -45,12 +50,14 @@ public class SchemaTableName
}
@JsonProperty("schema")
+ @ThriftField(1)
public String getSchemaName()
{
return schemaName;
}
@JsonProperty("table")
+ @ThriftField(2)
public String getTableName()
{
return tableName;
