Skip to content

Commit

Permalink
add license
Browse files Browse the repository at this point in the history
  • Loading branch information
Cpaulyz committed Nov 19, 2024
1 parent 4490c55 commit e1dc67e
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.iotdb.udf.api.relational;

public interface AggregationFunction extends SQLFunction {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.iotdb.udf.api.relational;

public interface SQLFunction {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.iotdb.udf.api.relational;

public interface ScalarFunction extends SQLFunction {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.iotdb.udf.api.relational;

public interface TableFunction extends SQLFunction {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.iotdb.udf.api.relational.access;

import org.apache.iotdb.udf.api.type.Binary;
import org.apache.iotdb.udf.api.type.Type;

import java.io.IOException;

public interface Record {
/**
* Returns the int value at the specified column in this row.
*
* <p>Users need to ensure that the data type of the specified column is {@code TSDataType.INT32}.
*
* @param columnIndex index of the specified column
* @return the int value at the specified column in this row
* @throws IOException if an I/O error occurs
*/
int getInt(int columnIndex) throws IOException;

/**
* Returns the long value at the specified column in this row.
*
* <p>Users need to ensure that the data type of the specified column is {@code TSDataType.INT64}.
*
* @param columnIndex index of the specified column
* @return the long value at the specified column in this row
* @throws IOException if an I/O error occurs
*/
long getLong(int columnIndex) throws IOException;

/**
* Returns the float value at the specified column in this row.
*
* <p>Users need to ensure that the data type of the specified column is {@code TSDataType.FLOAT}.
*
* @param columnIndex index of the specified column
* @return the float value at the specified column in this row
* @throws IOException if an I/O error occurs
*/
float getFloat(int columnIndex) throws IOException;

/**
* Returns the double value at the specified column in this row.
*
* <p>Users need to ensure that the data type of the specified column is {@code
* TSDataType.DOUBLE}.
*
* @param columnIndex index of the specified column
* @return the double value at the specified column in this row
* @throws IOException if an I/O error occurs
*/
double getDouble(int columnIndex) throws IOException;

/**
* Returns the boolean value at the specified column in this row.
*
* <p>Users need to ensure that the data type of the specified column is {@code
* TSDataType.BOOLEAN}.
*
* @param columnIndex index of the specified column
* @return the boolean value at the specified column in this row
* @throws IOException if an I/O error occurs
*/
boolean getBoolean(int columnIndex) throws IOException;

/**
* Returns the Binary value at the specified column in this row.
*
* <p>Users need to ensure that the data type of the specified column is {@code TSDataType.TEXT}.
*
* @param columnIndex index of the specified column
* @return the Binary value at the specified column in this row
* @throws IOException if an I/O error occurs
*/
Binary getBinary(int columnIndex) throws IOException;

/**
* Returns the String value at the specified column in this row.
*
* <p>Users need to ensure that the data type of the specified column is {@code TSDataType.TEXT}.
*
* @param columnIndex index of the specified column
* @return the String value at the specified column in this row
* @throws IOException if an I/O error occurs
*/
String getString(int columnIndex) throws IOException;

/**
* Returns the actual data type of the value at the specified column in this row.
*
* @param columnIndex index of the specified column
* @return the actual data type of the value at the specified column in this row
*/
Type getDataType(int columnIndex);

/**
* Returns {@code true} if the value of the specified column is null.
*
* @param columnIndex index of the specified column
* @return {@code true} if the value of the specified column is null
*/
boolean isNull(int columnIndex) throws IOException;

/**
* Returns the number of columns.
*
* @return the number of columns
*/
int size();
}

0 comments on commit e1dc67e

Please sign in to comment.