public class org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema extends org.apache.drill.exec.store.AbstractSchema
{
private static final org.slf4j.Logger logger;
private static final java.util.regex.Pattern TAB_PATTERN;
private final java.util.Map activeTables;
private final java.util.List tableList;
private final org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin plugin;
private final com.google.api.services.sheets.v.Sheets sheetsService;
private final org.apache.drill.exec.store.SchemaConfig schemaConfig;
private final org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsRootSchema parent;
private final java.lang.String fileToken;
private final java.lang.String fileName;
private java.util.List tabList;
public void <init>(org.apache.drill.exec.store.AbstractSchema, java.lang.String, org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin, org.apache.drill.exec.store.SchemaConfig, com.google.api.services.sheets.v.Sheets, java.lang.String)
{
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
org.apache.drill.common.map.CaseInsensitiveMap v;
java.util.ArrayList v;
com.google.api.services.sheets.v.Sheets v;
java.util.List v;
org.apache.drill.exec.store.SchemaConfig v;
org.apache.drill.exec.store.AbstractSchema v;
org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin v;
java.util.Map v, v;
java.lang.String v, v, v, v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
v := @parameter: org.apache.drill.exec.store.AbstractSchema;
v := @parameter: java.lang.String;
v := @parameter: org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin;
v := @parameter: org.apache.drill.exec.store.SchemaConfig;
v := @parameter: com.google.api.services.sheets.v.Sheets;
v := @parameter: java.lang.String;
v = virtualinvoke v.<org.apache.drill.exec.store.AbstractSchema: java.util.List getSchemaPath()>();
v = virtualinvoke v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsRootSchema: java.util.Map getTokenMap()>();
v = staticinvoke <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsRootSchema: java.lang.String getFileTokenWithCorrectCase(java.util.Map,java.lang.String)>(v, v);
specialinvoke v.<org.apache.drill.exec.store.AbstractSchema: void <init>(java.util.List,java.lang.String)>(v, v);
v = staticinvoke <org.apache.drill.common.map.CaseInsensitiveMap: org.apache.drill.common.map.CaseInsensitiveMap newHashMap()>();
v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.Map activeTables> = v;
v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin plugin> = v;
v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.SchemaConfig schemaConfig> = v;
v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsRootSchema parent> = v;
v = virtualinvoke v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsRootSchema: java.util.Map getTokenMap()>();
v = staticinvoke <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsRootSchema: java.lang.String getFileTokenWithCorrectCase(java.util.Map,java.lang.String)>(v, v);
v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.lang.String fileToken> = v;
v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: com.google.api.services.sheets.v.Sheets sheetsService> = v;
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.List tableList> = v;
v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.lang.String fileName> = v;
return;
}
public java.lang.String getTypeName()
{
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
return "googlesheets";
}
public org.apache.calcite.schema.Table getTable(java.lang.String)
{
java.lang.Object[] v;
org.apache.drill.common.exceptions.UserException$Builder v, v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
org.apache.drill.exec.planner.logical.DynamicDrillTable v;
org.apache.drill.common.exceptions.UserException v;
org.apache.calcite.schema.Schema$TableType v;
java.util.function.Function v;
java.util.Map v, v;
int v, v, v;
java.lang.String v, v, v, v;
boolean v, v;
org.slf4j.Logger v, v, v, v;
java.util.List v, v;
java.lang.Object v, v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
v := @parameter: java.lang.String;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.Map activeTables>;
v = interfaceinvoke v.<java.util.Map: boolean isEmpty()>();
if v == 0 goto label;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.lang.String fileToken>;
v = staticinvoke <org.apache.drill.exec.store.googlesheets.utils.GoogleSheetsUtils: boolean isProbableFileToken(java.lang.String)>(v);
if v == 0 goto label;
specialinvoke v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: void populateActiveTables()>();
label:
v = specialinvoke v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: int getTabIndex(java.lang.String)>(v);
v = (int) -1;
if v <= v goto label;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.List tableList>;
v = interfaceinvoke v.<java.util.List: int size()>();
if v <= v goto label;
v = staticinvoke <org.apache.drill.common.exceptions.UserException: org.apache.drill.common.exceptions.UserException$Builder dataReadError()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Tab not found at index \u0001");
v = newarray (java.lang.Object)[0];
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException$Builder message(java.lang.String,java.lang.Object[])>(v, v);
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException build(org.slf4j.Logger)>(v);
throw v;
label:
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.List tableList>;
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(v);
return v;
label:
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Getting table: {}", v);
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.Map activeTables>;
v = staticinvoke <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema$getDrillTable__1: java.util.function.Function bootstrap$(org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema)>(v);
v = interfaceinvoke v.<java.util.Map: java.lang.Object computeIfAbsent(java.lang.Object,java.util.function.Function)>(v, v);
if v == null goto label;
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
v = virtualinvoke v.<org.apache.drill.exec.planner.logical.DynamicDrillTable: org.apache.calcite.schema.Schema$TableType getJdbcTableType()>();
v = v.<org.apache.calcite.schema.Schema$TableType: java.lang.String jdbcName>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Found table: {}", v);
goto label;
label:
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Oh no! {} not found and returning null!", v);
return null;
label:
return v;
}
private int getTabIndex(java.lang.String)
{
java.lang.Object[] v;
org.slf4j.Logger v;
org.apache.drill.common.exceptions.UserException$Builder v, v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
org.apache.drill.common.exceptions.UserException v;
java.util.regex.Matcher v;
int v, v;
java.lang.String v, v;
java.util.regex.Pattern v;
boolean v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
v := @parameter: java.lang.String;
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.regex.Pattern TAB_PATTERN>;
v = virtualinvoke v.<java.util.regex.Pattern: java.util.regex.Matcher matcher(java.lang.CharSequence)>(v);
v = virtualinvoke v.<java.util.regex.Matcher: boolean find()>();
if v == 0 goto label;
v = virtualinvoke v.<java.util.regex.Matcher: java.lang.String group(int)>(1);
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
if v >= 0 goto label;
v = staticinvoke <org.apache.drill.common.exceptions.UserException: org.apache.drill.common.exceptions.UserException$Builder internalError()>();
v = newarray (java.lang.Object)[0];
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException$Builder message(java.lang.String,java.lang.Object[])>("Google Sheets tab index must be greater than zero.", v);
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException build(org.slf4j.Logger)>(v);
throw v;
label:
return v;
label:
v = (int) -1;
return v;
}
public org.apache.drill.exec.planner.logical.DynamicDrillTable getDrillTable(java.lang.String)
{
org.slf4j.Logger v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
java.util.Map v;
java.lang.Object v;
java.lang.String v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
v := @parameter: java.lang.String;
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Getting Drill Table {}", v);
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.Map activeTables>;
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>(v);
return v;
}
public java.util.Set getTableNames()
{
java.util.Set v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
v = staticinvoke <java.util.Collections: java.util.Set emptySet()>();
return v;
}
public boolean isMutable()
{
org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
boolean v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin plugin>;
v = virtualinvoke v.<org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin: boolean supportsWrite()>();
return v;
}
private void populateActiveTables()
{
org.apache.drill.common.exceptions.UserException v;
org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin v, v, v, v;
boolean v;
com.google.api.services.sheets.v.Sheets v;
java.util.List v, v, v;
java.lang.Object[] v;
org.apache.drill.common.exceptions.UserException$Builder v, v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
org.apache.drill.exec.planner.logical.DynamicDrillTable v;
int v;
java.lang.String v, v, v, v, v, v, v, v, v, v;
org.slf4j.Logger v;
java.util.Iterator v;
java.io.IOException v;
com.google.api.services.sheets.v.model.SheetProperties v, v;
org.apache.drill.exec.store.googlesheets.GoogleSheetsScanSpec v;
org.apache.drill.common.logical.StoragePluginConfig v;
java.lang.Object v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
label:
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: com.google.api.services.sheets.v.Sheets sheetsService>;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.lang.String fileToken>;
v = staticinvoke <org.apache.drill.exec.store.googlesheets.utils.GoogleSheetsUtils: java.util.List getTabList(com.google.api.services.sheets.v.Sheets,java.lang.String)>(v, v);
v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.List tabList> = v;
label:
goto label;
label:
v := @caughtexception;
v = staticinvoke <org.apache.drill.common.exceptions.UserException: org.apache.drill.common.exceptions.UserException$Builder connectionError(java.lang.Throwable)>(v);
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.lang.String fileToken>;
v = virtualinvoke v.<java.io.IOException: java.lang.String getMessage()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String,java.lang.String)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Unable to obtain tab list for Google Sheet document \u. \u0001");
v = newarray (java.lang.Object)[0];
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException$Builder message(java.lang.String,java.lang.Object[])>(v, v);
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException build(org.slf4j.Logger)>(v);
throw v;
label:
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.List tabList>;
v = interfaceinvoke v.<java.util.List: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<com.google.api.services.sheets.v.model.Sheet: com.google.api.services.sheets.v.model.SheetProperties getProperties()>();
v = virtualinvoke v.<com.google.api.services.sheets.v.model.SheetProperties: java.lang.String getTitle()>();
v = new org.apache.drill.exec.planner.logical.DynamicDrillTable;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin plugin>;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin plugin>;
v = virtualinvoke v.<org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin: java.lang.String getName()>();
v = new org.apache.drill.exec.store.googlesheets.GoogleSheetsScanSpec;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.lang.String fileToken>;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin plugin>;
v = virtualinvoke v.<org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin: org.apache.drill.common.logical.StoragePluginConfig getConfig()>();
v = virtualinvoke v.<com.google.api.services.sheets.v.model.Sheet: com.google.api.services.sheets.v.model.SheetProperties getProperties()>();
v = virtualinvoke v.<com.google.api.services.sheets.v.model.SheetProperties: java.lang.String getTitle()>();
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin plugin>;
v = virtualinvoke v.<org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin: java.lang.String getName()>();
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.List tabList>;
v = interfaceinvoke v.<java.util.List: int indexOf(java.lang.Object)>(v);
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.lang.String fileName>;
specialinvoke v.<org.apache.drill.exec.store.googlesheets.GoogleSheetsScanSpec: void <init>(java.lang.String,org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePluginConfig,java.lang.String,java.lang.String,int,java.lang.String)>(v, v, v, v, v, v);
specialinvoke v.<org.apache.drill.exec.planner.logical.DynamicDrillTable: void <init>(org.apache.drill.exec.store.StoragePlugin,java.lang.String,org.apache.drill.exec.planner.logical.DrillTableSelection)>(v, v, v);
specialinvoke v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: void registerTable(java.lang.String,org.apache.drill.exec.planner.logical.DynamicDrillTable)>(v, v);
goto label;
label:
return;
catch java.io.IOException from label to label with label;
}
public org.apache.drill.exec.planner.logical.CreateTableEntry createNewTable(java.lang.String, java.util.List, org.apache.drill.exec.store.StorageStrategy)
{
java.lang.Object[] v;
org.apache.drill.common.exceptions.UserException$Builder v, v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
org.apache.drill.common.exceptions.UserException v;
org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin v, v;
java.lang.String v, v, v, v;
boolean v;
org.slf4j.Logger v;
java.util.List v;
org.apache.drill.exec.store.StorageStrategy v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema$1 v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
v := @parameter: java.lang.String;
v := @parameter: java.util.List;
v := @parameter: org.apache.drill.exec.store.StorageStrategy;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin plugin>;
v = virtualinvoke v.<org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin: boolean supportsWrite()>();
if v != 0 goto label;
v = staticinvoke <org.apache.drill.common.exceptions.UserException: org.apache.drill.common.exceptions.UserException$Builder dataWriteError()>();
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin plugin>;
v = virtualinvoke v.<org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin: java.lang.String getName()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u is not writable.");
v = newarray (java.lang.Object)[0];
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException$Builder message(java.lang.String,java.lang.Object[])>(v, v);
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException build(org.slf4j.Logger)>(v);
throw v;
label:
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.lang.String fileToken>;
v = new org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema$1;
specialinvoke v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema$1: void <init>(org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema,java.lang.String,java.lang.String)>(v, v, v);
return v;
}
public org.apache.drill.exec.planner.logical.ModifyTableEntry modifyTable(java.lang.String)
{
org.apache.drill.exec.planner.logical.ModifyTableEntry v;
java.lang.String v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
v := @parameter: java.lang.String;
v = staticinvoke <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema$lambda_modifyTable_0__2: org.apache.drill.exec.planner.logical.ModifyTableEntry bootstrap$(org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema,java.lang.String)>(v, v);
return v;
}
public void dropTable(java.lang.String)
{
java.lang.Object[] v, v;
org.apache.drill.common.exceptions.UserException$Builder v, v, v, v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
com.google.api.services.drive.Drive v;
org.apache.drill.common.exceptions.UserException v, v;
org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin v;
com.google.api.services.sheets.v.model.Sheet v;
int v;
java.lang.String v, v, v, v, v, v, v;
org.slf4j.Logger v, v, v;
com.google.api.services.drive.Drive$Files v;
java.io.IOException v, v;
com.google.api.services.sheets.v.Sheets v;
java.util.List v, v;
org.apache.drill.exec.store.SchemaConfig v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
v := @parameter: java.lang.String;
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Index name: {}", v);
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.List tabList>;
v = interfaceinvoke v.<java.util.List: int size()>();
if v != 1 goto label;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin plugin>;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.apache.drill.exec.store.SchemaConfig schemaConfig>;
v = virtualinvoke v.<org.apache.drill.exec.store.SchemaConfig: java.lang.String getUserName()>();
v = virtualinvoke v.<org.apache.drill.exec.store.googlesheets.GoogleSheetsStoragePlugin: com.google.api.services.drive.Drive getDriveService(java.lang.String)>(v);
label:
v = virtualinvoke v.<com.google.api.services.drive.Drive: com.google.api.services.drive.Drive$Files files()>();
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.lang.String fileToken>;
virtualinvoke v.<com.google.api.services.drive.Drive$Files: com.google.api.services.drive.Drive$Files$Delete delete(java.lang.String)>(v);
label:
goto label;
label:
v := @caughtexception;
v = staticinvoke <org.apache.drill.common.exceptions.UserException: org.apache.drill.common.exceptions.UserException$Builder internalError(java.lang.Throwable)>(v);
v = virtualinvoke v.<java.io.IOException: java.lang.String getMessage()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Error deleting GoogleSheets file. \u0001");
v = newarray (java.lang.Object)[0];
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException$Builder message(java.lang.String,java.lang.Object[])>(v, v);
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException build(org.slf4j.Logger)>(v);
throw v;
label:
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.List tabList>;
v = staticinvoke <org.apache.drill.exec.store.googlesheets.utils.GoogleSheetsUtils: com.google.api.services.sheets.v.model.Sheet getSheetFromTabList(java.lang.String,java.util.List)>(v, v);
label:
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: com.google.api.services.sheets.v.Sheets sheetsService>;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.lang.String fileToken>;
staticinvoke <org.apache.drill.exec.store.googlesheets.utils.GoogleSheetsUtils: void removeTabFromGoogleSheet(com.google.api.services.sheets.v.Sheets,java.lang.String,com.google.api.services.sheets.v.model.Sheet)>(v, v, v);
label:
goto label;
label:
v := @caughtexception;
v = staticinvoke <org.apache.drill.common.exceptions.UserException: org.apache.drill.common.exceptions.UserException$Builder internalError(java.lang.Throwable)>(v);
v = virtualinvoke v.<java.io.IOException: java.lang.String getMessage()>();
v = newarray (java.lang.Object)[0];
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException$Builder message(java.lang.String,java.lang.Object[])>(v, v);
v = <org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger>;
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException build(org.slf4j.Logger)>(v);
throw v;
label:
return;
catch java.io.IOException from label to label with label;
catch java.io.IOException from label to label with label;
}
private void registerTable(java.lang.String, org.apache.drill.exec.planner.logical.DynamicDrillTable)
{
java.util.List v;
org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema v;
org.apache.drill.exec.planner.logical.DynamicDrillTable v;
java.util.Map v;
java.lang.String v;
v := @this: org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema;
v := @parameter: java.lang.String;
v := @parameter: org.apache.drill.exec.planner.logical.DynamicDrillTable;
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.Map activeTables>;
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>(v, v);
v = v.<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.List tableList>;
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
return;
}
static void <clinit>()
{
java.util.regex.Pattern v;
org.slf4j.Logger v;
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.Class)>(class "Lorg/apache/drill/exec/store/googlesheets/schema/GoogleSheetsDrillSchema;");
<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: org.slf4j.Logger logger> = v;
v = staticinvoke <java.util.regex.Pattern: java.util.regex.Pattern compile(java.lang.String)>("^tab\\[(\\d+)\\]$");
<org.apache.drill.exec.store.googlesheets.schema.GoogleSheetsDrillSchema: java.util.regex.Pattern TAB_PATTERN> = v;
return;
}
}