This commit is contained in:
Zoltan Haindrich 2024-07-25 03:05:04 +00:00
parent a489e19242
commit d705c2759b
1 changed files with 3 additions and 15 deletions

View File

@ -114,29 +114,17 @@ public class MSQDruidMeta extends DruidMeta
private Signature makeSignature(AbstractDruidJdbcStatement druidStatement, List<ColumnAndType> cat)
{
RowSignature sig = ColumnAndType.toRowSignature(cat);
RelDataType rowType = decodeRowRelDataType(sig);
RelDataType rowType = RowSignatures.toRelDataType(sig, DruidTypeSystem.TYPE_FACTORY);
return Meta.Signature.create(
AbstractDruidJdbcStatement.createColumnMetaData(rowType),
"some query?",
"FIXME some query?",
Collections.emptyList(),
Meta.CursorFactory.ARRAY,
Meta.StatementType.SELECT // We only support SELECT
Meta.StatementType.SELECT
);
}
private RelDataType decodeRowRelDataType(RowSignature sig)
{
return RowSignatures.toRelDataType(sig, DruidTypeSystem.TYPE_FACTORY);
// typeFactory.createStructType(
// signature.stream()
// .map(columnAndType ->
// relDataTypeFactory.createJavaType(columnAndType.getType()))
// .toArray(RelDataType[]::new));
}
private String extractTaskId(AbstractDruidJdbcStatement druidStatement)
{
ExecuteResult r = super.doFetch(druidStatement, 2);