test_class.file: shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/test/java/org/apache/shardingsphere/sql/parser/binder/segment/table/TablesContextTest.java
test_class.identifier: TablesContextTest
test_case.body: @Test
      public void assertFindTableNameWhenSingleTable() {
          SimpleTableSegment tableSegment = createTableSegment("table_1", "tbl_1");
          Optional<String> actual = new TablesContext(Collections.singletonList(tableSegment)).findTableName(createColumnSegment(), mock(SchemaMetaData.class));
          assertTrue(actual.isPresent());
          assertThat(actual.get(), is("table_1"));
      }
test_case.class_method_signature: TablesContextTest.assertFindTableNameWhenSingleTable()
test_case.full_signature: @Test public void assertFindTableNameWhenSingleTable()
test_case.identifier: assertFindTableNameWhenSingleTable
test_case.invocations: createTableSegment findTableName singletonList createColumnSegment mock assertTrue isPresent assertThat get is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertFindTableNameWhenSingleTable()
focal_class.declarator: tables
focal_class.modifier: private final
focal_class.original_string: private final Collection<SimpleTableSegment> tables;
focal_class.type: Collection<SimpleTableSegment>
focal_class.var_name: tables
focal_class.file: shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/segment/table/TablesContext.java
focal_class.identifier: TablesContext
focal_class.class_method_signature: TablesContext.TablesContext(final SimpleTableSegment tableSegment)
focal_class.full_signature: public  TablesContext(final SimpleTableSegment tableSegment)
focal_class.identifier: TablesContext
focal_class.modifiers: public
focal_class.parameters: (final SimpleTableSegment tableSegment)
focal_class.signature:  TablesContext(final SimpleTableSegment tableSegment)
focal_class.class_method_signature: TablesContext.TablesContext(final Collection<SimpleTableSegment> tableSegments)
focal_class.full_signature: public  TablesContext(final Collection<SimpleTableSegment> tableSegments)
focal_class.identifier: TablesContext
focal_class.modifiers: public
focal_class.parameters: (final Collection<SimpleTableSegment> tableSegments)
focal_class.signature:  TablesContext(final Collection<SimpleTableSegment> tableSegments)
focal_class.class_method_signature: TablesContext.getTableNames()
focal_class.full_signature: public Collection<String> getTableNames()
focal_class.identifier: getTableNames
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<String>
focal_class.signature: Collection<String> getTableNames()
focal_class.class_method_signature: TablesContext.findTableName(final ColumnSegment column, final SchemaMetaData schemaMetaData)
focal_class.full_signature: public Optional<String> findTableName(final ColumnSegment column, final SchemaMetaData schemaMetaData)
focal_class.identifier: findTableName
focal_class.modifiers: public
focal_class.parameters: (final ColumnSegment column, final SchemaMetaData schemaMetaData)
focal_class.return: Optional<String>
focal_class.signature: Optional<String> findTableName(final ColumnSegment column, final SchemaMetaData schemaMetaData)
focal_class.class_method_signature: TablesContext.findTableName(final ColumnProjection column, final SchemaMetaData schemaMetaData)
focal_class.full_signature: public Optional<String> findTableName(final ColumnProjection column, final SchemaMetaData schemaMetaData)
focal_class.identifier: findTableName
focal_class.modifiers: public
focal_class.parameters: (final ColumnProjection column, final SchemaMetaData schemaMetaData)
focal_class.return: Optional<String>
focal_class.signature: Optional<String> findTableName(final ColumnProjection column, final SchemaMetaData schemaMetaData)
focal_class.class_method_signature: TablesContext.findTableNameFromSQL(final String tableNameOrAlias)
focal_class.full_signature: public String findTableNameFromSQL(final String tableNameOrAlias)
focal_class.identifier: findTableNameFromSQL
focal_class.modifiers: public
focal_class.parameters: (final String tableNameOrAlias)
focal_class.return: String
focal_class.signature: String findTableNameFromSQL(final String tableNameOrAlias)
focal_class.class_method_signature: TablesContext.findTableNameFromMetaData(final String columnName, final SchemaMetaData schemaMetaData)
focal_class.full_signature: private Optional<String> findTableNameFromMetaData(final String columnName, final SchemaMetaData schemaMetaData)
focal_class.identifier: findTableNameFromMetaData
focal_class.modifiers: private
focal_class.parameters: (final String columnName, final SchemaMetaData schemaMetaData)
focal_class.return: Optional<String>
focal_class.signature: Optional<String> findTableNameFromMetaData(final String columnName, final SchemaMetaData schemaMetaData)
focal_method.body: public Optional<String> findTableName(final ColumnSegment column, final SchemaMetaData schemaMetaData) {
          if (1 == tables.size()) {
              return Optional.of(tables.iterator().next().getTableName().getIdentifier().getValue());
          }
          if (column.getOwner().isPresent()) {
              return Optional.of(findTableNameFromSQL(column.getOwner().get().getIdentifier().getValue()));
          }
          return findTableNameFromMetaData(column.getIdentifier().getValue(), schemaMetaData);
      }
focal_method.class_method_signature: TablesContext.findTableName(final ColumnSegment column, final SchemaMetaData schemaMetaData)
focal_method.full_signature: public Optional<String> findTableName(final ColumnSegment column, final SchemaMetaData schemaMetaData)
focal_method.identifier: findTableName
focal_method.invocations: size of getValue getIdentifier getTableName next iterator isPresent getOwner of findTableNameFromSQL getValue getIdentifier get getOwner findTableNameFromMetaData getValue getIdentifier
focal_method.modifiers: public
focal_method.parameters: (final ColumnSegment column, final SchemaMetaData schemaMetaData)
focal_method.return: Optional<String>
focal_method.signature: Optional<String> findTableName(final ColumnSegment column, final SchemaMetaData schemaMetaData)