Any attempts to interact with the schema will throw an exception.
For example the historical map data type uses this as follows:
Map<ByteString,List<Struct>>historicalMap=resultSet.getMap("cf",SqlType.mapOf(SqlType.bytes(),SqlType.arrayOf(SqlType.struct())));Structstruct=historicalMap.get("column").get(0);// Struct schema will be validated here so there's no need for users to pass the schema to getMap aboveByteStringvalue=struct.getBytes("value");
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-18 UTC."],[],[],null,["# Class Type.SchemalessStruct (2.65.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.65.0 (latest)](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.63.0](/java/docs/reference/google-cloud-bigtable/2.63.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.62.0](/java/docs/reference/google-cloud-bigtable/2.62.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.61.0](/java/docs/reference/google-cloud-bigtable/2.61.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.60.0](/java/docs/reference/google-cloud-bigtable/2.60.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.59.0](/java/docs/reference/google-cloud-bigtable/2.59.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.58.2](/java/docs/reference/google-cloud-bigtable/2.58.2/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.56.0](/java/docs/reference/google-cloud-bigtable/2.56.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.54.0](/java/docs/reference/google-cloud-bigtable/2.54.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.52.0](/java/docs/reference/google-cloud-bigtable/2.52.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.51.2](/java/docs/reference/google-cloud-bigtable/2.51.2/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.49.0](/java/docs/reference/google-cloud-bigtable/2.49.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.46.0](/java/docs/reference/google-cloud-bigtable/2.46.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.45.1](/java/docs/reference/google-cloud-bigtable/2.45.1/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.44.1](/java/docs/reference/google-cloud-bigtable/2.44.1/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.43.0](/java/docs/reference/google-cloud-bigtable/2.43.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.42.0](/java/docs/reference/google-cloud-bigtable/2.42.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.40.0](/java/docs/reference/google-cloud-bigtable/2.40.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.39.5](/java/docs/reference/google-cloud-bigtable/2.39.5/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.37.0](/java/docs/reference/google-cloud-bigtable/2.37.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.35.1](/java/docs/reference/google-cloud-bigtable/2.35.1/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.34.0](/java/docs/reference/google-cloud-bigtable/2.34.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.33.0](/java/docs/reference/google-cloud-bigtable/2.33.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.32.0](/java/docs/reference/google-cloud-bigtable/2.32.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.31.0](/java/docs/reference/google-cloud-bigtable/2.31.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.30.0](/java/docs/reference/google-cloud-bigtable/2.30.0/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.29.1](/java/docs/reference/google-cloud-bigtable/2.29.1/com.google.cloud.bigtable.common.Type.SchemalessStruct)\n- [2.28.0](/java/docs/reference/google-cloud-bigtable/2.28.0/com.google.cloud.bigtable.common.Type.SchemalessStruct) \n\n public abstract static class Type.SchemalessStruct implements Type, SqlType.Struct\n\nThis is a special version of struct that is intended to only be used in the [com.google.cloud.bigtable.data.v2.models.sql.StructReader](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.data.v2.models.sql.StructReader) getters that require types. We don't\nwant users to need to specify the struct schema when the schema will be validated on calls to\n[com.google.cloud.bigtable.data.v2.models.sql.StructReader](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.data.v2.models.sql.StructReader) methods on the struct.\n\nAny attempts to interact with the schema will throw an exception.\n\nFor example the historical map data type uses this as follows: \n\n\n Map\u003cByteString, List\u003cStruct\u003e\u003e historicalMap =\n resultSet.getMap(\n \"cf\",\n SqlType.mapOf(SqlType.bytes(), SqlType.arrayOf(SqlType.struct())));\n Struct struct = historicalMap.get(\"column\").get(0);\n // Struct schema will be validated here so there's no need for users to pass the schema to getMap above\n ByteString value = struct.getBytes(\"value\");\n \nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e Type.SchemalessStruct \n\nImplements\n----------\n\n[Type](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.common.Type), [SqlType.Struct](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.data.v2.models.sql.SqlType.Struct) \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Methods\n--------------\n\n### create()\n\n public static Type.SchemalessStruct create()\n\nConstructors\n------------\n\n### SchemalessStruct()\n\n public SchemalessStruct()\n\nMethods\n-------\n\n### getCode()\n\n public SqlType.Code getCode()\n\n### getColumnIndex(String fieldName)\n\n public int getColumnIndex(String fieldName)\n\n### getFields()\n\n public List\u003cSqlType.Struct.Field\u003e getFields()\n\n### getType(int fieldIndex)\n\n public SqlType\u003c?\u003e getType(int fieldIndex)\n\n### getType(String fieldName)\n\n public SqlType\u003c?\u003e getType(String fieldName)\n\n### toString()\n\n public String toString()\n\n**Overrides** \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--)"]]